artists

package
v0.0.0-...-910bef7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the artists type in the database.
	Label = "artists"
	// 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"
	// EdgeMusics holds the string denoting the musics edge name in mutations.
	EdgeMusics = "musics"
	// EdgeAlbums holds the string denoting the albums edge name in mutations.
	EdgeAlbums = "albums"
	// Table holds the table name of the artists in the database.
	Table = "artists"
	// MusicsTable is the table that holds the musics relation/edge. The primary key declared below.
	MusicsTable = "artists_musics"
	// MusicsInverseTable is the table name for the Musics entity.
	// It exists in this package in order to avoid circular dependency with the "musics" package.
	MusicsInverseTable = "musics"
	// AlbumsTable is the table that holds the albums relation/edge. The primary key declared below.
	AlbumsTable = "artists_albums"
	// AlbumsInverseTable is the table name for the Albums entity.
	// It exists in this package in order to avoid circular dependency with the "albums" package.
	AlbumsInverseTable = "albums"
)

Variables

View Source
var (
	// MusicsPrimaryKey and MusicsColumn2 are the table columns denoting the
	// primary key for the musics relation (M2M).
	MusicsPrimaryKey = []string{"artists_id", "musics_id"}
	// AlbumsPrimaryKey and AlbumsColumn2 are the table columns denoting the
	// primary key for the albums relation (M2M).
	AlbumsPrimaryKey = []string{"artists_id", "albums_id"}
)
View Source
var Columns = []string{
	FieldID,
	FieldName,
}

Columns holds all SQL columns for artists fields.

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Artists) predicate.Artists

And groups predicates with the AND operator between them.

func HasAlbums

func HasAlbums() predicate.Artists

HasAlbums applies the HasEdge predicate on the "albums" edge.

func HasAlbumsWith

func HasAlbumsWith(preds ...predicate.Albums) predicate.Artists

HasAlbumsWith applies the HasEdge predicate on the "albums" edge with a given conditions (other predicates).

func HasMusics

func HasMusics() predicate.Artists

HasMusics applies the HasEdge predicate on the "musics" edge.

func HasMusicsWith

func HasMusicsWith(preds ...predicate.Musics) predicate.Artists

HasMusicsWith applies the HasEdge predicate on the "musics" edge with a given conditions (other predicates).

func ID

func ID(id uint64) predicate.Artists

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Artists

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Artists

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Artists

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint64) predicate.Artists

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Artists

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Artists

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Artists

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint64) predicate.Artists

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Artists

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Artists

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Artists

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Artists

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Artists

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Artists

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Artists

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Artists

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Artists

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Artists

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Artists

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Artists

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Artists

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Artists

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Artists) predicate.Artists

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Artists queries.

func ByAlbums

func ByAlbums(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAlbums orders the results by albums terms.

func ByAlbumsCount

func ByAlbumsCount(opts ...sql.OrderTermOption) OrderOption

ByAlbumsCount orders the results by albums count.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByMusics

func ByMusics(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMusics orders the results by musics terms.

func ByMusicsCount

func ByMusicsCount(opts ...sql.OrderTermOption) OrderOption

ByMusicsCount orders the results by musics count.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL