gnorm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

Equals returns a WhereClause for this field.

func (BoolField) GreaterOrEqual

func (f BoolField) GreaterOrEqual(v bool) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (BoolField) GreaterThan

func (f BoolField) GreaterThan(v bool) WhereClause

GreaterThan returns a WhereClause for this field.

func (BoolField) In

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

In returns a WhereClause for this field.

func (BoolField) LessOrEqual

func (f BoolField) LessOrEqual(v bool) WhereClause

LessOrEqual returns a WhereClause for this field.

func (BoolField) LessThan

func (f BoolField) LessThan(v bool) WhereClause

LessThan returns a WhereClause for this field.

func (BoolField) NotEqual

func (f BoolField) NotEqual(v bool) WhereClause

NotEqual returns a WhereClause for this field.

type DB

type DB interface {
	Exec(string, ...interface{}) (sql.Result, error)
	Query(string, ...interface{}) (*sql.Rows, error)
	QueryRow(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) WhereClause

Equals returns a WhereClause for this field.

func (Float64Field) GreaterOrEqual

func (f Float64Field) GreaterOrEqual(v float64) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (Float64Field) GreaterThan

func (f Float64Field) GreaterThan(v float64) WhereClause

GreaterThan returns a WhereClause for this field.

func (Float64Field) In

func (f Float64Field) In(vals []float64) WhereClause

In returns a WhereClause for this field.

func (Float64Field) LessOrEqual

func (f Float64Field) LessOrEqual(v float64) WhereClause

LessOrEqual returns a WhereClause for this field.

func (Float64Field) LessThan

func (f Float64Field) LessThan(v float64) WhereClause

LessThan returns a WhereClause for this field.

func (Float64Field) NotEqual

func (f Float64Field) NotEqual(v float64) WhereClause

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

Equals returns a WhereClause for this field.

func (Int64Field) GreaterOrEqual

func (f Int64Field) GreaterOrEqual(v int64) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (Int64Field) GreaterThan

func (f Int64Field) GreaterThan(v int64) WhereClause

GreaterThan returns a WhereClause for this field.

func (Int64Field) In

func (f Int64Field) In(vals []int64) WhereClause

In returns a WhereClause for this field.

func (Int64Field) LessOrEqual

func (f Int64Field) LessOrEqual(v int64) WhereClause

LessOrEqual returns a WhereClause for this field.

func (Int64Field) LessThan

func (f Int64Field) LessThan(v int64) WhereClause

LessThan returns a WhereClause for this field.

func (Int64Field) NotEqual

func (f Int64Field) NotEqual(v int64) WhereClause

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

Equals returns a WhereClause for this field.

func (IntField) GreaterOrEqual

func (f IntField) GreaterOrEqual(v int) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (IntField) GreaterThan

func (f IntField) GreaterThan(v int) WhereClause

GreaterThan returns a WhereClause for this field.

func (IntField) In

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

In returns a WhereClause for this field.

func (IntField) LessOrEqual

func (f IntField) LessOrEqual(v int) WhereClause

LessOrEqual returns a WhereClause for this field.

func (IntField) LessThan

func (f IntField) LessThan(v int) WhereClause

LessThan returns a WhereClause for this field.

func (IntField) NotEqual

func (f IntField) NotEqual(v int) WhereClause

NotEqual returns a WhereClause for this field.

type MysqlNullTimeField

type MysqlNullTimeField string

MysqlNullTimeField is a component that returns a WhereClause that contains a comparison based on its field and a strongly typed value.

func (MysqlNullTimeField) Equals

Equals returns a WhereClause for this field.

func (MysqlNullTimeField) GreaterOrEqual

func (f MysqlNullTimeField) GreaterOrEqual(v mysql.NullTime) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (MysqlNullTimeField) GreaterThan

func (f MysqlNullTimeField) GreaterThan(v mysql.NullTime) WhereClause

GreaterThan returns a WhereClause for this field.

func (MysqlNullTimeField) In

In returns a WhereClause for this field.

func (MysqlNullTimeField) LessOrEqual

func (f MysqlNullTimeField) LessOrEqual(v mysql.NullTime) WhereClause

LessOrEqual returns a WhereClause for this field.

func (MysqlNullTimeField) LessThan

LessThan returns a WhereClause for this field.

func (MysqlNullTimeField) NotEqual

NotEqual returns a WhereClause for this field.

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

Equals returns a WhereClause for this field.

func (SqlNullBoolField) GreaterOrEqual

func (f SqlNullBoolField) GreaterOrEqual(v sql.NullBool) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (SqlNullBoolField) GreaterThan

func (f SqlNullBoolField) GreaterThan(v sql.NullBool) WhereClause

GreaterThan returns a WhereClause for this field.

func (SqlNullBoolField) In

In returns a WhereClause for this field.

func (SqlNullBoolField) LessOrEqual

func (f SqlNullBoolField) LessOrEqual(v sql.NullBool) WhereClause

LessOrEqual returns a WhereClause for this field.

func (SqlNullBoolField) LessThan

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

LessThan returns a WhereClause for this field.

func (SqlNullBoolField) NotEqual

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

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

GreaterOrEqual returns a WhereClause for this field.

func (SqlNullFloat64Field) GreaterThan

GreaterThan returns a WhereClause for this field.

func (SqlNullFloat64Field) In

In returns a WhereClause for this field.

func (SqlNullFloat64Field) LessOrEqual

LessOrEqual returns a WhereClause for this field.

func (SqlNullFloat64Field) LessThan

LessThan returns a WhereClause for this field.

func (SqlNullFloat64Field) NotEqual

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

Equals returns a WhereClause for this field.

func (SqlNullInt64Field) GreaterOrEqual

func (f SqlNullInt64Field) GreaterOrEqual(v sql.NullInt64) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (SqlNullInt64Field) GreaterThan

func (f SqlNullInt64Field) GreaterThan(v sql.NullInt64) WhereClause

GreaterThan returns a WhereClause for this field.

func (SqlNullInt64Field) In

In returns a WhereClause for this field.

func (SqlNullInt64Field) LessOrEqual

func (f SqlNullInt64Field) LessOrEqual(v sql.NullInt64) WhereClause

LessOrEqual returns a WhereClause for this field.

func (SqlNullInt64Field) LessThan

LessThan returns a WhereClause for this field.

func (SqlNullInt64Field) NotEqual

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

Equals returns a WhereClause for this field.

func (SqlNullStringField) GreaterOrEqual

func (f SqlNullStringField) GreaterOrEqual(v sql.NullString) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (SqlNullStringField) GreaterThan

func (f SqlNullStringField) GreaterThan(v sql.NullString) WhereClause

GreaterThan returns a WhereClause for this field.

func (SqlNullStringField) In

In returns a WhereClause for this field.

func (SqlNullStringField) LessOrEqual

func (f SqlNullStringField) LessOrEqual(v sql.NullString) WhereClause

LessOrEqual returns a WhereClause for this field.

func (SqlNullStringField) LessThan

LessThan returns a WhereClause for this field.

func (SqlNullStringField) NotEqual

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

Equals returns a WhereClause for this field.

func (StringField) GreaterOrEqual

func (f StringField) GreaterOrEqual(v string) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (StringField) GreaterThan

func (f StringField) GreaterThan(v string) WhereClause

GreaterThan returns a WhereClause for this field.

func (StringField) In

func (f StringField) In(vals []string) WhereClause

In returns a WhereClause for this field.

func (StringField) LessOrEqual

func (f StringField) LessOrEqual(v string) WhereClause

LessOrEqual returns a WhereClause for this field.

func (StringField) LessThan

func (f StringField) LessThan(v string) WhereClause

LessThan returns a WhereClause for this field.

func (StringField) NotEqual

func (f StringField) NotEqual(v string) WhereClause

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

Equals returns a WhereClause for this field.

func (TimeTimeField) GreaterOrEqual

func (f TimeTimeField) GreaterOrEqual(v time.Time) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (TimeTimeField) GreaterThan

func (f TimeTimeField) GreaterThan(v time.Time) WhereClause

GreaterThan returns a WhereClause for this field.

func (TimeTimeField) In

func (f TimeTimeField) In(vals []time.Time) WhereClause

In returns a WhereClause for this field.

func (TimeTimeField) LessOrEqual

func (f TimeTimeField) LessOrEqual(v time.Time) WhereClause

LessOrEqual returns a WhereClause for this field.

func (TimeTimeField) LessThan

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

LessThan returns a WhereClause for this field.

func (TimeTimeField) NotEqual

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

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

Equals returns a WhereClause for this field.

func (Uint32Field) GreaterOrEqual

func (f Uint32Field) GreaterOrEqual(v uint32) WhereClause

GreaterOrEqual returns a WhereClause for this field.

func (Uint32Field) GreaterThan

func (f Uint32Field) GreaterThan(v uint32) WhereClause

GreaterThan returns a WhereClause for this field.

func (Uint32Field) In

func (f Uint32Field) In(vals []uint32) WhereClause

In returns a WhereClause for this field.

func (Uint32Field) LessOrEqual

func (f Uint32Field) LessOrEqual(v uint32) WhereClause

LessOrEqual returns a WhereClause for this field.

func (Uint32Field) LessThan

func (f Uint32Field) LessThan(v uint32) WhereClause

LessThan returns a WhereClause for this field.

func (Uint32Field) NotEqual

func (f Uint32Field) NotEqual(v uint32) WhereClause

NotEqual returns a WhereClause for this field.

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.

Jump to

Keyboard shortcuts

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