Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Artist) predicate.Artist
- func HasSongs() predicate.Artist
- func HasSongsWith(preds ...predicate.Song) predicate.Artist
- func ID(id int) predicate.Artist
- func IDEQ(id int) predicate.Artist
- func IDGT(id int) predicate.Artist
- func IDGTE(id int) predicate.Artist
- func IDIn(ids ...int) predicate.Artist
- func IDLT(id int) predicate.Artist
- func IDLTE(id int) predicate.Artist
- func IDNEQ(id int) predicate.Artist
- func IDNotIn(ids ...int) predicate.Artist
- func Name(v string) predicate.Artist
- func NameContains(v string) predicate.Artist
- func NameContainsFold(v string) predicate.Artist
- func NameEQ(v string) predicate.Artist
- func NameEqualFold(v string) predicate.Artist
- func NameGT(v string) predicate.Artist
- func NameGTE(v string) predicate.Artist
- func NameHasPrefix(v string) predicate.Artist
- func NameHasSuffix(v string) predicate.Artist
- func NameIn(vs ...string) predicate.Artist
- func NameLT(v string) predicate.Artist
- func NameLTE(v string) predicate.Artist
- func NameNEQ(v string) predicate.Artist
- func NameNotIn(vs ...string) predicate.Artist
- func Not(p predicate.Artist) predicate.Artist
- func Or(predicates ...predicate.Artist) predicate.Artist
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the artist type in the database. Label = "artist" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeSongs holds the string denoting the songs edge name in mutations. EdgeSongs = "songs" // Table holds the table name of the artist in the database. Table = "artists" // SongsTable is the table that holds the songs relation/edge. SongsTable = "songs" // SongsInverseTable is the table name for the Song entity. // It exists in this package in order to avoid circular dependency with the "song" package. SongsInverseTable = "songs" // SongsColumn is the table column denoting the songs relation/edge. SongsColumn = "artist_id" )
Variables ¶
var Columns = []string{ FieldID, FieldName, }
Columns holds all SQL columns for artist fields.
Functions ¶
func HasSongsWith ¶
HasSongsWith applies the HasEdge predicate on the "songs" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Artist queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func BySongs ¶
func BySongs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySongs orders the results by songs terms.
func BySongsCount ¶
func BySongsCount(opts ...sql.OrderTermOption) OrderOption
BySongsCount orders the results by songs count.