book

package
v0.0.0-...-397b8aa Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the book type in the database.
	Label = "book"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateAt holds the string denoting the create_at field in the database.
	FieldCreateAt = "create_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldPages holds the string denoting the pages field in the database.
	FieldPages = "pages"
	// FieldAbstract holds the string denoting the abstract field in the database.
	FieldAbstract = "abstract"
	// FieldCategory holds the string denoting the category field in the database.
	FieldCategory = "category"
	// FieldCoverURL holds the string denoting the cover_url field in the database.
	FieldCoverURL = "cover_url"
	// EdgeOnLoans holds the string denoting the on_loans edge name in mutations.
	EdgeOnLoans = "on_loans"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// Table holds the table name of the book in the database.
	Table = "books"
	// OnLoansTable is the table that holds the on_loans relation/edge.
	OnLoansTable = "book_loans"
	// OnLoansInverseTable is the table name for the BookLoan entity.
	// It exists in this package in order to avoid circular dependency with the "bookloan" package.
	OnLoansInverseTable = "book_loans"
	// OnLoansColumn is the table column denoting the on_loans relation/edge.
	OnLoansColumn = "book_on_loans"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "books"
	// AuthorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	AuthorInverseTable = "users"
	// AuthorColumn is the table column denoting the author relation/edge.
	AuthorColumn = "user_books"
)

Variables

View Source
var (
	// DefaultCreateAt holds the default value on creation for the "create_at" field.
	DefaultCreateAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for book fields.

View Source
var ForeignKeys = []string{
	"user_books",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "books" table and are not defined as standalone fields in the schema.

Functions

func Abstract

func Abstract(v string) predicate.Book

Abstract applies equality check predicate on the "abstract" field. It's identical to AbstractEQ.

func AbstractContains

func AbstractContains(v string) predicate.Book

AbstractContains applies the Contains predicate on the "abstract" field.

func AbstractContainsFold

func AbstractContainsFold(v string) predicate.Book

AbstractContainsFold applies the ContainsFold predicate on the "abstract" field.

func AbstractEQ

func AbstractEQ(v string) predicate.Book

AbstractEQ applies the EQ predicate on the "abstract" field.

func AbstractEqualFold

func AbstractEqualFold(v string) predicate.Book

AbstractEqualFold applies the EqualFold predicate on the "abstract" field.

func AbstractGT

func AbstractGT(v string) predicate.Book

AbstractGT applies the GT predicate on the "abstract" field.

func AbstractGTE

func AbstractGTE(v string) predicate.Book

AbstractGTE applies the GTE predicate on the "abstract" field.

func AbstractHasPrefix

func AbstractHasPrefix(v string) predicate.Book

AbstractHasPrefix applies the HasPrefix predicate on the "abstract" field.

func AbstractHasSuffix

func AbstractHasSuffix(v string) predicate.Book

AbstractHasSuffix applies the HasSuffix predicate on the "abstract" field.

func AbstractIn

func AbstractIn(vs ...string) predicate.Book

AbstractIn applies the In predicate on the "abstract" field.

func AbstractIsNil

func AbstractIsNil() predicate.Book

AbstractIsNil applies the IsNil predicate on the "abstract" field.

func AbstractLT

func AbstractLT(v string) predicate.Book

AbstractLT applies the LT predicate on the "abstract" field.

func AbstractLTE

func AbstractLTE(v string) predicate.Book

AbstractLTE applies the LTE predicate on the "abstract" field.

func AbstractNEQ

func AbstractNEQ(v string) predicate.Book

AbstractNEQ applies the NEQ predicate on the "abstract" field.

func AbstractNotIn

func AbstractNotIn(vs ...string) predicate.Book

AbstractNotIn applies the NotIn predicate on the "abstract" field.

func AbstractNotNil

func AbstractNotNil() predicate.Book

AbstractNotNil applies the NotNil predicate on the "abstract" field.

func And

func And(predicates ...predicate.Book) predicate.Book

And groups predicates with the AND operator between them.

func CategoryEQ

func CategoryEQ(v Category) predicate.Book

CategoryEQ applies the EQ predicate on the "category" field.

func CategoryIn

func CategoryIn(vs ...Category) predicate.Book

CategoryIn applies the In predicate on the "category" field.

func CategoryNEQ

func CategoryNEQ(v Category) predicate.Book

CategoryNEQ applies the NEQ predicate on the "category" field.

func CategoryNotIn

func CategoryNotIn(vs ...Category) predicate.Book

CategoryNotIn applies the NotIn predicate on the "category" field.

func CategoryValidator

func CategoryValidator(c Category) error

CategoryValidator is a validator for the "category" field enum values. It is called by the builders before save.

func CoverURL

func CoverURL(v string) predicate.Book

CoverURL applies equality check predicate on the "cover_url" field. It's identical to CoverURLEQ.

func CoverURLContains

func CoverURLContains(v string) predicate.Book

CoverURLContains applies the Contains predicate on the "cover_url" field.

func CoverURLContainsFold

func CoverURLContainsFold(v string) predicate.Book

CoverURLContainsFold applies the ContainsFold predicate on the "cover_url" field.

func CoverURLEQ

func CoverURLEQ(v string) predicate.Book

CoverURLEQ applies the EQ predicate on the "cover_url" field.

func CoverURLEqualFold

func CoverURLEqualFold(v string) predicate.Book

CoverURLEqualFold applies the EqualFold predicate on the "cover_url" field.

func CoverURLGT

func CoverURLGT(v string) predicate.Book

CoverURLGT applies the GT predicate on the "cover_url" field.

func CoverURLGTE

func CoverURLGTE(v string) predicate.Book

CoverURLGTE applies the GTE predicate on the "cover_url" field.

func CoverURLHasPrefix

func CoverURLHasPrefix(v string) predicate.Book

CoverURLHasPrefix applies the HasPrefix predicate on the "cover_url" field.

func CoverURLHasSuffix

func CoverURLHasSuffix(v string) predicate.Book

CoverURLHasSuffix applies the HasSuffix predicate on the "cover_url" field.

func CoverURLIn

func CoverURLIn(vs ...string) predicate.Book

CoverURLIn applies the In predicate on the "cover_url" field.

func CoverURLLT

func CoverURLLT(v string) predicate.Book

CoverURLLT applies the LT predicate on the "cover_url" field.

func CoverURLLTE

func CoverURLLTE(v string) predicate.Book

CoverURLLTE applies the LTE predicate on the "cover_url" field.

func CoverURLNEQ

func CoverURLNEQ(v string) predicate.Book

CoverURLNEQ applies the NEQ predicate on the "cover_url" field.

func CoverURLNotIn

func CoverURLNotIn(vs ...string) predicate.Book

CoverURLNotIn applies the NotIn predicate on the "cover_url" field.

func CreateAt

func CreateAt(v time.Time) predicate.Book

CreateAt applies equality check predicate on the "create_at" field. It's identical to CreateAtEQ.

func CreateAtEQ

func CreateAtEQ(v time.Time) predicate.Book

CreateAtEQ applies the EQ predicate on the "create_at" field.

func CreateAtGT

func CreateAtGT(v time.Time) predicate.Book

CreateAtGT applies the GT predicate on the "create_at" field.

func CreateAtGTE

func CreateAtGTE(v time.Time) predicate.Book

CreateAtGTE applies the GTE predicate on the "create_at" field.

func CreateAtIn

func CreateAtIn(vs ...time.Time) predicate.Book

CreateAtIn applies the In predicate on the "create_at" field.

func CreateAtLT

func CreateAtLT(v time.Time) predicate.Book

CreateAtLT applies the LT predicate on the "create_at" field.

func CreateAtLTE

func CreateAtLTE(v time.Time) predicate.Book

CreateAtLTE applies the LTE predicate on the "create_at" field.

func CreateAtNEQ

func CreateAtNEQ(v time.Time) predicate.Book

CreateAtNEQ applies the NEQ predicate on the "create_at" field.

func CreateAtNotIn

func CreateAtNotIn(vs ...time.Time) predicate.Book

CreateAtNotIn applies the NotIn predicate on the "create_at" field.

func HasAuthor

func HasAuthor() predicate.Book

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.Book

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

func HasOnLoans

func HasOnLoans() predicate.Book

HasOnLoans applies the HasEdge predicate on the "on_loans" edge.

func HasOnLoansWith

func HasOnLoansWith(preds ...predicate.BookLoan) predicate.Book

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

func ID

func ID(id uuid.UUID) predicate.Book

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Book

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Book

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Book

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Book

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Book

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Book

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Book

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Book

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Book) predicate.Book

Or groups predicates with the OR operator between them.

func Pages

func Pages(v uint16) predicate.Book

Pages applies equality check predicate on the "pages" field. It's identical to PagesEQ.

func PagesEQ

func PagesEQ(v uint16) predicate.Book

PagesEQ applies the EQ predicate on the "pages" field.

func PagesGT

func PagesGT(v uint16) predicate.Book

PagesGT applies the GT predicate on the "pages" field.

func PagesGTE

func PagesGTE(v uint16) predicate.Book

PagesGTE applies the GTE predicate on the "pages" field.

func PagesIn

func PagesIn(vs ...uint16) predicate.Book

PagesIn applies the In predicate on the "pages" field.

func PagesLT

func PagesLT(v uint16) predicate.Book

PagesLT applies the LT predicate on the "pages" field.

func PagesLTE

func PagesLTE(v uint16) predicate.Book

PagesLTE applies the LTE predicate on the "pages" field.

func PagesNEQ

func PagesNEQ(v uint16) predicate.Book

PagesNEQ applies the NEQ predicate on the "pages" field.

func PagesNotIn

func PagesNotIn(vs ...uint16) predicate.Book

PagesNotIn applies the NotIn predicate on the "pages" field.

func Title

func Title(v string) predicate.Book

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Book

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Book

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Book

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Book

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Book

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Book

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Book

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Book

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Book

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Book

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Book

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Book

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Book

TitleNotIn applies the NotIn predicate on the "title" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Book

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Book

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Book

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Book

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Book

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Book

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Book

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Book

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Book

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Category

type Category string

Category defines the type for the "category" enum field.

const (
	CategoryAction    Category = "Action"
	CategoryAdventure Category = "Adventure"
	CategoryFiction   Category = "Fiction"
	CategoryScience   Category = "Science"
)

Category values.

func (Category) String

func (c Category) String() string

Jump to

Keyboard shortcuts

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