File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,12 +65,30 @@ This method orders the results by the given field and returns them in descending
6565Repo . get(User . class). orderBy(" age" , true ) // All users starting with the oldest descending to the youngest
6666```
6767
68+ #### groupBy
69+ This method groups the results by the given column name.
70+ ``` java
71+ Repo . get(User . class). groupBy(" age" ) // Groups all users with the same age together.
72+ ```
73+
6874#### limit
6975Limit the amount of entities returned.
7076``` java
7177Repo . get(User . class). limit(3 ) // Only the first 3 users
7278```
7379
80+ #### offset
81+ Shifts the entries by n, useful in combination with limit.
82+ ``` java
83+ Repo . get(User . class). offset(1337 ) // Starts at the 1337th User
84+ ```
85+
86+ #### limit & offset together
87+ The functionality of limit and offset together.
88+ ``` java
89+ Repo . get(User . class). limit(1337 , 100 )
90+ ```
91+
7492#### withDeleted
7593If [ soft-deletes] ( /framework/orm/soft-deletes/ ) are enabled for the model, this will include soft-deleted entities into the query.
7694``` java
You can’t perform that action at this time.
0 commit comments