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,orWhereNotwhereNotNull,whereNullwhereIn,whereBetween,whereNotBetween,orWhereBetweenwhereExists,orWhereExistswhereDate,whereMonth,whereDay,whereYear,whereTimewhereRaw,orWhereRawwhereLike,orWhereLike
Summary
- Start with
all,find,where(...).get(), andfirst(). - Use existence/value/aggregate helpers for efficient reads.
- Use
runQueryand raw clauses only when builder expressions are not enough.
