Documentation
¶
Index ¶
- Variables
- type BoolField
- func (f BoolField) Equals(v bool) Where
- func (f BoolField) GreaterOrEqual(v bool) Where
- func (f BoolField) GreaterThan(v bool) Where
- func (f BoolField) In(vals []bool) InClause
- func (f BoolField) LessOrEqual(v bool) Where
- func (f BoolField) LessThan(v bool) Where
- func (f BoolField) NotEqual(v bool) Where
- type Bytea
- type ByteaField
- func (f ByteaField) Equals(v Bytea) Where
- func (f ByteaField) GreaterOrEqual(v Bytea) Where
- func (f ByteaField) GreaterThan(v Bytea) Where
- func (f ByteaField) In(vals []Bytea) InClause
- func (f ByteaField) LessOrEqual(v Bytea) Where
- func (f ByteaField) LessThan(v Bytea) Where
- func (f ByteaField) NotEqual(v Bytea) Where
- type Comparison
- type DB
- type Float64Field
- func (f Float64Field) Equals(v float64) Where
- func (f Float64Field) GreaterOrEqual(v float64) Where
- func (f Float64Field) GreaterThan(v float64) Where
- func (f Float64Field) In(vals []float64) InClause
- func (f Float64Field) LessOrEqual(v float64) Where
- func (f Float64Field) LessThan(v float64) Where
- func (f Float64Field) NotEqual(v float64) Where
- type HstoreHstoreField
- func (f HstoreHstoreField) Equals(v hstore.Hstore) Where
- func (f HstoreHstoreField) GreaterOrEqual(v hstore.Hstore) Where
- func (f HstoreHstoreField) GreaterThan(v hstore.Hstore) Where
- func (f HstoreHstoreField) In(vals []hstore.Hstore) InClause
- func (f HstoreHstoreField) LessOrEqual(v hstore.Hstore) Where
- func (f HstoreHstoreField) LessThan(v hstore.Hstore) Where
- func (f HstoreHstoreField) NotEqual(v hstore.Hstore) Where
- type InClause
- type Int32Field
- func (f Int32Field) Equals(v int32) Where
- func (f Int32Field) GreaterOrEqual(v int32) Where
- func (f Int32Field) GreaterThan(v int32) Where
- func (f Int32Field) In(vals []int32) InClause
- func (f Int32Field) LessOrEqual(v int32) Where
- func (f Int32Field) LessThan(v int32) Where
- func (f Int32Field) NotEqual(v int32) Where
- type Int64Field
- func (f Int64Field) Equals(v int64) Where
- func (f Int64Field) GreaterOrEqual(v int64) Where
- func (f Int64Field) GreaterThan(v int64) Where
- func (f Int64Field) In(vals []int64) InClause
- func (f Int64Field) LessOrEqual(v int64) Where
- func (f Int64Field) LessThan(v int64) Where
- func (f Int64Field) NotEqual(v int64) Where
- type IntField
- type Jsonb
- type JsonbField
- func (f JsonbField) Equals(v Jsonb) Where
- func (f JsonbField) GreaterOrEqual(v Jsonb) Where
- func (f JsonbField) GreaterThan(v Jsonb) Where
- func (f JsonbField) In(vals []Jsonb) InClause
- func (f JsonbField) IsNotNull() NullClause
- func (f JsonbField) IsNull() NullClause
- func (f JsonbField) LessOrEqual(v Jsonb) Where
- func (f JsonbField) LessThan(v Jsonb) Where
- func (f JsonbField) NotEqual(v Jsonb) Where
- type NullClause
- type OrderBy
- type PqNullTimeField
- func (f PqNullTimeField) Equals(v pq.NullTime) Where
- func (f PqNullTimeField) GreaterOrEqual(v pq.NullTime) Where
- func (f PqNullTimeField) GreaterThan(v pq.NullTime) Where
- func (f PqNullTimeField) In(vals []pq.NullTime) InClause
- func (f PqNullTimeField) IsNotNull() NullClause
- func (f PqNullTimeField) IsNull() NullClause
- func (f PqNullTimeField) LessOrEqual(v pq.NullTime) Where
- func (f PqNullTimeField) LessThan(v pq.NullTime) Where
- func (f PqNullTimeField) NotEqual(v pq.NullTime) Where
- type PrefixMatch
- type SortOrder
- type SqlNullBoolField
- func (f SqlNullBoolField) Equals(v sql.NullBool) Where
- func (f SqlNullBoolField) GreaterOrEqual(v sql.NullBool) Where
- func (f SqlNullBoolField) GreaterThan(v sql.NullBool) Where
- func (f SqlNullBoolField) In(vals []sql.NullBool) InClause
- func (f SqlNullBoolField) IsNotNull() NullClause
- func (f SqlNullBoolField) IsNull() NullClause
- func (f SqlNullBoolField) LessOrEqual(v sql.NullBool) Where
- func (f SqlNullBoolField) LessThan(v sql.NullBool) Where
- func (f SqlNullBoolField) NotEqual(v sql.NullBool) Where
- type SqlNullFloat64Field
- func (f SqlNullFloat64Field) Equals(v sql.NullFloat64) Where
- func (f SqlNullFloat64Field) GreaterOrEqual(v sql.NullFloat64) Where
- func (f SqlNullFloat64Field) GreaterThan(v sql.NullFloat64) Where
- func (f SqlNullFloat64Field) In(vals []sql.NullFloat64) InClause
- func (f SqlNullFloat64Field) IsNotNull() NullClause
- func (f SqlNullFloat64Field) IsNull() NullClause
- func (f SqlNullFloat64Field) LessOrEqual(v sql.NullFloat64) Where
- func (f SqlNullFloat64Field) LessThan(v sql.NullFloat64) Where
- func (f SqlNullFloat64Field) NotEqual(v sql.NullFloat64) Where
- type SqlNullInt64Field
- func (f SqlNullInt64Field) Equals(v sql.NullInt64) Where
- func (f SqlNullInt64Field) GreaterOrEqual(v sql.NullInt64) Where
- func (f SqlNullInt64Field) GreaterThan(v sql.NullInt64) Where
- func (f SqlNullInt64Field) In(vals []sql.NullInt64) InClause
- func (f SqlNullInt64Field) IsNotNull() NullClause
- func (f SqlNullInt64Field) IsNull() NullClause
- func (f SqlNullInt64Field) LessOrEqual(v sql.NullInt64) Where
- func (f SqlNullInt64Field) LessThan(v sql.NullInt64) Where
- func (f SqlNullInt64Field) NotEqual(v sql.NullInt64) Where
- type SqlNullStringField
- func (f SqlNullStringField) Equals(v sql.NullString) Where
- func (f SqlNullStringField) GreaterOrEqual(v sql.NullString) Where
- func (f SqlNullStringField) GreaterThan(v sql.NullString) Where
- func (f SqlNullStringField) In(vals []sql.NullString) InClause
- func (f SqlNullStringField) IsNotNull() NullClause
- func (f SqlNullStringField) IsNull() NullClause
- func (f SqlNullStringField) LessOrEqual(v sql.NullString) Where
- func (f SqlNullStringField) LessThan(v sql.NullString) Where
- func (f SqlNullStringField) NotEqual(v sql.NullString) Where
- type StringField
- func (f StringField) Equals(v string) Where
- func (f StringField) GreaterOrEqual(v string) Where
- func (f StringField) GreaterThan(v string) Where
- func (f StringField) In(vals []string) InClause
- func (f StringField) LessOrEqual(v string) Where
- func (f StringField) LessThan(v string) Where
- func (f StringField) NotEqual(v string) Where
- type TimeTimeField
- func (f TimeTimeField) Equals(v time.Time) Where
- func (f TimeTimeField) GreaterOrEqual(v time.Time) Where
- func (f TimeTimeField) GreaterThan(v time.Time) Where
- func (f TimeTimeField) In(vals []time.Time) InClause
- func (f TimeTimeField) LessOrEqual(v time.Time) Where
- func (f TimeTimeField) LessThan(v time.Time) Where
- func (f TimeTimeField) NotEqual(v time.Time) Where
- type Uint32Field
- func (f Uint32Field) Equals(v uint32) Where
- func (f Uint32Field) GreaterOrEqual(v uint32) Where
- func (f Uint32Field) GreaterThan(v uint32) Where
- func (f Uint32Field) In(vals []uint32) InClause
- func (f Uint32Field) LessOrEqual(v uint32) Where
- func (f Uint32Field) LessThan(v uint32) Where
- func (f Uint32Field) NotEqual(v uint32) Where
- type UuidNullUUIDField
- func (f UuidNullUUIDField) Equals(v uuid.NullUUID) Where
- func (f UuidNullUUIDField) GreaterOrEqual(v uuid.NullUUID) Where
- func (f UuidNullUUIDField) GreaterThan(v uuid.NullUUID) Where
- func (f UuidNullUUIDField) In(vals []uuid.NullUUID) InClause
- func (f UuidNullUUIDField) IsNotNull() NullClause
- func (f UuidNullUUIDField) IsNull() NullClause
- func (f UuidNullUUIDField) LessOrEqual(v uuid.NullUUID) Where
- func (f UuidNullUUIDField) LessThan(v uuid.NullUUID) Where
- func (f UuidNullUUIDField) NotEqual(v uuid.NullUUID) Where
- type UuidUUIDField
- func (f UuidUUIDField) Equals(v uuid.UUID) Where
- func (f UuidUUIDField) GreaterOrEqual(v uuid.UUID) Where
- func (f UuidUUIDField) GreaterThan(v uuid.UUID) Where
- func (f UuidUUIDField) In(vals []uuid.UUID) InClause
- func (f UuidUUIDField) LessOrEqual(v uuid.UUID) Where
- func (f UuidUUIDField) LessThan(v uuid.UUID) Where
- func (f UuidUUIDField) NotEqual(v uuid.UUID) Where
- type Where
- type WhereClause
Constants ¶
This section is empty.
Variables ¶
var UnOrdered = OrderBy{}
UnOrdered is a convenience value to make it clear you're not sorting a query.
Functions ¶
This section is empty.
Types ¶
type BoolField ¶
type BoolField string
BoolField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (BoolField) GreaterOrEqual ¶
GreaterOrEqual returns a WhereClause for this field.
func (BoolField) GreaterThan ¶
GreaterThan returns a WhereClause for this field.
func (BoolField) LessOrEqual ¶
LessOrEqual returns a WhereClause for this field.
type Bytea ¶
type Bytea []byte
Bytea is a wrapper around byte arrays specifically for bytea column types in postgres.
type ByteaField ¶
type ByteaField string
ByteaField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (ByteaField) Equals ¶
func (f ByteaField) Equals(v Bytea) Where
Equals returns a WhereClause for this field.
func (ByteaField) GreaterOrEqual ¶
func (f ByteaField) GreaterOrEqual(v Bytea) Where
GreaterOrEqual returns a WhereClause for this field.
func (ByteaField) GreaterThan ¶
func (f ByteaField) GreaterThan(v Bytea) Where
GreaterThan returns a WhereClause for this field.
func (ByteaField) In ¶
func (f ByteaField) In(vals []Bytea) InClause
In returns a WhereClause for this field.
func (ByteaField) LessOrEqual ¶
func (f ByteaField) LessOrEqual(v Bytea) Where
LessOrEqual returns a WhereClause for this field.
func (ByteaField) LessThan ¶
func (f ByteaField) LessThan(v Bytea) Where
LessThan returns a WhereClause for this field.
func (ByteaField) NotEqual ¶
func (f ByteaField) NotEqual(v Bytea) Where
NotEqual returns a WhereClause for this field.
type Comparison ¶
type Comparison string
Comparison is used by WhereClauses to create valid sql.
const ( CompEqual Comparison = " = " CompGreater Comparison = " > " CompLess Comparison = " < " CompGTE Comparison = " >= " CompLTE Comparison = " <= " CompNE Comparison = " <> " )
Comparison types.
type DB ¶
type DB interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) QueryRowContext(context.Context, string, ...interface{}) *sql.Row }
DB is the common interface for database operations.
This should work with database/sql.DB and database/sql.Tx.
type Float64Field ¶
type Float64Field string
Float64Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (Float64Field) Equals ¶
func (f Float64Field) Equals(v float64) Where
Equals returns a WhereClause for this field.
func (Float64Field) GreaterOrEqual ¶
func (f Float64Field) GreaterOrEqual(v float64) Where
GreaterOrEqual returns a WhereClause for this field.
func (Float64Field) GreaterThan ¶
func (f Float64Field) GreaterThan(v float64) Where
GreaterThan returns a WhereClause for this field.
func (Float64Field) In ¶
func (f Float64Field) In(vals []float64) InClause
In returns a WhereClause for this field.
func (Float64Field) LessOrEqual ¶
func (f Float64Field) LessOrEqual(v float64) Where
LessOrEqual returns a WhereClause for this field.
func (Float64Field) LessThan ¶
func (f Float64Field) LessThan(v float64) Where
LessThan returns a WhereClause for this field.
func (Float64Field) NotEqual ¶
func (f Float64Field) NotEqual(v float64) Where
NotEqual returns a WhereClause for this field.
type HstoreHstoreField ¶
type HstoreHstoreField string
HstoreHstoreField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (HstoreHstoreField) Equals ¶
func (f HstoreHstoreField) Equals(v hstore.Hstore) Where
Equals returns a WhereClause for this field.
func (HstoreHstoreField) GreaterOrEqual ¶
func (f HstoreHstoreField) GreaterOrEqual(v hstore.Hstore) Where
GreaterOrEqual returns a WhereClause for this field.
func (HstoreHstoreField) GreaterThan ¶
func (f HstoreHstoreField) GreaterThan(v hstore.Hstore) Where
GreaterThan returns a WhereClause for this field.
func (HstoreHstoreField) In ¶
func (f HstoreHstoreField) In(vals []hstore.Hstore) InClause
In returns a WhereClause for this field.
func (HstoreHstoreField) LessOrEqual ¶
func (f HstoreHstoreField) LessOrEqual(v hstore.Hstore) Where
LessOrEqual returns a WhereClause for this field.
type InClause ¶
type InClause struct { Field string Vals []interface{} }
InClause takes a slice of values that it matches against.
type Int32Field ¶
type Int32Field string
Int32Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (Int32Field) Equals ¶
func (f Int32Field) Equals(v int32) Where
Equals returns a WhereClause for this field.
func (Int32Field) GreaterOrEqual ¶
func (f Int32Field) GreaterOrEqual(v int32) Where
GreaterOrEqual returns a WhereClause for this field.
func (Int32Field) GreaterThan ¶
func (f Int32Field) GreaterThan(v int32) Where
GreaterThan returns a WhereClause for this field.
func (Int32Field) In ¶
func (f Int32Field) In(vals []int32) InClause
In returns a WhereClause for this field.
func (Int32Field) LessOrEqual ¶
func (f Int32Field) LessOrEqual(v int32) Where
LessOrEqual returns a WhereClause for this field.
func (Int32Field) LessThan ¶
func (f Int32Field) LessThan(v int32) Where
LessThan returns a WhereClause for this field.
func (Int32Field) NotEqual ¶
func (f Int32Field) NotEqual(v int32) Where
NotEqual returns a WhereClause for this field.
type Int64Field ¶
type Int64Field string
Int64Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (Int64Field) Equals ¶
func (f Int64Field) Equals(v int64) Where
Equals returns a WhereClause for this field.
func (Int64Field) GreaterOrEqual ¶
func (f Int64Field) GreaterOrEqual(v int64) Where
GreaterOrEqual returns a WhereClause for this field.
func (Int64Field) GreaterThan ¶
func (f Int64Field) GreaterThan(v int64) Where
GreaterThan returns a WhereClause for this field.
func (Int64Field) In ¶
func (f Int64Field) In(vals []int64) InClause
In returns a WhereClause for this field.
func (Int64Field) LessOrEqual ¶
func (f Int64Field) LessOrEqual(v int64) Where
LessOrEqual returns a WhereClause for this field.
func (Int64Field) LessThan ¶
func (f Int64Field) LessThan(v int64) Where
LessThan returns a WhereClause for this field.
func (Int64Field) NotEqual ¶
func (f Int64Field) NotEqual(v int64) Where
NotEqual returns a WhereClause for this field.
type IntField ¶
type IntField string
IntField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (IntField) GreaterOrEqual ¶
GreaterOrEqual returns a WhereClause for this field.
func (IntField) GreaterThan ¶
GreaterThan returns a WhereClause for this field.
func (IntField) LessOrEqual ¶
LessOrEqual returns a WhereClause for this field.
type Jsonb ¶
type Jsonb map[string]interface{}
Jsonb is a wrapper for map[string]interface{} for storing json into postgres
type JsonbField ¶
type JsonbField string
JsonbField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (JsonbField) Equals ¶
func (f JsonbField) Equals(v Jsonb) Where
Equals returns a WhereClause for this field.
func (JsonbField) GreaterOrEqual ¶
func (f JsonbField) GreaterOrEqual(v Jsonb) Where
GreaterOrEqual returns a WhereClause for this field.
func (JsonbField) GreaterThan ¶
func (f JsonbField) GreaterThan(v Jsonb) Where
GreaterThan returns a WhereClause for this field.
func (JsonbField) In ¶
func (f JsonbField) In(vals []Jsonb) InClause
In returns a WhereClause for this field.
func (JsonbField) IsNotNull ¶
func (f JsonbField) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (JsonbField) IsNull ¶
func (f JsonbField) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (JsonbField) LessOrEqual ¶
func (f JsonbField) LessOrEqual(v Jsonb) Where
LessOrEqual returns a WhereClause for this field.
func (JsonbField) LessThan ¶
func (f JsonbField) LessThan(v Jsonb) Where
LessThan returns a WhereClause for this field.
func (JsonbField) NotEqual ¶
func (f JsonbField) NotEqual(v Jsonb) Where
NotEqual returns a WhereClause for this field.
type NullClause ¶
NullClause is a clause that checks for a column being null or not.
func (NullClause) String ¶
func (n NullClause) String(idx *int) string
func (NullClause) Values ¶
func (n NullClause) Values() []interface{}
type OrderBy ¶
OrderBy indicates how rows should be sorted.
func OrderByAsc ¶
OrderByAsc returns a sort order ascending by the given field.
func OrderByDesc ¶
OrderByDesc returns a sort order descending by the given field.
type PqNullTimeField ¶
type PqNullTimeField string
PqNullTimeField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (PqNullTimeField) Equals ¶
func (f PqNullTimeField) Equals(v pq.NullTime) Where
Equals returns a WhereClause for this field.
func (PqNullTimeField) GreaterOrEqual ¶
func (f PqNullTimeField) GreaterOrEqual(v pq.NullTime) Where
GreaterOrEqual returns a WhereClause for this field.
func (PqNullTimeField) GreaterThan ¶
func (f PqNullTimeField) GreaterThan(v pq.NullTime) Where
GreaterThan returns a WhereClause for this field.
func (PqNullTimeField) In ¶
func (f PqNullTimeField) In(vals []pq.NullTime) InClause
In returns a WhereClause for this field.
func (PqNullTimeField) IsNotNull ¶
func (f PqNullTimeField) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (PqNullTimeField) IsNull ¶
func (f PqNullTimeField) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (PqNullTimeField) LessOrEqual ¶
func (f PqNullTimeField) LessOrEqual(v pq.NullTime) Where
LessOrEqual returns a WhereClause for this field.
type PrefixMatch ¶
type PrefixMatch struct { Field string Value interface{} }
func (PrefixMatch) String ¶
func (w PrefixMatch) String(idx *int) string
func (PrefixMatch) Values ¶
func (w PrefixMatch) Values() []interface{}
type SortOrder ¶
type SortOrder int
SortOrder defines how to order rows returned.
Defined sort orders for not sorted, descending and ascending.
type SqlNullBoolField ¶
type SqlNullBoolField string
SqlNullBoolField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (SqlNullBoolField) Equals ¶
func (f SqlNullBoolField) Equals(v sql.NullBool) Where
Equals returns a WhereClause for this field.
func (SqlNullBoolField) GreaterOrEqual ¶
func (f SqlNullBoolField) GreaterOrEqual(v sql.NullBool) Where
GreaterOrEqual returns a WhereClause for this field.
func (SqlNullBoolField) GreaterThan ¶
func (f SqlNullBoolField) GreaterThan(v sql.NullBool) Where
GreaterThan returns a WhereClause for this field.
func (SqlNullBoolField) In ¶
func (f SqlNullBoolField) In(vals []sql.NullBool) InClause
In returns a WhereClause for this field.
func (SqlNullBoolField) IsNotNull ¶
func (f SqlNullBoolField) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (SqlNullBoolField) IsNull ¶
func (f SqlNullBoolField) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (SqlNullBoolField) LessOrEqual ¶
func (f SqlNullBoolField) LessOrEqual(v sql.NullBool) Where
LessOrEqual returns a WhereClause for this field.
type SqlNullFloat64Field ¶
type SqlNullFloat64Field string
SqlNullFloat64Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (SqlNullFloat64Field) Equals ¶
func (f SqlNullFloat64Field) Equals(v sql.NullFloat64) Where
Equals returns a WhereClause for this field.
func (SqlNullFloat64Field) GreaterOrEqual ¶
func (f SqlNullFloat64Field) GreaterOrEqual(v sql.NullFloat64) Where
GreaterOrEqual returns a WhereClause for this field.
func (SqlNullFloat64Field) GreaterThan ¶
func (f SqlNullFloat64Field) GreaterThan(v sql.NullFloat64) Where
GreaterThan returns a WhereClause for this field.
func (SqlNullFloat64Field) In ¶
func (f SqlNullFloat64Field) In(vals []sql.NullFloat64) InClause
In returns a WhereClause for this field.
func (SqlNullFloat64Field) IsNotNull ¶
func (f SqlNullFloat64Field) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (SqlNullFloat64Field) IsNull ¶
func (f SqlNullFloat64Field) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (SqlNullFloat64Field) LessOrEqual ¶
func (f SqlNullFloat64Field) LessOrEqual(v sql.NullFloat64) Where
LessOrEqual returns a WhereClause for this field.
func (SqlNullFloat64Field) LessThan ¶
func (f SqlNullFloat64Field) LessThan(v sql.NullFloat64) Where
LessThan returns a WhereClause for this field.
func (SqlNullFloat64Field) NotEqual ¶
func (f SqlNullFloat64Field) NotEqual(v sql.NullFloat64) Where
NotEqual returns a WhereClause for this field.
type SqlNullInt64Field ¶
type SqlNullInt64Field string
SqlNullInt64Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (SqlNullInt64Field) Equals ¶
func (f SqlNullInt64Field) Equals(v sql.NullInt64) Where
Equals returns a WhereClause for this field.
func (SqlNullInt64Field) GreaterOrEqual ¶
func (f SqlNullInt64Field) GreaterOrEqual(v sql.NullInt64) Where
GreaterOrEqual returns a WhereClause for this field.
func (SqlNullInt64Field) GreaterThan ¶
func (f SqlNullInt64Field) GreaterThan(v sql.NullInt64) Where
GreaterThan returns a WhereClause for this field.
func (SqlNullInt64Field) In ¶
func (f SqlNullInt64Field) In(vals []sql.NullInt64) InClause
In returns a WhereClause for this field.
func (SqlNullInt64Field) IsNotNull ¶
func (f SqlNullInt64Field) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (SqlNullInt64Field) IsNull ¶
func (f SqlNullInt64Field) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (SqlNullInt64Field) LessOrEqual ¶
func (f SqlNullInt64Field) LessOrEqual(v sql.NullInt64) Where
LessOrEqual returns a WhereClause for this field.
type SqlNullStringField ¶
type SqlNullStringField string
SqlNullStringField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (SqlNullStringField) Equals ¶
func (f SqlNullStringField) Equals(v sql.NullString) Where
Equals returns a WhereClause for this field.
func (SqlNullStringField) GreaterOrEqual ¶
func (f SqlNullStringField) GreaterOrEqual(v sql.NullString) Where
GreaterOrEqual returns a WhereClause for this field.
func (SqlNullStringField) GreaterThan ¶
func (f SqlNullStringField) GreaterThan(v sql.NullString) Where
GreaterThan returns a WhereClause for this field.
func (SqlNullStringField) In ¶
func (f SqlNullStringField) In(vals []sql.NullString) InClause
In returns a WhereClause for this field.
func (SqlNullStringField) IsNotNull ¶
func (f SqlNullStringField) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (SqlNullStringField) IsNull ¶
func (f SqlNullStringField) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (SqlNullStringField) LessOrEqual ¶
func (f SqlNullStringField) LessOrEqual(v sql.NullString) Where
LessOrEqual returns a WhereClause for this field.
func (SqlNullStringField) LessThan ¶
func (f SqlNullStringField) LessThan(v sql.NullString) Where
LessThan returns a WhereClause for this field.
func (SqlNullStringField) NotEqual ¶
func (f SqlNullStringField) NotEqual(v sql.NullString) Where
NotEqual returns a WhereClause for this field.
type StringField ¶
type StringField string
StringField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (StringField) Equals ¶
func (f StringField) Equals(v string) Where
Equals returns a WhereClause for this field.
func (StringField) GreaterOrEqual ¶
func (f StringField) GreaterOrEqual(v string) Where
GreaterOrEqual returns a WhereClause for this field.
func (StringField) GreaterThan ¶
func (f StringField) GreaterThan(v string) Where
GreaterThan returns a WhereClause for this field.
func (StringField) In ¶
func (f StringField) In(vals []string) InClause
In returns a WhereClause for this field.
func (StringField) LessOrEqual ¶
func (f StringField) LessOrEqual(v string) Where
LessOrEqual returns a WhereClause for this field.
func (StringField) LessThan ¶
func (f StringField) LessThan(v string) Where
LessThan returns a WhereClause for this field.
func (StringField) NotEqual ¶
func (f StringField) NotEqual(v string) Where
NotEqual returns a WhereClause for this field.
type TimeTimeField ¶
type TimeTimeField string
TimeTimeField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (TimeTimeField) Equals ¶
func (f TimeTimeField) Equals(v time.Time) Where
Equals returns a WhereClause for this field.
func (TimeTimeField) GreaterOrEqual ¶
func (f TimeTimeField) GreaterOrEqual(v time.Time) Where
GreaterOrEqual returns a WhereClause for this field.
func (TimeTimeField) GreaterThan ¶
func (f TimeTimeField) GreaterThan(v time.Time) Where
GreaterThan returns a WhereClause for this field.
func (TimeTimeField) In ¶
func (f TimeTimeField) In(vals []time.Time) InClause
In returns a WhereClause for this field.
func (TimeTimeField) LessOrEqual ¶
func (f TimeTimeField) LessOrEqual(v time.Time) Where
LessOrEqual returns a WhereClause for this field.
type Uint32Field ¶
type Uint32Field string
Uint32Field is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (Uint32Field) Equals ¶
func (f Uint32Field) Equals(v uint32) Where
Equals returns a WhereClause for this field.
func (Uint32Field) GreaterOrEqual ¶
func (f Uint32Field) GreaterOrEqual(v uint32) Where
GreaterOrEqual returns a WhereClause for this field.
func (Uint32Field) GreaterThan ¶
func (f Uint32Field) GreaterThan(v uint32) Where
GreaterThan returns a WhereClause for this field.
func (Uint32Field) In ¶
func (f Uint32Field) In(vals []uint32) InClause
In returns a WhereClause for this field.
func (Uint32Field) LessOrEqual ¶
func (f Uint32Field) LessOrEqual(v uint32) Where
LessOrEqual returns a WhereClause for this field.
func (Uint32Field) LessThan ¶
func (f Uint32Field) LessThan(v uint32) Where
LessThan returns a WhereClause for this field.
func (Uint32Field) NotEqual ¶
func (f Uint32Field) NotEqual(v uint32) Where
NotEqual returns a WhereClause for this field.
type UuidNullUUIDField ¶
type UuidNullUUIDField string
UuidNullUUIDField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (UuidNullUUIDField) Equals ¶
func (f UuidNullUUIDField) Equals(v uuid.NullUUID) Where
Equals returns a WhereClause for this field.
func (UuidNullUUIDField) GreaterOrEqual ¶
func (f UuidNullUUIDField) GreaterOrEqual(v uuid.NullUUID) Where
GreaterOrEqual returns a WhereClause for this field.
func (UuidNullUUIDField) GreaterThan ¶
func (f UuidNullUUIDField) GreaterThan(v uuid.NullUUID) Where
GreaterThan returns a WhereClause for this field.
func (UuidNullUUIDField) In ¶
func (f UuidNullUUIDField) In(vals []uuid.NullUUID) InClause
In returns a WhereClause for this field.
func (UuidNullUUIDField) IsNotNull ¶
func (f UuidNullUUIDField) IsNotNull() NullClause
IsNotNull returns a WhereClause that matches when this field is not NULL.
func (UuidNullUUIDField) IsNull ¶
func (f UuidNullUUIDField) IsNull() NullClause
IsNull returns a WhereClause that matches when this field is NULL.
func (UuidNullUUIDField) LessOrEqual ¶
func (f UuidNullUUIDField) LessOrEqual(v uuid.NullUUID) Where
LessOrEqual returns a WhereClause for this field.
type UuidUUIDField ¶
type UuidUUIDField string
UuidUUIDField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.
func (UuidUUIDField) Equals ¶
func (f UuidUUIDField) Equals(v uuid.UUID) Where
Equals returns a WhereClause for this field.
func (UuidUUIDField) GreaterOrEqual ¶
func (f UuidUUIDField) GreaterOrEqual(v uuid.UUID) Where
GreaterOrEqual returns a WhereClause for this field.
func (UuidUUIDField) GreaterThan ¶
func (f UuidUUIDField) GreaterThan(v uuid.UUID) Where
GreaterThan returns a WhereClause for this field.
func (UuidUUIDField) In ¶
func (f UuidUUIDField) In(vals []uuid.UUID) InClause
In returns a WhereClause for this field.
func (UuidUUIDField) LessOrEqual ¶
func (f UuidUUIDField) LessOrEqual(v uuid.UUID) Where
LessOrEqual returns a WhereClause for this field.
type Where ¶
type Where struct { Field string Comp Comparison Value interface{} }
type WhereClause ¶
WhereClause has a String function should return a properly formatted where clause (not including the WHERE) for positional arguments starting at idx.
func AndClause ¶
func AndClause(wheres ...WhereClause) WhereClause
AndClause returns a WhereClause that serializes to the AND of all the given where clauses.
func OrClause ¶
func OrClause(wheres ...WhereClause) WhereClause
OrClause returns a WhereClause that serializes to the OR of all the given where clauses.