generated

package
v0.0.0-...-37c7f33 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Equals

func (f BoolField) Equals(v bool) Where

Equals returns a WhereClause for this field.

func (BoolField) GreaterOrEqual

func (f BoolField) GreaterOrEqual(v bool) Where

GreaterOrEqual returns a WhereClause for this field.

func (BoolField) GreaterThan

func (f BoolField) GreaterThan(v bool) Where

GreaterThan returns a WhereClause for this field.

func (BoolField) In

func (f BoolField) In(vals []bool) InClause

In returns a WhereClause for this field.

func (BoolField) LessOrEqual

func (f BoolField) LessOrEqual(v bool) Where

LessOrEqual returns a WhereClause for this field.

func (BoolField) LessThan

func (f BoolField) LessThan(v bool) Where

LessThan returns a WhereClause for this field.

func (BoolField) NotEqual

func (f BoolField) NotEqual(v bool) Where

NotEqual 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.

func (HstoreHstoreField) LessThan

func (f HstoreHstoreField) LessThan(v hstore.Hstore) Where

LessThan returns a WhereClause for this field.

func (HstoreHstoreField) NotEqual

func (f HstoreHstoreField) NotEqual(v hstore.Hstore) Where

NotEqual 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.

func (InClause) String

func (in InClause) String(idx *int) string

func (InClause) Values

func (in InClause) Values() []interface{}

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) Equals

func (f IntField) Equals(v int) Where

Equals returns a WhereClause for this field.

func (IntField) GreaterOrEqual

func (f IntField) GreaterOrEqual(v int) Where

GreaterOrEqual returns a WhereClause for this field.

func (IntField) GreaterThan

func (f IntField) GreaterThan(v int) Where

GreaterThan returns a WhereClause for this field.

func (IntField) In

func (f IntField) In(vals []int) InClause

In returns a WhereClause for this field.

func (IntField) LessOrEqual

func (f IntField) LessOrEqual(v int) Where

LessOrEqual returns a WhereClause for this field.

func (IntField) LessThan

func (f IntField) LessThan(v int) Where

LessThan returns a WhereClause for this field.

func (IntField) NotEqual

func (f IntField) NotEqual(v int) Where

NotEqual 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

func (*Jsonb) Scan

func (j *Jsonb) Scan(src interface{}) error

Scan Unmarshalls the bytes[] back into a Jsonb object

func (Jsonb) Value

func (j Jsonb) Value() (driver.Value, error)

Value marshals the json into the database

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

type NullClause struct {
	Field string
	Null  bool
}

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

type OrderBy struct {
	Field string
	Order SortOrder
}

OrderBy indicates how rows should be sorted.

func OrderByAsc

func OrderByAsc(field string) OrderBy

OrderByAsc returns a sort order ascending by the given field.

func OrderByDesc

func OrderByDesc(field string) OrderBy

OrderByDesc returns a sort order descending by the given field.

func (OrderBy) String

func (o OrderBy) String() string

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.

func (PqNullTimeField) LessThan

func (f PqNullTimeField) LessThan(v pq.NullTime) Where

LessThan returns a WhereClause for this field.

func (PqNullTimeField) NotEqual

func (f PqNullTimeField) NotEqual(v pq.NullTime) Where

NotEqual 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.

const (
	OrderNone SortOrder = iota
	OrderDesc
	OrderAsc
)

Defined sort orders for not sorted, descending and ascending.

func (SortOrder) String

func (s SortOrder) String() string

String returns the sql string representation of this sort order.

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.

func (SqlNullBoolField) LessThan

func (f SqlNullBoolField) LessThan(v sql.NullBool) Where

LessThan returns a WhereClause for this field.

func (SqlNullBoolField) NotEqual

func (f SqlNullBoolField) NotEqual(v sql.NullBool) Where

NotEqual 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

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

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.

func (SqlNullInt64Field) LessThan

func (f SqlNullInt64Field) LessThan(v sql.NullInt64) Where

LessThan returns a WhereClause for this field.

func (SqlNullInt64Field) NotEqual

func (f SqlNullInt64Field) NotEqual(v sql.NullInt64) Where

NotEqual 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

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.

func (TimeTimeField) LessThan

func (f TimeTimeField) LessThan(v time.Time) Where

LessThan returns a WhereClause for this field.

func (TimeTimeField) NotEqual

func (f TimeTimeField) NotEqual(v time.Time) Where

NotEqual 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.

func (UuidNullUUIDField) LessThan

func (f UuidNullUUIDField) LessThan(v uuid.NullUUID) Where

LessThan returns a WhereClause for this field.

func (UuidNullUUIDField) NotEqual

func (f UuidNullUUIDField) NotEqual(v uuid.NullUUID) Where

NotEqual 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.

func (UuidUUIDField) LessThan

func (f UuidUUIDField) LessThan(v uuid.UUID) Where

LessThan returns a WhereClause for this field.

func (UuidUUIDField) NotEqual

func (f UuidUUIDField) NotEqual(v uuid.UUID) Where

NotEqual returns a WhereClause for this field.

type Where

type Where struct {
	Field string
	Comp  Comparison
	Value interface{}
}

func (Where) String

func (w Where) String(idx *int) string

func (Where) Values

func (w Where) Values() []interface{}

type WhereClause

type WhereClause interface {
	String(idx *int) string
	Values() []interface{}
}

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.

Directories

Path Synopsis
public

Jump to

Keyboard shortcuts

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