Documentation
¶
Index ¶
- type Q
- func (q *Q) DeleteAll(dest api.IRecord) (affected int, err error)
- func (q *Q) DeleteOneByID(dest api.IRecord, ID string) (affected int, err error)
- func (q *Q) ExistsByField(db api.IRecord, field string, value string) (found bool, ID string, err error)
- func (q *Q) ExistsByID(db api.IRecord, value string) (found bool, err error)
- func (q *Q) FindAll(dest api.IRecord) (total int, err error)
- func (q *Q) FindOneByField(dest api.IRecord, field string, value string) (exists bool, err error)
- func (q *Q) FindOneByID(dest api.IRecord, ID string) (exists bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Q ¶
Q is a database wrapper that provides helpful utilities.
func (*Q) DeleteAll ¶
DeleteAll removes all records.
func (*Q) DeleteOneByID ¶
DeleteOneByID removes one record by ID.
func (*Q) ExistsByField ¶
func (q *Q) ExistsByField(db api.IRecord, field string, value string) (found bool, ID string, err error)
ExistsByField determines if a records exists by a specified field and returns the ID.
func (*Q) ExistsByID ¶
ExistsByID determines if a records exists by ID.
func (*Q) FindAll ¶
FindAll returns all users.
func (*Q) FindOneByField ¶
FindOneByField will find a record by a specified field.
Click to show internal directories.
Click to hide internal directories.