Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Book) predicate.Book
- func Author(v string) predicate.Book
- func AuthorContains(v string) predicate.Book
- func AuthorContainsFold(v string) predicate.Book
- func AuthorEQ(v string) predicate.Book
- func AuthorEqualFold(v string) predicate.Book
- func AuthorGT(v string) predicate.Book
- func AuthorGTE(v string) predicate.Book
- func AuthorHasPrefix(v string) predicate.Book
- func AuthorHasSuffix(v string) predicate.Book
- func AuthorIn(vs ...string) predicate.Book
- func AuthorLT(v string) predicate.Book
- func AuthorLTE(v string) predicate.Book
- func AuthorNEQ(v string) predicate.Book
- func AuthorNotIn(vs ...string) predicate.Book
- func Category(v string) predicate.Book
- func CategoryContains(v string) predicate.Book
- func CategoryContainsFold(v string) predicate.Book
- func CategoryEQ(v string) predicate.Book
- func CategoryEqualFold(v string) predicate.Book
- func CategoryGT(v string) predicate.Book
- func CategoryGTE(v string) predicate.Book
- func CategoryHasPrefix(v string) predicate.Book
- func CategoryHasSuffix(v string) predicate.Book
- func CategoryIn(vs ...string) predicate.Book
- func CategoryLT(v string) predicate.Book
- func CategoryLTE(v string) predicate.Book
- func CategoryNEQ(v string) predicate.Book
- func CategoryNotIn(vs ...string) predicate.Book
- func Description(v string) predicate.Book
- func DescriptionContains(v string) predicate.Book
- func DescriptionContainsFold(v string) predicate.Book
- func DescriptionEQ(v string) predicate.Book
- func DescriptionEqualFold(v string) predicate.Book
- func DescriptionGT(v string) predicate.Book
- func DescriptionGTE(v string) predicate.Book
- func DescriptionHasPrefix(v string) predicate.Book
- func DescriptionHasSuffix(v string) predicate.Book
- func DescriptionIn(vs ...string) predicate.Book
- func DescriptionLT(v string) predicate.Book
- func DescriptionLTE(v string) predicate.Book
- func DescriptionNEQ(v string) predicate.Book
- func DescriptionNotIn(vs ...string) predicate.Book
- func Featured(v bool) predicate.Book
- func FeaturedEQ(v bool) predicate.Book
- func FeaturedNEQ(v bool) predicate.Book
- func ID(id string) predicate.Book
- func IDContainsFold(id string) predicate.Book
- func IDEQ(id string) predicate.Book
- func IDEqualFold(id string) predicate.Book
- func IDGT(id string) predicate.Book
- func IDGTE(id string) predicate.Book
- func IDIn(ids ...string) predicate.Book
- func IDLT(id string) predicate.Book
- func IDLTE(id string) predicate.Book
- func IDNEQ(id string) predicate.Book
- func IDNotIn(ids ...string) predicate.Book
- func ImageLink(v string) predicate.Book
- func ImageLinkContains(v string) predicate.Book
- func ImageLinkContainsFold(v string) predicate.Book
- func ImageLinkEQ(v string) predicate.Book
- func ImageLinkEqualFold(v string) predicate.Book
- func ImageLinkGT(v string) predicate.Book
- func ImageLinkGTE(v string) predicate.Book
- func ImageLinkHasPrefix(v string) predicate.Book
- func ImageLinkHasSuffix(v string) predicate.Book
- func ImageLinkIn(vs ...string) predicate.Book
- func ImageLinkLT(v string) predicate.Book
- func ImageLinkLTE(v string) predicate.Book
- func ImageLinkNEQ(v string) predicate.Book
- func ImageLinkNotIn(vs ...string) predicate.Book
- func Not(p predicate.Book) predicate.Book
- func Or(predicates ...predicate.Book) predicate.Book
- func Summary(v string) predicate.Book
- func SummaryContains(v string) predicate.Book
- func SummaryContainsFold(v string) predicate.Book
- func SummaryEQ(v string) predicate.Book
- func SummaryEqualFold(v string) predicate.Book
- func SummaryGT(v string) predicate.Book
- func SummaryGTE(v string) predicate.Book
- func SummaryHasPrefix(v string) predicate.Book
- func SummaryHasSuffix(v string) predicate.Book
- func SummaryIn(vs ...string) predicate.Book
- func SummaryLT(v string) predicate.Book
- func SummaryLTE(v string) predicate.Book
- func SummaryNEQ(v string) predicate.Book
- func SummaryNotIn(vs ...string) predicate.Book
- func Title(v string) predicate.Book
- func TitleContains(v string) predicate.Book
- func TitleContainsFold(v string) predicate.Book
- func TitleEQ(v string) predicate.Book
- func TitleEqualFold(v string) predicate.Book
- func TitleGT(v string) predicate.Book
- func TitleGTE(v string) predicate.Book
- func TitleHasPrefix(v string) predicate.Book
- func TitleHasSuffix(v string) predicate.Book
- func TitleIn(vs ...string) predicate.Book
- func TitleLT(v string) predicate.Book
- func TitleLTE(v string) predicate.Book
- func TitleNEQ(v string) predicate.Book
- func TitleNotIn(vs ...string) predicate.Book
- func ValidColumn(column string) bool
- type OrderOption
- func ByAuthor(opts ...sql.OrderTermOption) OrderOption
- func ByCategory(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByFeatured(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByImageLink(opts ...sql.OrderTermOption) OrderOption
- func BySummary(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldAuthor holds the string denoting the author field in the database. FieldAuthor = "author" // FieldSummary holds the string denoting the summary field in the database. FieldSummary = "summary" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldCategory holds the string denoting the category field in the database. FieldCategory = "category" // FieldImageLink holds the string denoting the image_link field in the database. FieldImageLink = "image_link" // FieldFeatured holds the string denoting the featured field in the database. FieldFeatured = "featured" // Table holds the table name of the book in the database. Table = "books" )
Variables ¶
var ( // TitleValidator is a validator for the "title" field. It is called by the builders before save. TitleValidator func(string) error // AuthorValidator is a validator for the "author" field. It is called by the builders before save. AuthorValidator func(string) error // SummaryValidator is a validator for the "summary" field. It is called by the builders before save. SummaryValidator func(string) error // DescriptionValidator is a validator for the "description" field. It is called by the builders before save. DescriptionValidator func(string) error // CategoryValidator is a validator for the "category" field. It is called by the builders before save. CategoryValidator func(string) error // ImageLinkValidator is a validator for the "image_link" field. It is called by the builders before save. ImageLinkValidator func(string) error // DefaultFeatured holds the default value on creation for the "featured" field. DefaultFeatured bool // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldTitle, FieldAuthor, FieldSummary, FieldDescription, FieldCategory, FieldImageLink, FieldFeatured, }
Columns holds all SQL columns for book fields.
Functions ¶
func Author ¶
Author applies equality check predicate on the "author" field. It's identical to AuthorEQ.
func AuthorContains ¶
AuthorContains applies the Contains predicate on the "author" field.
func AuthorContainsFold ¶
AuthorContainsFold applies the ContainsFold predicate on the "author" field.
func AuthorEqualFold ¶
AuthorEqualFold applies the EqualFold predicate on the "author" field.
func AuthorHasPrefix ¶
AuthorHasPrefix applies the HasPrefix predicate on the "author" field.
func AuthorHasSuffix ¶
AuthorHasSuffix applies the HasSuffix predicate on the "author" field.
func AuthorNotIn ¶
AuthorNotIn applies the NotIn predicate on the "author" field.
func Category ¶
Category applies equality check predicate on the "category" field. It's identical to CategoryEQ.
func CategoryContains ¶
CategoryContains applies the Contains predicate on the "category" field.
func CategoryContainsFold ¶
CategoryContainsFold applies the ContainsFold predicate on the "category" field.
func CategoryEQ ¶
CategoryEQ applies the EQ predicate on the "category" field.
func CategoryEqualFold ¶
CategoryEqualFold applies the EqualFold predicate on the "category" field.
func CategoryGT ¶
CategoryGT applies the GT predicate on the "category" field.
func CategoryGTE ¶
CategoryGTE applies the GTE predicate on the "category" field.
func CategoryHasPrefix ¶
CategoryHasPrefix applies the HasPrefix predicate on the "category" field.
func CategoryHasSuffix ¶
CategoryHasSuffix applies the HasSuffix predicate on the "category" field.
func CategoryIn ¶
CategoryIn applies the In predicate on the "category" field.
func CategoryLT ¶
CategoryLT applies the LT predicate on the "category" field.
func CategoryLTE ¶
CategoryLTE applies the LTE predicate on the "category" field.
func CategoryNEQ ¶
CategoryNEQ applies the NEQ predicate on the "category" field.
func CategoryNotIn ¶
CategoryNotIn applies the NotIn predicate on the "category" field.
func Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func Featured ¶
Featured applies equality check predicate on the "featured" field. It's identical to FeaturedEQ.
func FeaturedEQ ¶
FeaturedEQ applies the EQ predicate on the "featured" field.
func FeaturedNEQ ¶
FeaturedNEQ applies the NEQ predicate on the "featured" field.
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func ImageLink ¶
ImageLink applies equality check predicate on the "image_link" field. It's identical to ImageLinkEQ.
func ImageLinkContains ¶
ImageLinkContains applies the Contains predicate on the "image_link" field.
func ImageLinkContainsFold ¶
ImageLinkContainsFold applies the ContainsFold predicate on the "image_link" field.
func ImageLinkEQ ¶
ImageLinkEQ applies the EQ predicate on the "image_link" field.
func ImageLinkEqualFold ¶
ImageLinkEqualFold applies the EqualFold predicate on the "image_link" field.
func ImageLinkGT ¶
ImageLinkGT applies the GT predicate on the "image_link" field.
func ImageLinkGTE ¶
ImageLinkGTE applies the GTE predicate on the "image_link" field.
func ImageLinkHasPrefix ¶
ImageLinkHasPrefix applies the HasPrefix predicate on the "image_link" field.
func ImageLinkHasSuffix ¶
ImageLinkHasSuffix applies the HasSuffix predicate on the "image_link" field.
func ImageLinkIn ¶
ImageLinkIn applies the In predicate on the "image_link" field.
func ImageLinkLT ¶
ImageLinkLT applies the LT predicate on the "image_link" field.
func ImageLinkLTE ¶
ImageLinkLTE applies the LTE predicate on the "image_link" field.
func ImageLinkNEQ ¶
ImageLinkNEQ applies the NEQ predicate on the "image_link" field.
func ImageLinkNotIn ¶
ImageLinkNotIn applies the NotIn predicate on the "image_link" field.
func Summary ¶
Summary applies equality check predicate on the "summary" field. It's identical to SummaryEQ.
func SummaryContains ¶
SummaryContains applies the Contains predicate on the "summary" field.
func SummaryContainsFold ¶
SummaryContainsFold applies the ContainsFold predicate on the "summary" field.
func SummaryEqualFold ¶
SummaryEqualFold applies the EqualFold predicate on the "summary" field.
func SummaryGTE ¶
SummaryGTE applies the GTE predicate on the "summary" field.
func SummaryHasPrefix ¶
SummaryHasPrefix applies the HasPrefix predicate on the "summary" field.
func SummaryHasSuffix ¶
SummaryHasSuffix applies the HasSuffix predicate on the "summary" field.
func SummaryLTE ¶
SummaryLTE applies the LTE predicate on the "summary" field.
func SummaryNEQ ¶
SummaryNEQ applies the NEQ predicate on the "summary" field.
func SummaryNotIn ¶
SummaryNotIn applies the NotIn predicate on the "summary" field.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" 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 Book queries.
func ByAuthor ¶
func ByAuthor(opts ...sql.OrderTermOption) OrderOption
ByAuthor orders the results by the author field.
func ByCategory ¶
func ByCategory(opts ...sql.OrderTermOption) OrderOption
ByCategory orders the results by the category field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByFeatured ¶
func ByFeatured(opts ...sql.OrderTermOption) OrderOption
ByFeatured orders the results by the featured field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByImageLink ¶
func ByImageLink(opts ...sql.OrderTermOption) OrderOption
ByImageLink orders the results by the image_link field.
func BySummary ¶
func BySummary(opts ...sql.OrderTermOption) OrderOption
BySummary orders the results by the summary field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.