JCC Express

Retrieving Models

Introduction

JCC-Eloquent models expose static retrieval methods through Model + QueryBuilder.

Use these for common fetch patterns before dropping to raw SQL.


Basic retrieval

TypeScript

Query constraints

TypeScript

Existence and value helpers

TypeScript

Select and raw

TypeScript

Aggregates

TypeScript

Advanced where variants

Available static methods include:

  • whereNot, orWhereNot
  • whereNotNull, whereNull
  • whereIn, whereBetween, whereNotBetween, orWhereBetween
  • whereExists, orWhereExists
  • whereDate, whereMonth, whereDay, whereYear, whereTime
  • whereRaw, orWhereRaw
  • whereLike, orWhereLike

Summary

  • Start with all, find, where(...).get(), and first().
  • Use existence/value/aggregate helpers for efficient reads.
  • Use runQuery and raw clauses only when builder expressions are not enough.