Documentation ¶
Overview ¶
Package orm is a generated protocol buffer package.
It is generated from these files:
geometry.proto
It has these top-level messages:
Geometry
Index ¶
- func BuildQuery(components ...interface{}) (string, []interface{})
- func HashStrings(objects ...string) string
- func ISODate() string
- func IsNullInt(v int32) bool
- func JoinAsString(v []interface{}) string
- func RandUID() int32
- func Stringify(v interface{}, opts ...interface{}) string
- func ToSQLBlob(buf []byte) sql.NullString
- func ToSQLBool(v interface{}) sql.NullBool
- func ToSQLDate(v interface{}) mysql.NullTime
- func ToSQLFloat64(v interface{}) sql.NullFloat64
- func ToSQLInt64(v interface{}) sql.NullInt64
- func ToSQLString(value interface{}) sql.NullString
- func ToString(v interface{}) string
- func ToTimestamp(t mysql.NullTime) *tspb.Timestamp
- func ToTimestampNow() *tspb.Timestamp
- func UUID() string
- type AndOr
- type ColumnDef
- func Column(name string) ColumnDef
- func ColumnAlias(name, alias string) ColumnDef
- func ColumnExpr(expr string) ColumnDef
- func ColumnExprAlias(expr, alias string) ColumnDef
- func Count(column string) ColumnDef
- func CountAlias(column, alias string) ColumnDef
- func Max(column string) ColumnDef
- func MaxAlias(column, alias string) ColumnDef
- func Min(column string) ColumnDef
- func MinAlias(column, alias string) ColumnDef
- func Sum(column string) ColumnDef
- func SumAlias(column, alias string) ColumnDef
- func TableColumn(table, name string) ColumnDef
- func TableColumnAlias(table, name, alias string) ColumnDef
- type ConditionDef
- func IsEqual(name string, value interface{}) ConditionDef
- func IsEqualExpr(expr string, value interface{}) ConditionDef
- func IsGreaterThan(name string, value interface{}) ConditionDef
- func IsGreaterThanEqual(name string, value interface{}) ConditionDef
- func IsGreaterThanEqualExpr(expr string, value interface{}) ConditionDef
- func IsGreaterThanExpr(expr string, value interface{}) ConditionDef
- func IsIn(name string, value []interface{}) ConditionDef
- func IsInExpr(expr string, value []interface{}) ConditionDef
- func IsLessThan(name string, value interface{}) ConditionDef
- func IsLessThanEqual(name string, value interface{}) ConditionDef
- func IsLessThanEqualExpr(expr string, value interface{}) ConditionDef
- func IsLessThanExpr(expr string, value interface{}) ConditionDef
- func IsNotEqual(name string, value interface{}) ConditionDef
- func IsNotEqualExpr(expr string, value interface{}) ConditionDef
- func IsNotExpr(expr string) ConditionDef
- func IsNotNull(name string) ConditionDef
- func IsNull(name string) ConditionDef
- func IsNullExpr(expr string) ConditionDef
- type ConditionGroupDef
- type Direction
- type Geometry
- type GroupDef
- type JoinDef
- type LimitDef
- type NullIntType
- type Operator
- type OrderDef
- type RangeDef
- type TableDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQuery ¶
func BuildQuery(components ...interface{}) (string, []interface{})
func HashStrings ¶
HashStrings will return a SHA256 hash of the provided arguments
func JoinAsString ¶
func JoinAsString(v []interface{}) string
JoinAsString will join the array passed as a string which is comma separated
func Stringify ¶
func Stringify(v interface{}, opts ...interface{}) string
Stringify will return a JSON formatted string. pass an optional second argument to pretty print
func ToSQLBlob ¶
func ToSQLBlob(buf []byte) sql.NullString
ToSQLBlob returns a sql.NullString from the value
func ToSQLFloat64 ¶
func ToSQLFloat64(v interface{}) sql.NullFloat64
ToSQLFloat64 returns a sql.NullFloat64 from the value
func ToSQLInt64 ¶
ToSQLInt64 returns a sql.NullInt64 from the value
func ToSQLString ¶
func ToSQLString(value interface{}) sql.NullString
ToSQLString returns a sql.NullString for value passed
func ToString ¶
func ToString(v interface{}) string
ToString returns a string representation for the value passed
func ToTimestamp ¶
ToTimestamp returns a proto Timestamp from a mysql.NullTime
func ToTimestampNow ¶
ToTimestampNow returns the proto Timestamp from curent time
Types ¶
type ColumnDef ¶
func ColumnAlias ¶
func ColumnExpr ¶
func ColumnExprAlias ¶
func CountAlias ¶
func TableColumn ¶
func TableColumnAlias ¶
type ConditionDef ¶
type ConditionDef struct { Name string Func string Operator Operator OperatorExpr string Value interface{} }
func IsEqual ¶
func IsEqual(name string, value interface{}) ConditionDef
func IsEqualExpr ¶
func IsEqualExpr(expr string, value interface{}) ConditionDef
func IsGreaterThan ¶
func IsGreaterThan(name string, value interface{}) ConditionDef
func IsGreaterThanEqual ¶
func IsGreaterThanEqual(name string, value interface{}) ConditionDef
func IsGreaterThanEqualExpr ¶
func IsGreaterThanEqualExpr(expr string, value interface{}) ConditionDef
func IsGreaterThanExpr ¶
func IsGreaterThanExpr(expr string, value interface{}) ConditionDef
func IsIn ¶
func IsIn(name string, value []interface{}) ConditionDef
func IsInExpr ¶
func IsInExpr(expr string, value []interface{}) ConditionDef
func IsLessThan ¶
func IsLessThan(name string, value interface{}) ConditionDef
func IsLessThanEqual ¶
func IsLessThanEqual(name string, value interface{}) ConditionDef
func IsLessThanEqualExpr ¶
func IsLessThanEqualExpr(expr string, value interface{}) ConditionDef
func IsLessThanExpr ¶
func IsLessThanExpr(expr string, value interface{}) ConditionDef
func IsNotEqual ¶
func IsNotEqual(name string, value interface{}) ConditionDef
func IsNotEqualExpr ¶
func IsNotEqualExpr(expr string, value interface{}) ConditionDef
func IsNotExpr ¶
func IsNotExpr(expr string) ConditionDef
func IsNotNull ¶
func IsNotNull(name string) ConditionDef
func IsNull ¶
func IsNull(name string) ConditionDef
func IsNullExpr ¶
func IsNullExpr(expr string) ConditionDef
func (ConditionDef) AddValue ¶
func (f ConditionDef) AddValue(array []interface{}) []interface{}
func (ConditionDef) String ¶
func (f ConditionDef) String() string
type ConditionGroupDef ¶
type ConditionGroupDef struct { Conditions []ConditionDef AndOr AndOr }
func AndGrouping ¶
func AndGrouping(conditions ...ConditionDef) ConditionGroupDef
func OrGrouping ¶
func OrGrouping(conditions ...ConditionDef) ConditionGroupDef
func (*ConditionGroupDef) Add ¶
func (g *ConditionGroupDef) Add(conditions ...ConditionDef)
func (ConditionGroupDef) AddValue ¶
func (g ConditionGroupDef) AddValue(params []interface{}) []interface{}
func (ConditionGroupDef) String ¶
func (g ConditionGroupDef) String() string
type Geometry ¶
type Geometry struct { Latitude float32 `protobuf:"fixed32,1,opt,name=latitude" json:"latitude,omitempty"` Longitude float32 `protobuf:"fixed32,2,opt,name=longitude" json:"longitude,omitempty"` }
func ToGeometry ¶
ToGeometry will return a Geometry from a POINT string
func (*Geometry) Descriptor ¶
func (*Geometry) GetLatitude ¶
func (*Geometry) GetLongitude ¶
func (*Geometry) ProtoMessage ¶
func (*Geometry) ProtoMessage()
type NullIntType ¶
type NullIntType int32
NullIntType is a special null type int32
const NullInt32 NullIntType = -2147483647
NullInt32 is a magic int32 which represents null
func (*NullIntType) Scan ¶
func (v *NullIntType) Scan(value interface{}) error
Scan will do the proper deserialization for SQL inserting
func (NullIntType) String ¶
func (v NullIntType) String() string
type Operator ¶
type Operator string
const ( OperatorEqual Operator = "=" OperatorNotEqual Operator = "!=" OperatorGreaterThan Operator = ">" OperatorLessThan Operator = "<" OperatorGreaterThanEqual Operator = ">=" OperatorLessThanEqual Operator = "<=" OperatorNull Operator = "IS NULL" OperatorNotNull Operator = "IS NOT NULL" OperatorIn Operator = "IN" )