Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.KV) predicate.KV
- func CreatedAt(v time.Time) predicate.KV
- func CreatedAtEQ(v time.Time) predicate.KV
- func CreatedAtGT(v time.Time) predicate.KV
- func CreatedAtGTE(v time.Time) predicate.KV
- func CreatedAtIn(vs ...time.Time) predicate.KV
- func CreatedAtLT(v time.Time) predicate.KV
- func CreatedAtLTE(v time.Time) predicate.KV
- func CreatedAtNEQ(v time.Time) predicate.KV
- func CreatedAtNotIn(vs ...time.Time) predicate.KV
- func ExpiresAt(v time.Time) predicate.KV
- func ExpiresAtEQ(v time.Time) predicate.KV
- func ExpiresAtGT(v time.Time) predicate.KV
- func ExpiresAtGTE(v time.Time) predicate.KV
- func ExpiresAtIn(vs ...time.Time) predicate.KV
- func ExpiresAtIsNil() predicate.KV
- func ExpiresAtLT(v time.Time) predicate.KV
- func ExpiresAtLTE(v time.Time) predicate.KV
- func ExpiresAtNEQ(v time.Time) predicate.KV
- func ExpiresAtNotIn(vs ...time.Time) predicate.KV
- func ExpiresAtNotNil() predicate.KV
- func ID(id int) predicate.KV
- func IDEQ(id int) predicate.KV
- func IDGT(id int) predicate.KV
- func IDGTE(id int) predicate.KV
- func IDIn(ids ...int) predicate.KV
- func IDLT(id int) predicate.KV
- func IDLTE(id int) predicate.KV
- func IDNEQ(id int) predicate.KV
- func IDNotIn(ids ...int) predicate.KV
- func Key(v string) predicate.KV
- func KeyContains(v string) predicate.KV
- func KeyContainsFold(v string) predicate.KV
- func KeyEQ(v string) predicate.KV
- func KeyEqualFold(v string) predicate.KV
- func KeyGT(v string) predicate.KV
- func KeyGTE(v string) predicate.KV
- func KeyHasPrefix(v string) predicate.KV
- func KeyHasSuffix(v string) predicate.KV
- func KeyIn(vs ...string) predicate.KV
- func KeyLT(v string) predicate.KV
- func KeyLTE(v string) predicate.KV
- func KeyNEQ(v string) predicate.KV
- func KeyNotIn(vs ...string) predicate.KV
- func Not(p predicate.KV) predicate.KV
- func Or(predicates ...predicate.KV) predicate.KV
- func UpdatedAt(v time.Time) predicate.KV
- func UpdatedAtEQ(v time.Time) predicate.KV
- func UpdatedAtGT(v time.Time) predicate.KV
- func UpdatedAtGTE(v time.Time) predicate.KV
- func UpdatedAtIn(vs ...time.Time) predicate.KV
- func UpdatedAtLT(v time.Time) predicate.KV
- func UpdatedAtLTE(v time.Time) predicate.KV
- func UpdatedAtNEQ(v time.Time) predicate.KV
- func UpdatedAtNotIn(vs ...time.Time) predicate.KV
- func ValidColumn(column string) bool
- func Value(v string) predicate.KV
- func ValueContains(v string) predicate.KV
- func ValueContainsFold(v string) predicate.KV
- func ValueEQ(v string) predicate.KV
- func ValueEqualFold(v string) predicate.KV
- func ValueGT(v string) predicate.KV
- func ValueGTE(v string) predicate.KV
- func ValueHasPrefix(v string) predicate.KV
- func ValueHasSuffix(v string) predicate.KV
- func ValueIn(vs ...string) predicate.KV
- func ValueLT(v string) predicate.KV
- func ValueLTE(v string) predicate.KV
- func ValueNEQ(v string) predicate.KV
- func ValueNotIn(vs ...string) predicate.KV
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKey(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByValue(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the kv type in the database. Label = "kv" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldKey holds the string denoting the key field in the database. FieldKey = "key" // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // FieldExpiresAt holds the string denoting the expires_at field in the database. FieldExpiresAt = "expires_at" // Table holds the table name of the kv in the database. Table = "kvs" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt 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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldKey, FieldValue, FieldExpiresAt, }
Columns holds all SQL columns for kv fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func ExpiresAt ¶
ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
func ExpiresAtEQ ¶
ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
func ExpiresAtGT ¶
ExpiresAtGT applies the GT predicate on the "expires_at" field.
func ExpiresAtGTE ¶
ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
func ExpiresAtIn ¶
ExpiresAtIn applies the In predicate on the "expires_at" field.
func ExpiresAtIsNil ¶
ExpiresAtIsNil applies the IsNil predicate on the "expires_at" field.
func ExpiresAtLT ¶
ExpiresAtLT applies the LT predicate on the "expires_at" field.
func ExpiresAtLTE ¶
ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
func ExpiresAtNEQ ¶
ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
func ExpiresAtNotIn ¶
ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.
func ExpiresAtNotNil ¶
ExpiresAtNotNil applies the NotNil predicate on the "expires_at" field.
func KeyContains ¶
KeyContains applies the Contains predicate on the "key" field.
func KeyContainsFold ¶
KeyContainsFold applies the ContainsFold predicate on the "key" field.
func KeyEqualFold ¶
KeyEqualFold applies the EqualFold predicate on the "key" field.
func KeyHasPrefix ¶
KeyHasPrefix applies the HasPrefix predicate on the "key" field.
func KeyHasSuffix ¶
KeyHasSuffix applies the HasSuffix predicate on the "key" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Value ¶
Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func ValueContains ¶
ValueContains applies the Contains predicate on the "value" field.
func ValueContainsFold ¶
ValueContainsFold applies the ContainsFold predicate on the "value" field.
func ValueEqualFold ¶
ValueEqualFold applies the EqualFold predicate on the "value" field.
func ValueHasPrefix ¶
ValueHasPrefix applies the HasPrefix predicate on the "value" field.
func ValueHasSuffix ¶
ValueHasSuffix applies the HasSuffix predicate on the "value" field.
func ValueNotIn ¶
ValueNotIn applies the NotIn predicate on the "value" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the KV queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByExpiresAt ¶
func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
ByExpiresAt orders the results by the expires_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKey ¶
func ByKey(opts ...sql.OrderTermOption) OrderOption
ByKey orders the results by the key field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByValue ¶
func ByValue(opts ...sql.OrderTermOption) OrderOption
ByValue orders the results by the value field.