todo

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the todo type in the database.
	Label = "todo"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// FieldDone holds the string denoting the done field in the database.
	FieldDone = "done"
	// Table holds the table name of the todo in the database.
	Table = "todos"
)

Variables

View Source
var (
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
	// DefaultDone holds the default value on creation for the "done" field.
	DefaultDone bool
)
View Source
var Columns = []string{
	FieldID,
	FieldText,
	FieldDone,
}

Columns holds all SQL columns for todo fields.

Functions

func And

func And(predicates ...predicate.Todo) predicate.Todo

And groups predicates with the AND operator between them.

func Done

func Done(v bool) predicate.Todo

Done applies equality check predicate on the "done" field. It's identical to DoneEQ.

func DoneEQ

func DoneEQ(v bool) predicate.Todo

DoneEQ applies the EQ predicate on the "done" field.

func DoneNEQ

func DoneNEQ(v bool) predicate.Todo

DoneNEQ applies the NEQ predicate on the "done" field.

func ID

func ID(id int64) predicate.Todo

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Todo

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Todo

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Todo

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Todo

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Todo

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Todo

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Todo

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Todo

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.Todo) predicate.Todo

Or groups predicates with the OR operator between them.

func Text

func Text(v string) predicate.Todo

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Todo

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Todo

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Todo

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Todo

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Todo

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Todo

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Todo

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Todo

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Todo

TextIn applies the In predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Todo

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Todo

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Todo

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Todo

TextNotIn applies the NotIn predicate on the "text" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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