All does "SELECT FROM ..." statement for the model. It retrieves the records from table and returns the result as slice type. It returns nil if there's no record retrieved with the given conditions from table. The optional parameter `where` is the same as the parameter of Model.Where function, see
(where ...any)
| 27 | // The optional parameter `where` is the same as the parameter of Model.Where function, |
| 28 | // see Model.Where. |
| 29 | func (m *Model) All(where ...any) (Result, error) { |
| 30 | var ctx = m.GetCtx() |
| 31 | return m.doGetAll(ctx, SelectTypeDefault, false, where...) |
| 32 | } |
| 33 | |
| 34 | // AllAndCount retrieves all records and the total count of records from the model. |
| 35 | // If useFieldForCount is true, it will use the fields specified in the model for counting; |