Collections are usually managed via the Dashboard interface, but there are some situations where you may
want to create or edit a collection programmatically (usually as part of a
DB migration). You can find all available Collection related operations
and methods in
core.App
and
core.Collection
, but below are listed some of the most common ones:
All single collection retrieval methods return nil and sql.ErrNoRows error if no
collection is found.
All multiple collections retrieval methods return empty slice and nil error if no collections
are found.
In addition to the above query helpers, you can also create custom Collection queries using
CollectionQuery()
method. It returns a SELECT DB builder that can be used with the same methods described in the
Database guide.
core.{field}