Documentation
¶
Overview ¶
Package goradd_unit contains the object relational model for the goradd_unit database.
Queries use a builder pattern, started with a Query* function. Add functions to the builder to further constrain the query, using nodes from the node package to refer to tables and columns in the database. End the query with either a Load call to get a list of items, a Get call to get one item, or a Count call to count the number of items in the query.
Some Examples
projects := model.QueryProjects().Load()
Returns all the projects in the database.
projects := model.QueryProjects().
Join(node.Project().Manager()).
Where(op.GreaterOrEqual(node.Project().StartDate(), time.NewDate(2006, 1, 1)).
OrderBy(node.Project().Num()).
Load()
Returns the projects that started in 2006 or later, with the manager objects attached, and ordered by project number. To get the manager of the first project returned, you can do this:
firstManager := projects[0].Manager()
See the goradd-orm documentation for more information.
Index ¶
- Constants
- func ClearAll(ctx context.Context)
- func CountAltLeafUns(ctx context.Context) (int, error)
- func CountAltLeafUnsByAltRootUnID(ctx context.Context, altRootUnID float32) (int, error)
- func CountAltRootUns(ctx context.Context) (int, error)
- func CountAutoGens(ctx context.Context) (int, error)
- func CountDoubleIndices(ctx context.Context) (int, error)
- func CountDoubleIndicesByField2IntField2String(ctx context.Context, field2Int int, field2String string) (int, error)
- func CountDoubleIndicesByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string) (int, error)
- func CountLeafLs(ctx context.Context) (int, error)
- func CountLeafLsByRootLID(ctx context.Context, rootLID query.AutoPrimaryKey) (int, error)
- func CountLeafNls(ctx context.Context) (int, error)
- func CountLeafNlsByRootNlID(ctx context.Context, rootNlID query.AutoPrimaryKey) (int, error)
- func CountLeafNs(ctx context.Context) (int, error)
- func CountLeafNsByRootNID(ctx context.Context, rootNID query.AutoPrimaryKey) (int, error)
- func CountLeafUls(ctx context.Context) (int, error)
- func CountLeafUlsByRootUlID(ctx context.Context, rootUlID query.AutoPrimaryKey) (int, error)
- func CountLeafUnls(ctx context.Context) (int, error)
- func CountLeafUnlsByRootUnlID(ctx context.Context, rootUnlID query.AutoPrimaryKey) (int, error)
- func CountLeafUns(ctx context.Context) (int, error)
- func CountLeafUnsByRootUnID(ctx context.Context, rootUnID query.AutoPrimaryKey) (int, error)
- func CountLeafUs(ctx context.Context) (int, error)
- func CountLeafUsByRootUID(ctx context.Context, rootUID query.AutoPrimaryKey) (int, error)
- func CountLeafs(ctx context.Context) (int, error)
- func CountLeafsByRootID(ctx context.Context, rootID query.AutoPrimaryKey) (int, error)
- func CountMultiParents(ctx context.Context) (int, error)
- func CountMultiParentsByParent1ID(ctx context.Context, parent1ID query.AutoPrimaryKey) (int, error)
- func CountMultiParentsByParent2ID(ctx context.Context, parent2ID query.AutoPrimaryKey) (int, error)
- func CountRootLs(ctx context.Context) (int, error)
- func CountRootNls(ctx context.Context) (int, error)
- func CountRootNs(ctx context.Context) (int, error)
- func CountRootUls(ctx context.Context) (int, error)
- func CountRootUnls(ctx context.Context) (int, error)
- func CountRootUns(ctx context.Context) (int, error)
- func CountRootUs(ctx context.Context) (int, error)
- func CountRoots(ctx context.Context) (int, error)
- func CountTimeoutTests(ctx context.Context) (int, error)
- func CountTwoKeys(ctx context.Context) (int, error)
- func CountTypeTests(ctx context.Context) (int, error)
- func CountUnsupportedTypes(ctx context.Context) (int, error)
- func CountUnsupportedTypesByTypeMultFk1TypeMultiFk2(ctx context.Context, typeMultFk1 string, typeMultiFk2 string) (int, error)
- func Database() db.DatabaseI
- func DeleteAltLeafUn(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteAltRootUn(ctx context.Context, pk float32) error
- func DeleteAutoGen(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteDoubleIndex(ctx context.Context, pk int) error
- func DeleteLeaf(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafL(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafN(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafNl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafU(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafUl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafUn(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteLeafUnl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteMultiParent(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRoot(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootL(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootN(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootNl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootU(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootUl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootUn(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteRootUnl(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteTimeoutTest(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteTwoKey(ctx context.Context, pk TwoKeyPrimaryKey) error
- func DeleteTypeTest(ctx context.Context, pk query.AutoPrimaryKey) error
- func DeleteUnsupportedType(ctx context.Context, pk uint64) error
- func HasAltLeafUn(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasAltLeafUnByAltRootUnID(ctx context.Context, altRootUnID interface{}) (bool, error)
- func HasAltRootUn(ctx context.Context, pk float32) (bool, error)
- func HasAutoGen(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasDoubleIndex(ctx context.Context, pk int) (bool, error)
- func HasDoubleIndexByField2IntField2String(ctx context.Context, field2Int interface{}, field2String interface{}) (bool, error)
- func HasDoubleIndexByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string) (bool, error)
- func HasLeaf(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafByRootID(ctx context.Context, rootID query.AutoPrimaryKey) (bool, error)
- func HasLeafL(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafLByRootLID(ctx context.Context, rootLID query.AutoPrimaryKey) (bool, error)
- func HasLeafN(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafNByRootNID(ctx context.Context, rootNID interface{}) (bool, error)
- func HasLeafNl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafNlByRootNlID(ctx context.Context, rootNlID interface{}) (bool, error)
- func HasLeafU(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafUByRootUID(ctx context.Context, rootUID query.AutoPrimaryKey) (bool, error)
- func HasLeafUl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafUlByRootUlID(ctx context.Context, rootUlID query.AutoPrimaryKey) (bool, error)
- func HasLeafUn(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafUnByRootUnID(ctx context.Context, rootUnID interface{}) (bool, error)
- func HasLeafUnl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasLeafUnlByRootUnlID(ctx context.Context, rootUnlID interface{}) (bool, error)
- func HasMultiParent(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasMultiParentByParent1ID(ctx context.Context, parent1ID interface{}) (bool, error)
- func HasMultiParentByParent2ID(ctx context.Context, parent2ID interface{}) (bool, error)
- func HasRoot(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootL(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootN(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootNl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootU(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootUl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootUn(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasRootUnl(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasTimeoutTest(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasTwoKey(ctx context.Context, pk TwoKeyPrimaryKey) (bool, error)
- func HasTypeTest(ctx context.Context, pk query.AutoPrimaryKey) (bool, error)
- func HasUnsupportedType(ctx context.Context, pk uint64) (bool, error)
- func HasUnsupportedTypeByTypeMultFk1TypeMultiFk2(ctx context.Context, typeMultFk1 string, typeMultiFk2 string) (bool, error)
- func InitDB()
- func JsonDecodeAll(ctx context.Context, reader io.Reader) error
- func JsonEncodeAll(ctx context.Context, writer io.Writer) error
- type AltLeafUn
- func (o *AltLeafUn) AltRootUn() *AltRootUn
- func (o *AltLeafUn) AltRootUnID() float32
- func (o *AltLeafUn) AltRootUnIDIsLoaded() bool
- func (o *AltLeafUn) AltRootUnIDIsNull() bool
- func (o *AltLeafUn) Copy() (newObject *AltLeafUn)
- func (o *AltLeafUn) Delete(ctx context.Context) (err error)
- func (o *AltLeafUn) Get(key string) interface{}
- func (o *AltLeafUn) GetAlias(aliasKey string) query.AliasValue
- func (o *AltLeafUn) ID() query.AutoPrimaryKey
- func (o *AltLeafUn) IDIsLoaded() bool
- func (o *AltLeafUn) Initialize()
- func (o *AltLeafUn) IsDirty() (dirty bool)
- func (o *AltLeafUn) IsNew() bool
- func (o *AltLeafUn) Key() string
- func (o *AltLeafUn) Label() string
- func (o *AltLeafUn) LoadAltRootUn(ctx context.Context) (*AltRootUn, error)
- func (o *AltLeafUn) MarshalBinary() ([]byte, error)
- func (o *AltLeafUn) MarshalJSON() (data []byte, err error)
- func (o *AltLeafUn) MarshalStringMap() map[string]interface{}
- func (o *AltLeafUn) Name() string
- func (o *AltLeafUn) NameIsLoaded() bool
- func (o *AltLeafUn) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *AltLeafUn) PrimaryKey() query.AutoPrimaryKey
- func (o *AltLeafUn) Save(ctx context.Context) error
- func (o *AltLeafUn) SetAltRootUn(altRootUn *AltRootUn)
- func (o *AltLeafUn) SetAltRootUnID(v float32)
- func (o *AltLeafUn) SetAltRootUnIDToNull()
- func (o *AltLeafUn) SetID(v query.AutoPrimaryKey)
- func (o *AltLeafUn) SetName(v string)
- func (o *AltLeafUn) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *AltLeafUn) String() string
- func (o *AltLeafUn) UnmarshalBinary(data []byte) (err error)
- func (o *AltLeafUn) UnmarshalJSON(data []byte) (err error)
- func (o *AltLeafUn) UnmarshalStringMap(m map[string]interface{}) (err error)
- type AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Count() (int, error)
- func (b *AltLeafUnBuilder) Distinct() *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Get() (*AltLeafUn, error)
- func (b *AltLeafUnBuilder) GroupBy(nodes ...query.Node) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Having(node query.Node) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Limit(maxRowCount int, offset int) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Load() (altLeafUns []*AltLeafUn, err error)
- func (b *AltLeafUnBuilder) LoadCursor() (altLeafUnsCursor, error)
- func (b *AltLeafUnBuilder) LoadI() (altLeafUns []query.OrmObj, err error)
- func (b *AltLeafUnBuilder) OrderBy(nodes ...query.Sorter) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Select(nodes ...query.Node) *AltLeafUnBuilder
- func (b *AltLeafUnBuilder) Where(c query.Node) *AltLeafUnBuilder
- type AltRootUn
- func (o *AltRootUn) AltLeafUn() *AltLeafUn
- func (o *AltRootUn) Copy() (newObject *AltRootUn)
- func (o *AltRootUn) Delete(ctx context.Context) (err error)
- func (o *AltRootUn) Get(key string) interface{}
- func (o *AltRootUn) GetAlias(aliasKey string) query.AliasValue
- func (o *AltRootUn) ID() float32
- func (o *AltRootUn) IDIsLoaded() bool
- func (o *AltRootUn) Initialize()
- func (o *AltRootUn) IsDirty() (dirty bool)
- func (o *AltRootUn) IsNew() bool
- func (o *AltRootUn) Key() string
- func (o *AltRootUn) Label() string
- func (o *AltRootUn) LoadAltLeafUn(ctx context.Context) (*AltLeafUn, error)
- func (o *AltRootUn) MarshalBinary() ([]byte, error)
- func (o *AltRootUn) MarshalJSON() (data []byte, err error)
- func (o *AltRootUn) MarshalStringMap() map[string]interface{}
- func (o *AltRootUn) Name() string
- func (o *AltRootUn) NameIsLoaded() bool
- func (o *AltRootUn) OriginalPrimaryKey() float32
- func (o *AltRootUn) PrimaryKey() float32
- func (o *AltRootUn) Save(ctx context.Context) error
- func (o *AltRootUn) SetAltLeafUn(obj *AltLeafUn)
- func (o *AltRootUn) SetID(v float32)
- func (o *AltRootUn) SetName(v string)
- func (o *AltRootUn) SetPrimaryKey(v float32)
- func (o *AltRootUn) String() string
- func (o *AltRootUn) UnmarshalBinary(data []byte) (err error)
- func (o *AltRootUn) UnmarshalJSON(data []byte) (err error)
- func (o *AltRootUn) UnmarshalStringMap(m map[string]interface{}) (err error)
- type AltRootUnBuilder
- func (b *AltRootUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Count() (int, error)
- func (b *AltRootUnBuilder) Distinct() *AltRootUnBuilder
- func (b *AltRootUnBuilder) Get() (*AltRootUn, error)
- func (b *AltRootUnBuilder) GroupBy(nodes ...query.Node) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Having(node query.Node) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Limit(maxRowCount int, offset int) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Load() (altRootUns []*AltRootUn, err error)
- func (b *AltRootUnBuilder) LoadCursor() (altRootUnsCursor, error)
- func (b *AltRootUnBuilder) LoadI() (altRootUns []query.OrmObj, err error)
- func (b *AltRootUnBuilder) OrderBy(nodes ...query.Sorter) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Select(nodes ...query.Node) *AltRootUnBuilder
- func (b *AltRootUnBuilder) Where(c query.Node) *AltRootUnBuilder
- type AutoGen
- func (o *AutoGen) Copy() (newObject *AutoGen)
- func (o *AutoGen) Created() time.Time
- func (o *AutoGen) CreatedIsLoaded() bool
- func (o *AutoGen) Delete(ctx context.Context) (err error)
- func (o *AutoGen) Get(key string) interface{}
- func (o *AutoGen) GetAlias(aliasKey string) query.AliasValue
- func (o *AutoGen) GroLock() int64
- func (o *AutoGen) GroLockIsLoaded() bool
- func (o *AutoGen) GroTimestamp() int64
- func (o *AutoGen) GroTimestampIsLoaded() bool
- func (o *AutoGen) ID() query.AutoPrimaryKey
- func (o *AutoGen) IDIsLoaded() bool
- func (o *AutoGen) Initialize()
- func (o *AutoGen) IsDirty() (dirty bool)
- func (o *AutoGen) IsNew() bool
- func (o *AutoGen) Key() string
- func (o *AutoGen) Label() string
- func (o *AutoGen) MarshalBinary() ([]byte, error)
- func (o *AutoGen) MarshalJSON() (data []byte, err error)
- func (o *AutoGen) MarshalStringMap() map[string]interface{}
- func (o *AutoGen) Modified() time.Time
- func (o *AutoGen) ModifiedIsLoaded() bool
- func (o *AutoGen) ModifiedIsNull() bool
- func (o *AutoGen) Name() string
- func (o *AutoGen) NameIsLoaded() bool
- func (o *AutoGen) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *AutoGen) PrimaryKey() query.AutoPrimaryKey
- func (o *AutoGen) Save(ctx context.Context) error
- func (o *AutoGen) SetID(v query.AutoPrimaryKey)
- func (o *AutoGen) SetName(v string)
- func (o *AutoGen) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *AutoGen) String() string
- func (o *AutoGen) UnmarshalBinary(data []byte) (err error)
- func (o *AutoGen) UnmarshalJSON(data []byte) (err error)
- func (o *AutoGen) UnmarshalStringMap(m map[string]interface{}) (err error)
- type AutoGenBuilder
- func (b *AutoGenBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AutoGenBuilder
- func (b *AutoGenBuilder) Count() (int, error)
- func (b *AutoGenBuilder) Distinct() *AutoGenBuilder
- func (b *AutoGenBuilder) Get() (*AutoGen, error)
- func (b *AutoGenBuilder) GroupBy(nodes ...query.Node) *AutoGenBuilder
- func (b *AutoGenBuilder) Having(node query.Node) *AutoGenBuilder
- func (b *AutoGenBuilder) Limit(maxRowCount int, offset int) *AutoGenBuilder
- func (b *AutoGenBuilder) Load() (autoGens []*AutoGen, err error)
- func (b *AutoGenBuilder) LoadCursor() (autoGensCursor, error)
- func (b *AutoGenBuilder) LoadI() (autoGens []query.OrmObj, err error)
- func (b *AutoGenBuilder) OrderBy(nodes ...query.Sorter) *AutoGenBuilder
- func (b *AutoGenBuilder) Select(nodes ...query.Node) *AutoGenBuilder
- func (b *AutoGenBuilder) Where(c query.Node) *AutoGenBuilder
- type DoubleIndex
- func LoadDoubleIndex(ctx context.Context, pk int, selectNodes ...query.Node) (*DoubleIndex, error)
- func LoadDoubleIndexByField2IntField2String(ctx context.Context, field2Int interface{}, field2String interface{}, ...) (*DoubleIndex, error)
- func LoadDoubleIndexByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string, ...) (*DoubleIndex, error)
- func NewDoubleIndex() *DoubleIndex
- func (o *DoubleIndex) Copy() (newObject *DoubleIndex)
- func (o *DoubleIndex) Delete(ctx context.Context) (err error)
- func (o *DoubleIndex) Field2Int() int
- func (o *DoubleIndex) Field2IntIsLoaded() bool
- func (o *DoubleIndex) Field2IntIsNull() bool
- func (o *DoubleIndex) Field2String() string
- func (o *DoubleIndex) Field2StringIsLoaded() bool
- func (o *DoubleIndex) Field2StringIsNull() bool
- func (o *DoubleIndex) FieldInt() int
- func (o *DoubleIndex) FieldIntIsLoaded() bool
- func (o *DoubleIndex) FieldString() string
- func (o *DoubleIndex) FieldStringIsLoaded() bool
- func (o *DoubleIndex) Get(key string) interface{}
- func (o *DoubleIndex) GetAlias(aliasKey string) query.AliasValue
- func (o *DoubleIndex) ID() int
- func (o *DoubleIndex) IDIsLoaded() bool
- func (o *DoubleIndex) Initialize()
- func (o *DoubleIndex) IsDirty() (dirty bool)
- func (o *DoubleIndex) IsNew() bool
- func (o *DoubleIndex) Key() string
- func (o *DoubleIndex) Label() string
- func (o *DoubleIndex) MarshalBinary() ([]byte, error)
- func (o *DoubleIndex) MarshalJSON() (data []byte, err error)
- func (o *DoubleIndex) MarshalStringMap() map[string]interface{}
- func (o *DoubleIndex) OriginalPrimaryKey() int
- func (o *DoubleIndex) PrimaryKey() int
- func (o *DoubleIndex) Save(ctx context.Context) error
- func (o *DoubleIndex) SetField2Int(v int)
- func (o *DoubleIndex) SetField2IntToNull()
- func (o *DoubleIndex) SetField2String(v string)
- func (o *DoubleIndex) SetField2StringToNull()
- func (o *DoubleIndex) SetFieldInt(v int)
- func (o *DoubleIndex) SetFieldString(v string)
- func (o *DoubleIndex) SetID(v int)
- func (o *DoubleIndex) SetPrimaryKey(v int)
- func (o *DoubleIndex) String() string
- func (o *DoubleIndex) UnmarshalBinary(data []byte) (err error)
- func (o *DoubleIndex) UnmarshalJSON(data []byte) (err error)
- func (o *DoubleIndex) UnmarshalStringMap(m map[string]interface{}) (err error)
- type DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Count() (int, error)
- func (b *DoubleIndexBuilder) Distinct() *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Get() (*DoubleIndex, error)
- func (b *DoubleIndexBuilder) GroupBy(nodes ...query.Node) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Having(node query.Node) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Limit(maxRowCount int, offset int) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Load() (doubleIndices []*DoubleIndex, err error)
- func (b *DoubleIndexBuilder) LoadCursor() (doubleIndicesCursor, error)
- func (b *DoubleIndexBuilder) LoadI() (doubleIndices []query.OrmObj, err error)
- func (b *DoubleIndexBuilder) OrderBy(nodes ...query.Sorter) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Select(nodes ...query.Node) *DoubleIndexBuilder
- func (b *DoubleIndexBuilder) Where(c query.Node) *DoubleIndexBuilder
- type Leaf
- func (o *Leaf) Copy() (newObject *Leaf)
- func (o *Leaf) Delete(ctx context.Context) (err error)
- func (o *Leaf) Get(key string) interface{}
- func (o *Leaf) GetAlias(aliasKey string) query.AliasValue
- func (o *Leaf) ID() query.AutoPrimaryKey
- func (o *Leaf) IDIsLoaded() bool
- func (o *Leaf) Initialize()
- func (o *Leaf) IsDirty() (dirty bool)
- func (o *Leaf) IsNew() bool
- func (o *Leaf) Key() string
- func (o *Leaf) Label() string
- func (o *Leaf) LoadRoot(ctx context.Context) (*Root, error)
- func (o *Leaf) MarshalBinary() ([]byte, error)
- func (o *Leaf) MarshalJSON() (data []byte, err error)
- func (o *Leaf) MarshalStringMap() map[string]interface{}
- func (o *Leaf) Name() string
- func (o *Leaf) NameIsLoaded() bool
- func (o *Leaf) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *Leaf) PrimaryKey() query.AutoPrimaryKey
- func (o *Leaf) Root() *Root
- func (o *Leaf) RootID() query.AutoPrimaryKey
- func (o *Leaf) RootIDIsLoaded() bool
- func (o *Leaf) Save(ctx context.Context) error
- func (o *Leaf) SetID(v query.AutoPrimaryKey)
- func (o *Leaf) SetName(v string)
- func (o *Leaf) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *Leaf) SetRoot(root *Root)
- func (o *Leaf) SetRootID(v query.AutoPrimaryKey)
- func (o *Leaf) String() string
- func (o *Leaf) UnmarshalBinary(data []byte) (err error)
- func (o *Leaf) UnmarshalJSON(data []byte) (err error)
- func (o *Leaf) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafBuilder
- func (b *LeafBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafBuilder
- func (b *LeafBuilder) Count() (int, error)
- func (b *LeafBuilder) Distinct() *LeafBuilder
- func (b *LeafBuilder) Get() (*Leaf, error)
- func (b *LeafBuilder) GroupBy(nodes ...query.Node) *LeafBuilder
- func (b *LeafBuilder) Having(node query.Node) *LeafBuilder
- func (b *LeafBuilder) Limit(maxRowCount int, offset int) *LeafBuilder
- func (b *LeafBuilder) Load() (leafs []*Leaf, err error)
- func (b *LeafBuilder) LoadCursor() (leafsCursor, error)
- func (b *LeafBuilder) LoadI() (leafs []query.OrmObj, err error)
- func (b *LeafBuilder) OrderBy(nodes ...query.Sorter) *LeafBuilder
- func (b *LeafBuilder) Select(nodes ...query.Node) *LeafBuilder
- func (b *LeafBuilder) Where(c query.Node) *LeafBuilder
- type LeafL
- func (o *LeafL) Copy() (newObject *LeafL)
- func (o *LeafL) Delete(ctx context.Context) (err error)
- func (o *LeafL) Get(key string) interface{}
- func (o *LeafL) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafL) GroLock() int64
- func (o *LeafL) GroLockIsLoaded() bool
- func (o *LeafL) ID() query.AutoPrimaryKey
- func (o *LeafL) IDIsLoaded() bool
- func (o *LeafL) Initialize()
- func (o *LeafL) IsDirty() (dirty bool)
- func (o *LeafL) IsNew() bool
- func (o *LeafL) Key() string
- func (o *LeafL) Label() string
- func (o *LeafL) LoadRootL(ctx context.Context) (*RootL, error)
- func (o *LeafL) MarshalBinary() ([]byte, error)
- func (o *LeafL) MarshalJSON() (data []byte, err error)
- func (o *LeafL) MarshalStringMap() map[string]interface{}
- func (o *LeafL) Name() string
- func (o *LeafL) NameIsLoaded() bool
- func (o *LeafL) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafL) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafL) RootL() *RootL
- func (o *LeafL) RootLID() query.AutoPrimaryKey
- func (o *LeafL) RootLIDIsLoaded() bool
- func (o *LeafL) Save(ctx context.Context) error
- func (o *LeafL) SetID(v query.AutoPrimaryKey)
- func (o *LeafL) SetName(v string)
- func (o *LeafL) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafL) SetRootL(rootL *RootL)
- func (o *LeafL) SetRootLID(v query.AutoPrimaryKey)
- func (o *LeafL) String() string
- func (o *LeafL) UnmarshalBinary(data []byte) (err error)
- func (o *LeafL) UnmarshalJSON(data []byte) (err error)
- func (o *LeafL) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafLBuilder
- func (b *LeafLBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafLBuilder
- func (b *LeafLBuilder) Count() (int, error)
- func (b *LeafLBuilder) Distinct() *LeafLBuilder
- func (b *LeafLBuilder) Get() (*LeafL, error)
- func (b *LeafLBuilder) GroupBy(nodes ...query.Node) *LeafLBuilder
- func (b *LeafLBuilder) Having(node query.Node) *LeafLBuilder
- func (b *LeafLBuilder) Limit(maxRowCount int, offset int) *LeafLBuilder
- func (b *LeafLBuilder) Load() (leafLs []*LeafL, err error)
- func (b *LeafLBuilder) LoadCursor() (leafLsCursor, error)
- func (b *LeafLBuilder) LoadI() (leafLs []query.OrmObj, err error)
- func (b *LeafLBuilder) OrderBy(nodes ...query.Sorter) *LeafLBuilder
- func (b *LeafLBuilder) Select(nodes ...query.Node) *LeafLBuilder
- func (b *LeafLBuilder) Where(c query.Node) *LeafLBuilder
- type LeafN
- func (o *LeafN) Copy() (newObject *LeafN)
- func (o *LeafN) Delete(ctx context.Context) (err error)
- func (o *LeafN) Get(key string) interface{}
- func (o *LeafN) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafN) ID() query.AutoPrimaryKey
- func (o *LeafN) IDIsLoaded() bool
- func (o *LeafN) Initialize()
- func (o *LeafN) IsDirty() (dirty bool)
- func (o *LeafN) IsNew() bool
- func (o *LeafN) Key() string
- func (o *LeafN) Label() string
- func (o *LeafN) LoadRootN(ctx context.Context) (*RootN, error)
- func (o *LeafN) MarshalBinary() ([]byte, error)
- func (o *LeafN) MarshalJSON() (data []byte, err error)
- func (o *LeafN) MarshalStringMap() map[string]interface{}
- func (o *LeafN) Name() string
- func (o *LeafN) NameIsLoaded() bool
- func (o *LeafN) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafN) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafN) RootN() *RootN
- func (o *LeafN) RootNID() query.AutoPrimaryKey
- func (o *LeafN) RootNIDIsLoaded() bool
- func (o *LeafN) RootNIDIsNull() bool
- func (o *LeafN) Save(ctx context.Context) error
- func (o *LeafN) SetID(v query.AutoPrimaryKey)
- func (o *LeafN) SetName(v string)
- func (o *LeafN) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafN) SetRootN(rootN *RootN)
- func (o *LeafN) SetRootNID(v query.AutoPrimaryKey)
- func (o *LeafN) SetRootNIDToNull()
- func (o *LeafN) String() string
- func (o *LeafN) UnmarshalBinary(data []byte) (err error)
- func (o *LeafN) UnmarshalJSON(data []byte) (err error)
- func (o *LeafN) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafNBuilder
- func (b *LeafNBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafNBuilder
- func (b *LeafNBuilder) Count() (int, error)
- func (b *LeafNBuilder) Distinct() *LeafNBuilder
- func (b *LeafNBuilder) Get() (*LeafN, error)
- func (b *LeafNBuilder) GroupBy(nodes ...query.Node) *LeafNBuilder
- func (b *LeafNBuilder) Having(node query.Node) *LeafNBuilder
- func (b *LeafNBuilder) Limit(maxRowCount int, offset int) *LeafNBuilder
- func (b *LeafNBuilder) Load() (leafNs []*LeafN, err error)
- func (b *LeafNBuilder) LoadCursor() (leafNsCursor, error)
- func (b *LeafNBuilder) LoadI() (leafNs []query.OrmObj, err error)
- func (b *LeafNBuilder) OrderBy(nodes ...query.Sorter) *LeafNBuilder
- func (b *LeafNBuilder) Select(nodes ...query.Node) *LeafNBuilder
- func (b *LeafNBuilder) Where(c query.Node) *LeafNBuilder
- type LeafNl
- func (o *LeafNl) Copy() (newObject *LeafNl)
- func (o *LeafNl) CountLeaf1s(ctx context.Context) (int, error)
- func (o *LeafNl) CountLeaf2s(ctx context.Context) (int, error)
- func (o *LeafNl) Delete(ctx context.Context) (err error)
- func (o *LeafNl) Get(key string) interface{}
- func (o *LeafNl) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafNl) GroLock() int64
- func (o *LeafNl) GroLockIsLoaded() bool
- func (o *LeafNl) ID() query.AutoPrimaryKey
- func (o *LeafNl) IDIsLoaded() bool
- func (o *LeafNl) Initialize()
- func (o *LeafNl) IsDirty() (dirty bool)
- func (o *LeafNl) IsNew() bool
- func (o *LeafNl) Key() string
- func (o *LeafNl) Label() string
- func (o *LeafNl) Leaf1(pk query.AutoPrimaryKey) *LeafNl
- func (o *LeafNl) Leaf1s() []*LeafNl
- func (o *LeafNl) Leaf2(pk query.AutoPrimaryKey) *LeafNl
- func (o *LeafNl) Leaf2s() []*LeafNl
- func (o *LeafNl) LoadLeaf1s(ctx context.Context) ([]*LeafNl, error)
- func (o *LeafNl) LoadLeaf2s(ctx context.Context) ([]*LeafNl, error)
- func (o *LeafNl) LoadRootNl(ctx context.Context) (*RootNl, error)
- func (o *LeafNl) MarshalBinary() ([]byte, error)
- func (o *LeafNl) MarshalJSON() (data []byte, err error)
- func (o *LeafNl) MarshalStringMap() map[string]interface{}
- func (o *LeafNl) Name() string
- func (o *LeafNl) NameIsLoaded() bool
- func (o *LeafNl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafNl) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafNl) RootNl() *RootNl
- func (o *LeafNl) RootNlID() query.AutoPrimaryKey
- func (o *LeafNl) RootNlIDIsLoaded() bool
- func (o *LeafNl) RootNlIDIsNull() bool
- func (o *LeafNl) Save(ctx context.Context) error
- func (o *LeafNl) SetID(v query.AutoPrimaryKey)
- func (o *LeafNl) SetLeaf1s(objs ...*LeafNl)
- func (o *LeafNl) SetLeaf1sByID(ids ...query.AutoPrimaryKey)
- func (o *LeafNl) SetLeaf2s(objs ...*LeafNl)
- func (o *LeafNl) SetLeaf2sByID(ids ...query.AutoPrimaryKey)
- func (o *LeafNl) SetName(v string)
- func (o *LeafNl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafNl) SetRootNl(rootNl *RootNl)
- func (o *LeafNl) SetRootNlID(v query.AutoPrimaryKey)
- func (o *LeafNl) SetRootNlIDToNull()
- func (o *LeafNl) String() string
- func (o *LeafNl) UnmarshalBinary(data []byte) (err error)
- func (o *LeafNl) UnmarshalJSON(data []byte) (err error)
- func (o *LeafNl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafNlBuilder
- func (b *LeafNlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafNlBuilder
- func (b *LeafNlBuilder) Count() (int, error)
- func (b *LeafNlBuilder) Distinct() *LeafNlBuilder
- func (b *LeafNlBuilder) Get() (*LeafNl, error)
- func (b *LeafNlBuilder) GroupBy(nodes ...query.Node) *LeafNlBuilder
- func (b *LeafNlBuilder) Having(node query.Node) *LeafNlBuilder
- func (b *LeafNlBuilder) Limit(maxRowCount int, offset int) *LeafNlBuilder
- func (b *LeafNlBuilder) Load() (leafNls []*LeafNl, err error)
- func (b *LeafNlBuilder) LoadCursor() (leafNlsCursor, error)
- func (b *LeafNlBuilder) LoadI() (leafNls []query.OrmObj, err error)
- func (b *LeafNlBuilder) OrderBy(nodes ...query.Sorter) *LeafNlBuilder
- func (b *LeafNlBuilder) Select(nodes ...query.Node) *LeafNlBuilder
- func (b *LeafNlBuilder) Where(c query.Node) *LeafNlBuilder
- type LeafU
- func (o *LeafU) Copy() (newObject *LeafU)
- func (o *LeafU) Delete(ctx context.Context) (err error)
- func (o *LeafU) Get(key string) interface{}
- func (o *LeafU) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafU) ID() query.AutoPrimaryKey
- func (o *LeafU) IDIsLoaded() bool
- func (o *LeafU) Initialize()
- func (o *LeafU) IsDirty() (dirty bool)
- func (o *LeafU) IsNew() bool
- func (o *LeafU) Key() string
- func (o *LeafU) Label() string
- func (o *LeafU) LoadRootU(ctx context.Context) (*RootU, error)
- func (o *LeafU) MarshalBinary() ([]byte, error)
- func (o *LeafU) MarshalJSON() (data []byte, err error)
- func (o *LeafU) MarshalStringMap() map[string]interface{}
- func (o *LeafU) Name() string
- func (o *LeafU) NameIsLoaded() bool
- func (o *LeafU) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafU) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafU) RootU() *RootU
- func (o *LeafU) RootUID() query.AutoPrimaryKey
- func (o *LeafU) RootUIDIsLoaded() bool
- func (o *LeafU) Save(ctx context.Context) error
- func (o *LeafU) SetID(v query.AutoPrimaryKey)
- func (o *LeafU) SetName(v string)
- func (o *LeafU) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafU) SetRootU(rootU *RootU)
- func (o *LeafU) SetRootUID(v query.AutoPrimaryKey)
- func (o *LeafU) String() string
- func (o *LeafU) UnmarshalBinary(data []byte) (err error)
- func (o *LeafU) UnmarshalJSON(data []byte) (err error)
- func (o *LeafU) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafUBuilder
- func (b *LeafUBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUBuilder
- func (b *LeafUBuilder) Count() (int, error)
- func (b *LeafUBuilder) Distinct() *LeafUBuilder
- func (b *LeafUBuilder) Get() (*LeafU, error)
- func (b *LeafUBuilder) GroupBy(nodes ...query.Node) *LeafUBuilder
- func (b *LeafUBuilder) Having(node query.Node) *LeafUBuilder
- func (b *LeafUBuilder) Limit(maxRowCount int, offset int) *LeafUBuilder
- func (b *LeafUBuilder) Load() (leafUs []*LeafU, err error)
- func (b *LeafUBuilder) LoadCursor() (leafUsCursor, error)
- func (b *LeafUBuilder) LoadI() (leafUs []query.OrmObj, err error)
- func (b *LeafUBuilder) OrderBy(nodes ...query.Sorter) *LeafUBuilder
- func (b *LeafUBuilder) Select(nodes ...query.Node) *LeafUBuilder
- func (b *LeafUBuilder) Where(c query.Node) *LeafUBuilder
- type LeafUl
- func (o *LeafUl) Copy() (newObject *LeafUl)
- func (o *LeafUl) Delete(ctx context.Context) (err error)
- func (o *LeafUl) Get(key string) interface{}
- func (o *LeafUl) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafUl) GroLock() int64
- func (o *LeafUl) GroLockIsLoaded() bool
- func (o *LeafUl) ID() query.AutoPrimaryKey
- func (o *LeafUl) IDIsLoaded() bool
- func (o *LeafUl) Initialize()
- func (o *LeafUl) IsDirty() (dirty bool)
- func (o *LeafUl) IsNew() bool
- func (o *LeafUl) Key() string
- func (o *LeafUl) Label() string
- func (o *LeafUl) LoadRootUl(ctx context.Context) (*RootUl, error)
- func (o *LeafUl) MarshalBinary() ([]byte, error)
- func (o *LeafUl) MarshalJSON() (data []byte, err error)
- func (o *LeafUl) MarshalStringMap() map[string]interface{}
- func (o *LeafUl) Name() string
- func (o *LeafUl) NameIsLoaded() bool
- func (o *LeafUl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafUl) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafUl) RootUl() *RootUl
- func (o *LeafUl) RootUlID() query.AutoPrimaryKey
- func (o *LeafUl) RootUlIDIsLoaded() bool
- func (o *LeafUl) Save(ctx context.Context) error
- func (o *LeafUl) SetID(v query.AutoPrimaryKey)
- func (o *LeafUl) SetName(v string)
- func (o *LeafUl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafUl) SetRootUl(rootUl *RootUl)
- func (o *LeafUl) SetRootUlID(v query.AutoPrimaryKey)
- func (o *LeafUl) String() string
- func (o *LeafUl) UnmarshalBinary(data []byte) (err error)
- func (o *LeafUl) UnmarshalJSON(data []byte) (err error)
- func (o *LeafUl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafUlBuilder
- func (b *LeafUlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUlBuilder
- func (b *LeafUlBuilder) Count() (int, error)
- func (b *LeafUlBuilder) Distinct() *LeafUlBuilder
- func (b *LeafUlBuilder) Get() (*LeafUl, error)
- func (b *LeafUlBuilder) GroupBy(nodes ...query.Node) *LeafUlBuilder
- func (b *LeafUlBuilder) Having(node query.Node) *LeafUlBuilder
- func (b *LeafUlBuilder) Limit(maxRowCount int, offset int) *LeafUlBuilder
- func (b *LeafUlBuilder) Load() (leafUls []*LeafUl, err error)
- func (b *LeafUlBuilder) LoadCursor() (leafUlsCursor, error)
- func (b *LeafUlBuilder) LoadI() (leafUls []query.OrmObj, err error)
- func (b *LeafUlBuilder) OrderBy(nodes ...query.Sorter) *LeafUlBuilder
- func (b *LeafUlBuilder) Select(nodes ...query.Node) *LeafUlBuilder
- func (b *LeafUlBuilder) Where(c query.Node) *LeafUlBuilder
- type LeafUn
- func (o *LeafUn) Copy() (newObject *LeafUn)
- func (o *LeafUn) Delete(ctx context.Context) (err error)
- func (o *LeafUn) Get(key string) interface{}
- func (o *LeafUn) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafUn) ID() query.AutoPrimaryKey
- func (o *LeafUn) IDIsLoaded() bool
- func (o *LeafUn) Initialize()
- func (o *LeafUn) IsDirty() (dirty bool)
- func (o *LeafUn) IsNew() bool
- func (o *LeafUn) Key() string
- func (o *LeafUn) Label() string
- func (o *LeafUn) LoadRootUn(ctx context.Context) (*RootUn, error)
- func (o *LeafUn) MarshalBinary() ([]byte, error)
- func (o *LeafUn) MarshalJSON() (data []byte, err error)
- func (o *LeafUn) MarshalStringMap() map[string]interface{}
- func (o *LeafUn) Name() string
- func (o *LeafUn) NameIsLoaded() bool
- func (o *LeafUn) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafUn) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafUn) RootUn() *RootUn
- func (o *LeafUn) RootUnID() query.AutoPrimaryKey
- func (o *LeafUn) RootUnIDIsLoaded() bool
- func (o *LeafUn) RootUnIDIsNull() bool
- func (o *LeafUn) Save(ctx context.Context) error
- func (o *LeafUn) SetID(v query.AutoPrimaryKey)
- func (o *LeafUn) SetName(v string)
- func (o *LeafUn) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafUn) SetRootUn(rootUn *RootUn)
- func (o *LeafUn) SetRootUnID(v query.AutoPrimaryKey)
- func (o *LeafUn) SetRootUnIDToNull()
- func (o *LeafUn) String() string
- func (o *LeafUn) UnmarshalBinary(data []byte) (err error)
- func (o *LeafUn) UnmarshalJSON(data []byte) (err error)
- func (o *LeafUn) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafUnBuilder
- func (b *LeafUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUnBuilder
- func (b *LeafUnBuilder) Count() (int, error)
- func (b *LeafUnBuilder) Distinct() *LeafUnBuilder
- func (b *LeafUnBuilder) Get() (*LeafUn, error)
- func (b *LeafUnBuilder) GroupBy(nodes ...query.Node) *LeafUnBuilder
- func (b *LeafUnBuilder) Having(node query.Node) *LeafUnBuilder
- func (b *LeafUnBuilder) Limit(maxRowCount int, offset int) *LeafUnBuilder
- func (b *LeafUnBuilder) Load() (leafUns []*LeafUn, err error)
- func (b *LeafUnBuilder) LoadCursor() (leafUnsCursor, error)
- func (b *LeafUnBuilder) LoadI() (leafUns []query.OrmObj, err error)
- func (b *LeafUnBuilder) OrderBy(nodes ...query.Sorter) *LeafUnBuilder
- func (b *LeafUnBuilder) Select(nodes ...query.Node) *LeafUnBuilder
- func (b *LeafUnBuilder) Where(c query.Node) *LeafUnBuilder
- type LeafUnl
- func (o *LeafUnl) Copy() (newObject *LeafUnl)
- func (o *LeafUnl) Delete(ctx context.Context) (err error)
- func (o *LeafUnl) Get(key string) interface{}
- func (o *LeafUnl) GetAlias(aliasKey string) query.AliasValue
- func (o *LeafUnl) GroLock() int64
- func (o *LeafUnl) GroLockIsLoaded() bool
- func (o *LeafUnl) ID() query.AutoPrimaryKey
- func (o *LeafUnl) IDIsLoaded() bool
- func (o *LeafUnl) Initialize()
- func (o *LeafUnl) IsDirty() (dirty bool)
- func (o *LeafUnl) IsNew() bool
- func (o *LeafUnl) Key() string
- func (o *LeafUnl) Label() string
- func (o *LeafUnl) LoadRootUnl(ctx context.Context) (*RootUnl, error)
- func (o *LeafUnl) MarshalBinary() ([]byte, error)
- func (o *LeafUnl) MarshalJSON() (data []byte, err error)
- func (o *LeafUnl) MarshalStringMap() map[string]interface{}
- func (o *LeafUnl) Name() string
- func (o *LeafUnl) NameIsLoaded() bool
- func (o *LeafUnl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *LeafUnl) PrimaryKey() query.AutoPrimaryKey
- func (o *LeafUnl) RootUnl() *RootUnl
- func (o *LeafUnl) RootUnlID() query.AutoPrimaryKey
- func (o *LeafUnl) RootUnlIDIsLoaded() bool
- func (o *LeafUnl) RootUnlIDIsNull() bool
- func (o *LeafUnl) Save(ctx context.Context) error
- func (o *LeafUnl) SetID(v query.AutoPrimaryKey)
- func (o *LeafUnl) SetName(v string)
- func (o *LeafUnl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *LeafUnl) SetRootUnl(rootUnl *RootUnl)
- func (o *LeafUnl) SetRootUnlID(v query.AutoPrimaryKey)
- func (o *LeafUnl) SetRootUnlIDToNull()
- func (o *LeafUnl) String() string
- func (o *LeafUnl) UnmarshalBinary(data []byte) (err error)
- func (o *LeafUnl) UnmarshalJSON(data []byte) (err error)
- func (o *LeafUnl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type LeafUnlBuilder
- func (b *LeafUnlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Count() (int, error)
- func (b *LeafUnlBuilder) Distinct() *LeafUnlBuilder
- func (b *LeafUnlBuilder) Get() (*LeafUnl, error)
- func (b *LeafUnlBuilder) GroupBy(nodes ...query.Node) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Having(node query.Node) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Limit(maxRowCount int, offset int) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Load() (leafUnls []*LeafUnl, err error)
- func (b *LeafUnlBuilder) LoadCursor() (leafUnlsCursor, error)
- func (b *LeafUnlBuilder) LoadI() (leafUnls []query.OrmObj, err error)
- func (b *LeafUnlBuilder) OrderBy(nodes ...query.Sorter) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Select(nodes ...query.Node) *LeafUnlBuilder
- func (b *LeafUnlBuilder) Where(c query.Node) *LeafUnlBuilder
- type MultiParent
- func LoadMultiParent(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*MultiParent, error)
- func LoadMultiParentsByParent1ID(ctx context.Context, parent1ID interface{}, selectNodes ...query.Node) ([]*MultiParent, error)
- func LoadMultiParentsByParent2ID(ctx context.Context, parent2ID interface{}, selectNodes ...query.Node) ([]*MultiParent, error)
- func NewMultiParent() *MultiParent
- func (o *MultiParent) Copy() (newObject *MultiParent)
- func (o *MultiParent) CountParent1MultiParents(ctx context.Context) (int, error)
- func (o *MultiParent) CountParent2MultiParents(ctx context.Context) (int, error)
- func (o *MultiParent) Delete(ctx context.Context) (err error)
- func (o *MultiParent) Get(key string) interface{}
- func (o *MultiParent) GetAlias(aliasKey string) query.AliasValue
- func (o *MultiParent) ID() query.AutoPrimaryKey
- func (o *MultiParent) IDIsLoaded() bool
- func (o *MultiParent) Initialize()
- func (o *MultiParent) IsDirty() (dirty bool)
- func (o *MultiParent) IsNew() bool
- func (o *MultiParent) Key() string
- func (o *MultiParent) Label() string
- func (o *MultiParent) LoadParent1(ctx context.Context) (*MultiParent, error)
- func (o *MultiParent) LoadParent1MultiParents(ctx context.Context) ([]*MultiParent, error)
- func (o *MultiParent) LoadParent2(ctx context.Context) (*MultiParent, error)
- func (o *MultiParent) LoadParent2MultiParents(ctx context.Context) ([]*MultiParent, error)
- func (o *MultiParent) MarshalBinary() ([]byte, error)
- func (o *MultiParent) MarshalJSON() (data []byte, err error)
- func (o *MultiParent) MarshalStringMap() map[string]interface{}
- func (o *MultiParent) Name() string
- func (o *MultiParent) NameIsLoaded() bool
- func (o *MultiParent) NameIsNull() bool
- func (o *MultiParent) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *MultiParent) Parent1() *MultiParent
- func (o *MultiParent) Parent1ID() query.AutoPrimaryKey
- func (o *MultiParent) Parent1IDIsLoaded() bool
- func (o *MultiParent) Parent1IDIsNull() bool
- func (o *MultiParent) Parent1MultiParent(pk query.AutoPrimaryKey) *MultiParent
- func (o *MultiParent) Parent1MultiParents() []*MultiParent
- func (o *MultiParent) Parent2() *MultiParent
- func (o *MultiParent) Parent2ID() query.AutoPrimaryKey
- func (o *MultiParent) Parent2IDIsLoaded() bool
- func (o *MultiParent) Parent2IDIsNull() bool
- func (o *MultiParent) Parent2MultiParent(pk query.AutoPrimaryKey) *MultiParent
- func (o *MultiParent) Parent2MultiParents() []*MultiParent
- func (o *MultiParent) PrimaryKey() query.AutoPrimaryKey
- func (o *MultiParent) Save(ctx context.Context) error
- func (o *MultiParent) SetID(v query.AutoPrimaryKey)
- func (o *MultiParent) SetName(v string)
- func (o *MultiParent) SetNameToNull()
- func (o *MultiParent) SetParent1(parent1 *MultiParent)
- func (o *MultiParent) SetParent1ID(v query.AutoPrimaryKey)
- func (o *MultiParent) SetParent1IDToNull()
- func (o *MultiParent) SetParent1MultiParents(objs ...*MultiParent)
- func (o *MultiParent) SetParent2(parent2 *MultiParent)
- func (o *MultiParent) SetParent2ID(v query.AutoPrimaryKey)
- func (o *MultiParent) SetParent2IDToNull()
- func (o *MultiParent) SetParent2MultiParents(objs ...*MultiParent)
- func (o *MultiParent) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *MultiParent) String() string
- func (o *MultiParent) UnmarshalBinary(data []byte) (err error)
- func (o *MultiParent) UnmarshalJSON(data []byte) (err error)
- func (o *MultiParent) UnmarshalStringMap(m map[string]interface{}) (err error)
- type MultiParentBuilder
- func (b *MultiParentBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *MultiParentBuilder
- func (b *MultiParentBuilder) Count() (int, error)
- func (b *MultiParentBuilder) Distinct() *MultiParentBuilder
- func (b *MultiParentBuilder) Get() (*MultiParent, error)
- func (b *MultiParentBuilder) GroupBy(nodes ...query.Node) *MultiParentBuilder
- func (b *MultiParentBuilder) Having(node query.Node) *MultiParentBuilder
- func (b *MultiParentBuilder) Limit(maxRowCount int, offset int) *MultiParentBuilder
- func (b *MultiParentBuilder) Load() (multiParents []*MultiParent, err error)
- func (b *MultiParentBuilder) LoadCursor() (multiParentsCursor, error)
- func (b *MultiParentBuilder) LoadI() (multiParents []query.OrmObj, err error)
- func (b *MultiParentBuilder) OrderBy(nodes ...query.Sorter) *MultiParentBuilder
- func (b *MultiParentBuilder) Select(nodes ...query.Node) *MultiParentBuilder
- func (b *MultiParentBuilder) Where(c query.Node) *MultiParentBuilder
- type Root
- func (o *Root) Copy() (newObject *Root)
- func (o *Root) CountLeafs(ctx context.Context) (int, error)
- func (o *Root) Delete(ctx context.Context) (err error)
- func (o *Root) Get(key string) interface{}
- func (o *Root) GetAlias(aliasKey string) query.AliasValue
- func (o *Root) ID() query.AutoPrimaryKey
- func (o *Root) IDIsLoaded() bool
- func (o *Root) Initialize()
- func (o *Root) IsDirty() (dirty bool)
- func (o *Root) IsNew() bool
- func (o *Root) Key() string
- func (o *Root) Label() string
- func (o *Root) Leaf(pk query.AutoPrimaryKey) *Leaf
- func (o *Root) Leafs() []*Leaf
- func (o *Root) LoadLeafs(ctx context.Context) ([]*Leaf, error)
- func (o *Root) MarshalBinary() ([]byte, error)
- func (o *Root) MarshalJSON() (data []byte, err error)
- func (o *Root) MarshalStringMap() map[string]interface{}
- func (o *Root) Name() string
- func (o *Root) NameIsLoaded() bool
- func (o *Root) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *Root) PrimaryKey() query.AutoPrimaryKey
- func (o *Root) Save(ctx context.Context) error
- func (o *Root) SetID(v query.AutoPrimaryKey)
- func (o *Root) SetLeafs(objs ...*Leaf)
- func (o *Root) SetName(v string)
- func (o *Root) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *Root) String() string
- func (o *Root) UnmarshalBinary(data []byte) (err error)
- func (o *Root) UnmarshalJSON(data []byte) (err error)
- func (o *Root) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootBuilder
- func (b *RootBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootBuilder
- func (b *RootBuilder) Count() (int, error)
- func (b *RootBuilder) Distinct() *RootBuilder
- func (b *RootBuilder) Get() (*Root, error)
- func (b *RootBuilder) GroupBy(nodes ...query.Node) *RootBuilder
- func (b *RootBuilder) Having(node query.Node) *RootBuilder
- func (b *RootBuilder) Limit(maxRowCount int, offset int) *RootBuilder
- func (b *RootBuilder) Load() (roots []*Root, err error)
- func (b *RootBuilder) LoadCursor() (rootsCursor, error)
- func (b *RootBuilder) LoadI() (roots []query.OrmObj, err error)
- func (b *RootBuilder) OrderBy(nodes ...query.Sorter) *RootBuilder
- func (b *RootBuilder) Select(nodes ...query.Node) *RootBuilder
- func (b *RootBuilder) Where(c query.Node) *RootBuilder
- type RootL
- func (o *RootL) Copy() (newObject *RootL)
- func (o *RootL) CountLeafLs(ctx context.Context) (int, error)
- func (o *RootL) Delete(ctx context.Context) (err error)
- func (o *RootL) Get(key string) interface{}
- func (o *RootL) GetAlias(aliasKey string) query.AliasValue
- func (o *RootL) GroLock() int64
- func (o *RootL) GroLockIsLoaded() bool
- func (o *RootL) ID() query.AutoPrimaryKey
- func (o *RootL) IDIsLoaded() bool
- func (o *RootL) Initialize()
- func (o *RootL) IsDirty() (dirty bool)
- func (o *RootL) IsNew() bool
- func (o *RootL) Key() string
- func (o *RootL) Label() string
- func (o *RootL) LeafL(pk query.AutoPrimaryKey) *LeafL
- func (o *RootL) LeafLs() []*LeafL
- func (o *RootL) LoadLeafLs(ctx context.Context) ([]*LeafL, error)
- func (o *RootL) MarshalBinary() ([]byte, error)
- func (o *RootL) MarshalJSON() (data []byte, err error)
- func (o *RootL) MarshalStringMap() map[string]interface{}
- func (o *RootL) Name() string
- func (o *RootL) NameIsLoaded() bool
- func (o *RootL) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootL) PrimaryKey() query.AutoPrimaryKey
- func (o *RootL) Save(ctx context.Context) error
- func (o *RootL) SetID(v query.AutoPrimaryKey)
- func (o *RootL) SetLeafLs(objs ...*LeafL)
- func (o *RootL) SetName(v string)
- func (o *RootL) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootL) String() string
- func (o *RootL) UnmarshalBinary(data []byte) (err error)
- func (o *RootL) UnmarshalJSON(data []byte) (err error)
- func (o *RootL) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootLBuilder
- func (b *RootLBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootLBuilder
- func (b *RootLBuilder) Count() (int, error)
- func (b *RootLBuilder) Distinct() *RootLBuilder
- func (b *RootLBuilder) Get() (*RootL, error)
- func (b *RootLBuilder) GroupBy(nodes ...query.Node) *RootLBuilder
- func (b *RootLBuilder) Having(node query.Node) *RootLBuilder
- func (b *RootLBuilder) Limit(maxRowCount int, offset int) *RootLBuilder
- func (b *RootLBuilder) Load() (rootLs []*RootL, err error)
- func (b *RootLBuilder) LoadCursor() (rootLsCursor, error)
- func (b *RootLBuilder) LoadI() (rootLs []query.OrmObj, err error)
- func (b *RootLBuilder) OrderBy(nodes ...query.Sorter) *RootLBuilder
- func (b *RootLBuilder) Select(nodes ...query.Node) *RootLBuilder
- func (b *RootLBuilder) Where(c query.Node) *RootLBuilder
- type RootN
- func (o *RootN) Copy() (newObject *RootN)
- func (o *RootN) CountLeafNs(ctx context.Context) (int, error)
- func (o *RootN) Delete(ctx context.Context) (err error)
- func (o *RootN) Get(key string) interface{}
- func (o *RootN) GetAlias(aliasKey string) query.AliasValue
- func (o *RootN) ID() query.AutoPrimaryKey
- func (o *RootN) IDIsLoaded() bool
- func (o *RootN) Initialize()
- func (o *RootN) IsDirty() (dirty bool)
- func (o *RootN) IsNew() bool
- func (o *RootN) Key() string
- func (o *RootN) Label() string
- func (o *RootN) LeafN(pk query.AutoPrimaryKey) *LeafN
- func (o *RootN) LeafNs() []*LeafN
- func (o *RootN) LoadLeafNs(ctx context.Context) ([]*LeafN, error)
- func (o *RootN) MarshalBinary() ([]byte, error)
- func (o *RootN) MarshalJSON() (data []byte, err error)
- func (o *RootN) MarshalStringMap() map[string]interface{}
- func (o *RootN) Name() string
- func (o *RootN) NameIsLoaded() bool
- func (o *RootN) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootN) PrimaryKey() query.AutoPrimaryKey
- func (o *RootN) Save(ctx context.Context) error
- func (o *RootN) SetID(v query.AutoPrimaryKey)
- func (o *RootN) SetLeafNs(objs ...*LeafN)
- func (o *RootN) SetName(v string)
- func (o *RootN) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootN) String() string
- func (o *RootN) UnmarshalBinary(data []byte) (err error)
- func (o *RootN) UnmarshalJSON(data []byte) (err error)
- func (o *RootN) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootNBuilder
- func (b *RootNBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootNBuilder
- func (b *RootNBuilder) Count() (int, error)
- func (b *RootNBuilder) Distinct() *RootNBuilder
- func (b *RootNBuilder) Get() (*RootN, error)
- func (b *RootNBuilder) GroupBy(nodes ...query.Node) *RootNBuilder
- func (b *RootNBuilder) Having(node query.Node) *RootNBuilder
- func (b *RootNBuilder) Limit(maxRowCount int, offset int) *RootNBuilder
- func (b *RootNBuilder) Load() (rootNs []*RootN, err error)
- func (b *RootNBuilder) LoadCursor() (rootNsCursor, error)
- func (b *RootNBuilder) LoadI() (rootNs []query.OrmObj, err error)
- func (b *RootNBuilder) OrderBy(nodes ...query.Sorter) *RootNBuilder
- func (b *RootNBuilder) Select(nodes ...query.Node) *RootNBuilder
- func (b *RootNBuilder) Where(c query.Node) *RootNBuilder
- type RootNl
- func (o *RootNl) Copy() (newObject *RootNl)
- func (o *RootNl) CountLeafNls(ctx context.Context) (int, error)
- func (o *RootNl) Delete(ctx context.Context) (err error)
- func (o *RootNl) Get(key string) interface{}
- func (o *RootNl) GetAlias(aliasKey string) query.AliasValue
- func (o *RootNl) GroLock() int64
- func (o *RootNl) GroLockIsLoaded() bool
- func (o *RootNl) ID() query.AutoPrimaryKey
- func (o *RootNl) IDIsLoaded() bool
- func (o *RootNl) Initialize()
- func (o *RootNl) IsDirty() (dirty bool)
- func (o *RootNl) IsNew() bool
- func (o *RootNl) Key() string
- func (o *RootNl) Label() string
- func (o *RootNl) LeafNl(pk query.AutoPrimaryKey) *LeafNl
- func (o *RootNl) LeafNls() []*LeafNl
- func (o *RootNl) LoadLeafNls(ctx context.Context) ([]*LeafNl, error)
- func (o *RootNl) MarshalBinary() ([]byte, error)
- func (o *RootNl) MarshalJSON() (data []byte, err error)
- func (o *RootNl) MarshalStringMap() map[string]interface{}
- func (o *RootNl) Name() string
- func (o *RootNl) NameIsLoaded() bool
- func (o *RootNl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootNl) PrimaryKey() query.AutoPrimaryKey
- func (o *RootNl) Save(ctx context.Context) error
- func (o *RootNl) SetID(v query.AutoPrimaryKey)
- func (o *RootNl) SetLeafNls(objs ...*LeafNl)
- func (o *RootNl) SetName(v string)
- func (o *RootNl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootNl) String() string
- func (o *RootNl) UnmarshalBinary(data []byte) (err error)
- func (o *RootNl) UnmarshalJSON(data []byte) (err error)
- func (o *RootNl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootNlBuilder
- func (b *RootNlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootNlBuilder
- func (b *RootNlBuilder) Count() (int, error)
- func (b *RootNlBuilder) Distinct() *RootNlBuilder
- func (b *RootNlBuilder) Get() (*RootNl, error)
- func (b *RootNlBuilder) GroupBy(nodes ...query.Node) *RootNlBuilder
- func (b *RootNlBuilder) Having(node query.Node) *RootNlBuilder
- func (b *RootNlBuilder) Limit(maxRowCount int, offset int) *RootNlBuilder
- func (b *RootNlBuilder) Load() (rootNls []*RootNl, err error)
- func (b *RootNlBuilder) LoadCursor() (rootNlsCursor, error)
- func (b *RootNlBuilder) LoadI() (rootNls []query.OrmObj, err error)
- func (b *RootNlBuilder) OrderBy(nodes ...query.Sorter) *RootNlBuilder
- func (b *RootNlBuilder) Select(nodes ...query.Node) *RootNlBuilder
- func (b *RootNlBuilder) Where(c query.Node) *RootNlBuilder
- type RootU
- func (o *RootU) Copy() (newObject *RootU)
- func (o *RootU) Delete(ctx context.Context) (err error)
- func (o *RootU) Get(key string) interface{}
- func (o *RootU) GetAlias(aliasKey string) query.AliasValue
- func (o *RootU) ID() query.AutoPrimaryKey
- func (o *RootU) IDIsLoaded() bool
- func (o *RootU) Initialize()
- func (o *RootU) IsDirty() (dirty bool)
- func (o *RootU) IsNew() bool
- func (o *RootU) Key() string
- func (o *RootU) Label() string
- func (o *RootU) LeafU() *LeafU
- func (o *RootU) LoadLeafU(ctx context.Context) (*LeafU, error)
- func (o *RootU) MarshalBinary() ([]byte, error)
- func (o *RootU) MarshalJSON() (data []byte, err error)
- func (o *RootU) MarshalStringMap() map[string]interface{}
- func (o *RootU) Name() string
- func (o *RootU) NameIsLoaded() bool
- func (o *RootU) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootU) PrimaryKey() query.AutoPrimaryKey
- func (o *RootU) Save(ctx context.Context) error
- func (o *RootU) SetID(v query.AutoPrimaryKey)
- func (o *RootU) SetLeafU(obj *LeafU)
- func (o *RootU) SetName(v string)
- func (o *RootU) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootU) String() string
- func (o *RootU) UnmarshalBinary(data []byte) (err error)
- func (o *RootU) UnmarshalJSON(data []byte) (err error)
- func (o *RootU) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootUBuilder
- func (b *RootUBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUBuilder
- func (b *RootUBuilder) Count() (int, error)
- func (b *RootUBuilder) Distinct() *RootUBuilder
- func (b *RootUBuilder) Get() (*RootU, error)
- func (b *RootUBuilder) GroupBy(nodes ...query.Node) *RootUBuilder
- func (b *RootUBuilder) Having(node query.Node) *RootUBuilder
- func (b *RootUBuilder) Limit(maxRowCount int, offset int) *RootUBuilder
- func (b *RootUBuilder) Load() (rootUs []*RootU, err error)
- func (b *RootUBuilder) LoadCursor() (rootUsCursor, error)
- func (b *RootUBuilder) LoadI() (rootUs []query.OrmObj, err error)
- func (b *RootUBuilder) OrderBy(nodes ...query.Sorter) *RootUBuilder
- func (b *RootUBuilder) Select(nodes ...query.Node) *RootUBuilder
- func (b *RootUBuilder) Where(c query.Node) *RootUBuilder
- type RootUl
- func (o *RootUl) Copy() (newObject *RootUl)
- func (o *RootUl) Delete(ctx context.Context) (err error)
- func (o *RootUl) Get(key string) interface{}
- func (o *RootUl) GetAlias(aliasKey string) query.AliasValue
- func (o *RootUl) GroLock() int64
- func (o *RootUl) GroLockIsLoaded() bool
- func (o *RootUl) ID() query.AutoPrimaryKey
- func (o *RootUl) IDIsLoaded() bool
- func (o *RootUl) Initialize()
- func (o *RootUl) IsDirty() (dirty bool)
- func (o *RootUl) IsNew() bool
- func (o *RootUl) Key() string
- func (o *RootUl) Label() string
- func (o *RootUl) LeafUl() *LeafUl
- func (o *RootUl) LoadLeafUl(ctx context.Context) (*LeafUl, error)
- func (o *RootUl) MarshalBinary() ([]byte, error)
- func (o *RootUl) MarshalJSON() (data []byte, err error)
- func (o *RootUl) MarshalStringMap() map[string]interface{}
- func (o *RootUl) Name() string
- func (o *RootUl) NameIsLoaded() bool
- func (o *RootUl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootUl) PrimaryKey() query.AutoPrimaryKey
- func (o *RootUl) Save(ctx context.Context) error
- func (o *RootUl) SetID(v query.AutoPrimaryKey)
- func (o *RootUl) SetLeafUl(obj *LeafUl)
- func (o *RootUl) SetName(v string)
- func (o *RootUl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootUl) String() string
- func (o *RootUl) UnmarshalBinary(data []byte) (err error)
- func (o *RootUl) UnmarshalJSON(data []byte) (err error)
- func (o *RootUl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootUlBuilder
- func (b *RootUlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUlBuilder
- func (b *RootUlBuilder) Count() (int, error)
- func (b *RootUlBuilder) Distinct() *RootUlBuilder
- func (b *RootUlBuilder) Get() (*RootUl, error)
- func (b *RootUlBuilder) GroupBy(nodes ...query.Node) *RootUlBuilder
- func (b *RootUlBuilder) Having(node query.Node) *RootUlBuilder
- func (b *RootUlBuilder) Limit(maxRowCount int, offset int) *RootUlBuilder
- func (b *RootUlBuilder) Load() (rootUls []*RootUl, err error)
- func (b *RootUlBuilder) LoadCursor() (rootUlsCursor, error)
- func (b *RootUlBuilder) LoadI() (rootUls []query.OrmObj, err error)
- func (b *RootUlBuilder) OrderBy(nodes ...query.Sorter) *RootUlBuilder
- func (b *RootUlBuilder) Select(nodes ...query.Node) *RootUlBuilder
- func (b *RootUlBuilder) Where(c query.Node) *RootUlBuilder
- type RootUn
- func (o *RootUn) Copy() (newObject *RootUn)
- func (o *RootUn) Delete(ctx context.Context) (err error)
- func (o *RootUn) Get(key string) interface{}
- func (o *RootUn) GetAlias(aliasKey string) query.AliasValue
- func (o *RootUn) ID() query.AutoPrimaryKey
- func (o *RootUn) IDIsLoaded() bool
- func (o *RootUn) Initialize()
- func (o *RootUn) IsDirty() (dirty bool)
- func (o *RootUn) IsNew() bool
- func (o *RootUn) Key() string
- func (o *RootUn) Label() string
- func (o *RootUn) LeafUn() *LeafUn
- func (o *RootUn) LoadLeafUn(ctx context.Context) (*LeafUn, error)
- func (o *RootUn) MarshalBinary() ([]byte, error)
- func (o *RootUn) MarshalJSON() (data []byte, err error)
- func (o *RootUn) MarshalStringMap() map[string]interface{}
- func (o *RootUn) Name() string
- func (o *RootUn) NameIsLoaded() bool
- func (o *RootUn) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootUn) PrimaryKey() query.AutoPrimaryKey
- func (o *RootUn) Save(ctx context.Context) error
- func (o *RootUn) SetID(v query.AutoPrimaryKey)
- func (o *RootUn) SetLeafUn(obj *LeafUn)
- func (o *RootUn) SetName(v string)
- func (o *RootUn) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootUn) String() string
- func (o *RootUn) UnmarshalBinary(data []byte) (err error)
- func (o *RootUn) UnmarshalJSON(data []byte) (err error)
- func (o *RootUn) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootUnBuilder
- func (b *RootUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUnBuilder
- func (b *RootUnBuilder) Count() (int, error)
- func (b *RootUnBuilder) Distinct() *RootUnBuilder
- func (b *RootUnBuilder) Get() (*RootUn, error)
- func (b *RootUnBuilder) GroupBy(nodes ...query.Node) *RootUnBuilder
- func (b *RootUnBuilder) Having(node query.Node) *RootUnBuilder
- func (b *RootUnBuilder) Limit(maxRowCount int, offset int) *RootUnBuilder
- func (b *RootUnBuilder) Load() (rootUns []*RootUn, err error)
- func (b *RootUnBuilder) LoadCursor() (rootUnsCursor, error)
- func (b *RootUnBuilder) LoadI() (rootUns []query.OrmObj, err error)
- func (b *RootUnBuilder) OrderBy(nodes ...query.Sorter) *RootUnBuilder
- func (b *RootUnBuilder) Select(nodes ...query.Node) *RootUnBuilder
- func (b *RootUnBuilder) Where(c query.Node) *RootUnBuilder
- type RootUnl
- func (o *RootUnl) Copy() (newObject *RootUnl)
- func (o *RootUnl) Delete(ctx context.Context) (err error)
- func (o *RootUnl) Get(key string) interface{}
- func (o *RootUnl) GetAlias(aliasKey string) query.AliasValue
- func (o *RootUnl) GroLock() int64
- func (o *RootUnl) GroLockIsLoaded() bool
- func (o *RootUnl) ID() query.AutoPrimaryKey
- func (o *RootUnl) IDIsLoaded() bool
- func (o *RootUnl) Initialize()
- func (o *RootUnl) IsDirty() (dirty bool)
- func (o *RootUnl) IsNew() bool
- func (o *RootUnl) Key() string
- func (o *RootUnl) Label() string
- func (o *RootUnl) LeafUnl() *LeafUnl
- func (o *RootUnl) LoadLeafUnl(ctx context.Context) (*LeafUnl, error)
- func (o *RootUnl) MarshalBinary() ([]byte, error)
- func (o *RootUnl) MarshalJSON() (data []byte, err error)
- func (o *RootUnl) MarshalStringMap() map[string]interface{}
- func (o *RootUnl) Name() string
- func (o *RootUnl) NameIsLoaded() bool
- func (o *RootUnl) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *RootUnl) PrimaryKey() query.AutoPrimaryKey
- func (o *RootUnl) Save(ctx context.Context) error
- func (o *RootUnl) SetID(v query.AutoPrimaryKey)
- func (o *RootUnl) SetLeafUnl(obj *LeafUnl)
- func (o *RootUnl) SetName(v string)
- func (o *RootUnl) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *RootUnl) String() string
- func (o *RootUnl) UnmarshalBinary(data []byte) (err error)
- func (o *RootUnl) UnmarshalJSON(data []byte) (err error)
- func (o *RootUnl) UnmarshalStringMap(m map[string]interface{}) (err error)
- type RootUnlBuilder
- func (b *RootUnlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUnlBuilder
- func (b *RootUnlBuilder) Count() (int, error)
- func (b *RootUnlBuilder) Distinct() *RootUnlBuilder
- func (b *RootUnlBuilder) Get() (*RootUnl, error)
- func (b *RootUnlBuilder) GroupBy(nodes ...query.Node) *RootUnlBuilder
- func (b *RootUnlBuilder) Having(node query.Node) *RootUnlBuilder
- func (b *RootUnlBuilder) Limit(maxRowCount int, offset int) *RootUnlBuilder
- func (b *RootUnlBuilder) Load() (rootUnls []*RootUnl, err error)
- func (b *RootUnlBuilder) LoadCursor() (rootUnlsCursor, error)
- func (b *RootUnlBuilder) LoadI() (rootUnls []query.OrmObj, err error)
- func (b *RootUnlBuilder) OrderBy(nodes ...query.Sorter) *RootUnlBuilder
- func (b *RootUnlBuilder) Select(nodes ...query.Node) *RootUnlBuilder
- func (b *RootUnlBuilder) Where(c query.Node) *RootUnlBuilder
- type TimeoutTest
- func (o *TimeoutTest) Copy() (newObject *TimeoutTest)
- func (o *TimeoutTest) Delete(ctx context.Context) (err error)
- func (o *TimeoutTest) Get(key string) interface{}
- func (o *TimeoutTest) GetAlias(aliasKey string) query.AliasValue
- func (o *TimeoutTest) ID() query.AutoPrimaryKey
- func (o *TimeoutTest) IDIsLoaded() bool
- func (o *TimeoutTest) Initialize()
- func (o *TimeoutTest) IsDirty() (dirty bool)
- func (o *TimeoutTest) IsNew() bool
- func (o *TimeoutTest) Key() string
- func (o *TimeoutTest) Label() string
- func (o *TimeoutTest) MarshalBinary() ([]byte, error)
- func (o *TimeoutTest) MarshalJSON() (data []byte, err error)
- func (o *TimeoutTest) MarshalStringMap() map[string]interface{}
- func (o *TimeoutTest) Name() string
- func (o *TimeoutTest) NameIsLoaded() bool
- func (o *TimeoutTest) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *TimeoutTest) PrimaryKey() query.AutoPrimaryKey
- func (o *TimeoutTest) Save(ctx context.Context) error
- func (o *TimeoutTest) SetID(v query.AutoPrimaryKey)
- func (o *TimeoutTest) SetName(v string)
- func (o *TimeoutTest) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *TimeoutTest) String() string
- func (o *TimeoutTest) UnmarshalBinary(data []byte) (err error)
- func (o *TimeoutTest) UnmarshalJSON(data []byte) (err error)
- func (o *TimeoutTest) UnmarshalStringMap(m map[string]interface{}) (err error)
- type TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Count() (int, error)
- func (b *TimeoutTestBuilder) Distinct() *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Get() (*TimeoutTest, error)
- func (b *TimeoutTestBuilder) GroupBy(nodes ...query.Node) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Having(node query.Node) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Limit(maxRowCount int, offset int) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Load() (timeoutTests []*TimeoutTest, err error)
- func (b *TimeoutTestBuilder) LoadCursor() (timeoutTestsCursor, error)
- func (b *TimeoutTestBuilder) LoadI() (timeoutTests []query.OrmObj, err error)
- func (b *TimeoutTestBuilder) OrderBy(nodes ...query.Sorter) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Select(nodes ...query.Node) *TimeoutTestBuilder
- func (b *TimeoutTestBuilder) Where(c query.Node) *TimeoutTestBuilder
- type TwoKey
- func (o *TwoKey) Copy() (newObject *TwoKey)
- func (o *TwoKey) Delete(ctx context.Context) (err error)
- func (o *TwoKey) Directory() string
- func (o *TwoKey) DirectoryIsLoaded() bool
- func (o *TwoKey) FileName() string
- func (o *TwoKey) FileNameIsLoaded() bool
- func (o *TwoKey) Get(key string) interface{}
- func (o *TwoKey) GetAlias(aliasKey string) query.AliasValue
- func (o *TwoKey) Initialize()
- func (o *TwoKey) IsDirty() (dirty bool)
- func (o *TwoKey) IsNew() bool
- func (o *TwoKey) Key() string
- func (o *TwoKey) Label() string
- func (o *TwoKey) MarshalBinary() ([]byte, error)
- func (o *TwoKey) MarshalJSON() (data []byte, err error)
- func (o *TwoKey) MarshalStringMap() map[string]interface{}
- func (o *TwoKey) OriginalPrimaryKey() TwoKeyPrimaryKey
- func (o *TwoKey) PrimaryKey() TwoKeyPrimaryKey
- func (o *TwoKey) Save(ctx context.Context) error
- func (o *TwoKey) Server() string
- func (o *TwoKey) ServerIsLoaded() bool
- func (o *TwoKey) SetDirectory(v string)
- func (o *TwoKey) SetFileName(v string)
- func (o *TwoKey) SetPrimaryKey(v TwoKeyPrimaryKey)
- func (o *TwoKey) SetServer(v string)
- func (o *TwoKey) String() string
- func (o *TwoKey) UnmarshalBinary(data []byte) (err error)
- func (o *TwoKey) UnmarshalJSON(data []byte) (err error)
- func (o *TwoKey) UnmarshalStringMap(m map[string]interface{}) (err error)
- type TwoKeyBuilder
- func (b *TwoKeyBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Count() (int, error)
- func (b *TwoKeyBuilder) Distinct() *TwoKeyBuilder
- func (b *TwoKeyBuilder) Get() (*TwoKey, error)
- func (b *TwoKeyBuilder) GroupBy(nodes ...query.Node) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Having(node query.Node) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Limit(maxRowCount int, offset int) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Load() (twoKeys []*TwoKey, err error)
- func (b *TwoKeyBuilder) LoadCursor() (twoKeysCursor, error)
- func (b *TwoKeyBuilder) LoadI() (twoKeys []query.OrmObj, err error)
- func (b *TwoKeyBuilder) OrderBy(nodes ...query.Sorter) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Select(nodes ...query.Node) *TwoKeyBuilder
- func (b *TwoKeyBuilder) Where(c query.Node) *TwoKeyBuilder
- type TwoKeyPrimaryKey
- type TypeTest
- func (o *TypeTest) Copy() (newObject *TypeTest)
- func (o *TypeTest) CreationTime() time.Time
- func (o *TypeTest) CreationTimeIsLoaded() bool
- func (o *TypeTest) Date() time.Time
- func (o *TypeTest) DateIsLoaded() bool
- func (o *TypeTest) DateIsNull() bool
- func (o *TypeTest) DateTime() time.Time
- func (o *TypeTest) DateTimeIsLoaded() bool
- func (o *TypeTest) DateTimeIsNull() bool
- func (o *TypeTest) Delete(ctx context.Context) (err error)
- func (o *TypeTest) Get(key string) interface{}
- func (o *TypeTest) GetAlias(aliasKey string) query.AliasValue
- func (o *TypeTest) ID() query.AutoPrimaryKey
- func (o *TypeTest) IDIsLoaded() bool
- func (o *TypeTest) Initialize()
- func (o *TypeTest) IsDirty() (dirty bool)
- func (o *TypeTest) IsNew() bool
- func (o *TypeTest) Key() string
- func (o *TypeTest) Label() string
- func (o *TypeTest) MarshalBinary() ([]byte, error)
- func (o *TypeTest) MarshalJSON() (data []byte, err error)
- func (o *TypeTest) MarshalStringMap() map[string]interface{}
- func (o *TypeTest) ModifiedTime() time.Time
- func (o *TypeTest) ModifiedTimeIsLoaded() bool
- func (o *TypeTest) OriginalPrimaryKey() query.AutoPrimaryKey
- func (o *TypeTest) PrimaryKey() query.AutoPrimaryKey
- func (o *TypeTest) Save(ctx context.Context) error
- func (o *TypeTest) SetDate(v time.Time)
- func (o *TypeTest) SetDateTime(v time.Time)
- func (o *TypeTest) SetDateTimeToNull()
- func (o *TypeTest) SetDateToNull()
- func (o *TypeTest) SetID(v query.AutoPrimaryKey)
- func (o *TypeTest) SetPrimaryKey(v query.AutoPrimaryKey)
- func (o *TypeTest) SetTestBool(v bool)
- func (o *TypeTest) SetTestFloat32(v float32)
- func (o *TypeTest) SetTestFloat32ToNull()
- func (o *TypeTest) SetTestFloat64(v float64)
- func (o *TypeTest) SetTestInt(v int)
- func (o *TypeTest) SetTestInt64(v int64)
- func (o *TypeTest) SetTestIntToNull()
- func (o *TypeTest) SetTestLimitedBytes(v []byte)
- func (o *TypeTest) SetTestLimitedString(v string)
- func (o *TypeTest) SetTestLongstring(v string)
- func (o *TypeTest) SetTestNumeric(v string)
- func (o *TypeTest) SetTestUint64(v uint64)
- func (o *TypeTest) SetTestUnlimitedBytes(v []byte)
- func (o *TypeTest) SetTestUnlimitedString(v string)
- func (o *TypeTest) SetTestUnsigned(v uint)
- func (o *TypeTest) SetTime(v time.Time)
- func (o *TypeTest) SetTimeToNull()
- func (o *TypeTest) SetTypeLongBytes(v []byte)
- func (o *TypeTest) String() string
- func (o *TypeTest) TestBool() bool
- func (o *TypeTest) TestBoolIsLoaded() bool
- func (o *TypeTest) TestFloat32() float32
- func (o *TypeTest) TestFloat32IsLoaded() bool
- func (o *TypeTest) TestFloat32IsNull() bool
- func (o *TypeTest) TestFloat64() float64
- func (o *TypeTest) TestFloat64IsLoaded() bool
- func (o *TypeTest) TestInt() int
- func (o *TypeTest) TestInt64() int64
- func (o *TypeTest) TestInt64IsLoaded() bool
- func (o *TypeTest) TestIntIsLoaded() bool
- func (o *TypeTest) TestIntIsNull() bool
- func (o *TypeTest) TestLimitedBytes() []byte
- func (o *TypeTest) TestLimitedBytesIsLoaded() bool
- func (o *TypeTest) TestLimitedString() string
- func (o *TypeTest) TestLimitedStringIsLoaded() bool
- func (o *TypeTest) TestLongstring() string
- func (o *TypeTest) TestLongstringIsLoaded() bool
- func (o *TypeTest) TestNumeric() string
- func (o *TypeTest) TestNumericIsLoaded() bool
- func (o *TypeTest) TestUint64() uint64
- func (o *TypeTest) TestUint64IsLoaded() bool
- func (o *TypeTest) TestUnlimitedBytes() []byte
- func (o *TypeTest) TestUnlimitedBytesIsLoaded() bool
- func (o *TypeTest) TestUnlimitedString() string
- func (o *TypeTest) TestUnlimitedStringIsLoaded() bool
- func (o *TypeTest) TestUnsigned() uint
- func (o *TypeTest) TestUnsignedIsLoaded() bool
- func (o *TypeTest) Time() time.Time
- func (o *TypeTest) TimeIsLoaded() bool
- func (o *TypeTest) TimeIsNull() bool
- func (o *TypeTest) TypeLongBytes() []byte
- func (o *TypeTest) TypeLongBytesIsLoaded() bool
- func (o *TypeTest) UnmarshalBinary(data []byte) (err error)
- func (o *TypeTest) UnmarshalJSON(data []byte) (err error)
- func (o *TypeTest) UnmarshalStringMap(m map[string]interface{}) (err error)
- type TypeTestBuilder
- func (b *TypeTestBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TypeTestBuilder
- func (b *TypeTestBuilder) Count() (int, error)
- func (b *TypeTestBuilder) Distinct() *TypeTestBuilder
- func (b *TypeTestBuilder) Get() (*TypeTest, error)
- func (b *TypeTestBuilder) GroupBy(nodes ...query.Node) *TypeTestBuilder
- func (b *TypeTestBuilder) Having(node query.Node) *TypeTestBuilder
- func (b *TypeTestBuilder) Limit(maxRowCount int, offset int) *TypeTestBuilder
- func (b *TypeTestBuilder) Load() (typeTests []*TypeTest, err error)
- func (b *TypeTestBuilder) LoadCursor() (typeTestsCursor, error)
- func (b *TypeTestBuilder) LoadI() (typeTests []query.OrmObj, err error)
- func (b *TypeTestBuilder) OrderBy(nodes ...query.Sorter) *TypeTestBuilder
- func (b *TypeTestBuilder) Select(nodes ...query.Node) *TypeTestBuilder
- func (b *TypeTestBuilder) Where(c query.Node) *TypeTestBuilder
- type UnsupportedType
- func (o *UnsupportedType) Copy() (newObject *UnsupportedType)
- func (o *UnsupportedType) Delete(ctx context.Context) (err error)
- func (o *UnsupportedType) Get(key string) interface{}
- func (o *UnsupportedType) GetAlias(aliasKey string) query.AliasValue
- func (o *UnsupportedType) Initialize()
- func (o *UnsupportedType) IsDirty() (dirty bool)
- func (o *UnsupportedType) IsNew() bool
- func (o *UnsupportedType) Key() string
- func (o *UnsupportedType) Label() string
- func (o *UnsupportedType) MarshalBinary() ([]byte, error)
- func (o *UnsupportedType) MarshalJSON() (data []byte, err error)
- func (o *UnsupportedType) MarshalStringMap() map[string]interface{}
- func (o *UnsupportedType) OriginalPrimaryKey() uint64
- func (o *UnsupportedType) PrimaryKey() uint64
- func (o *UnsupportedType) Save(ctx context.Context) error
- func (o *UnsupportedType) SetPrimaryKey(v uint64)
- func (o *UnsupportedType) SetTypeBinary(v []byte)
- func (o *UnsupportedType) SetTypeEnumerated(v []byte)
- func (o *UnsupportedType) SetTypeGeo(v []byte)
- func (o *UnsupportedType) SetTypeMedium(v int)
- func (o *UnsupportedType) SetTypeMultFk1(v string)
- func (o *UnsupportedType) SetTypeMultiFk2(v string)
- func (o *UnsupportedType) SetTypePolygon(v []byte)
- func (o *UnsupportedType) SetTypeSerial(v uint64)
- func (o *UnsupportedType) SetTypeSet(v []byte)
- func (o *UnsupportedType) SetTypeSmall(v int)
- func (o *UnsupportedType) SetTypeTinyblob(v []byte)
- func (o *UnsupportedType) String() string
- func (o *UnsupportedType) TypeBinary() []byte
- func (o *UnsupportedType) TypeBinaryIsLoaded() bool
- func (o *UnsupportedType) TypeEnumerated() []byte
- func (o *UnsupportedType) TypeEnumeratedIsLoaded() bool
- func (o *UnsupportedType) TypeGeo() []byte
- func (o *UnsupportedType) TypeGeoIsLoaded() bool
- func (o *UnsupportedType) TypeMedium() int
- func (o *UnsupportedType) TypeMediumIsLoaded() bool
- func (o *UnsupportedType) TypeMultFk1() string
- func (o *UnsupportedType) TypeMultFk1IsLoaded() bool
- func (o *UnsupportedType) TypeMultiFk2() string
- func (o *UnsupportedType) TypeMultiFk2IsLoaded() bool
- func (o *UnsupportedType) TypePolygon() []byte
- func (o *UnsupportedType) TypePolygonIsLoaded() bool
- func (o *UnsupportedType) TypeSerial() uint64
- func (o *UnsupportedType) TypeSerialIsLoaded() bool
- func (o *UnsupportedType) TypeSet() []byte
- func (o *UnsupportedType) TypeSetIsLoaded() bool
- func (o *UnsupportedType) TypeSmall() int
- func (o *UnsupportedType) TypeSmallIsLoaded() bool
- func (o *UnsupportedType) TypeTinyblob() []byte
- func (o *UnsupportedType) TypeTinyblobIsLoaded() bool
- func (o *UnsupportedType) UnmarshalBinary(data []byte) (err error)
- func (o *UnsupportedType) UnmarshalJSON(data []byte) (err error)
- func (o *UnsupportedType) UnmarshalStringMap(m map[string]interface{}) (err error)
- type UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Count() (int, error)
- func (b *UnsupportedTypeBuilder) Distinct() *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Get() (*UnsupportedType, error)
- func (b *UnsupportedTypeBuilder) GroupBy(nodes ...query.Node) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Having(node query.Node) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Limit(maxRowCount int, offset int) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Load() (unsupportedTypes []*UnsupportedType, err error)
- func (b *UnsupportedTypeBuilder) LoadCursor() (unsupportedTypesCursor, error)
- func (b *UnsupportedTypeBuilder) LoadI() (unsupportedTypes []query.OrmObj, err error)
- func (b *UnsupportedTypeBuilder) OrderBy(nodes ...query.Sorter) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Select(nodes ...query.Node) *UnsupportedTypeBuilder
- func (b *UnsupportedTypeBuilder) Where(c query.Node) *UnsupportedTypeBuilder
Constants ¶
const ( AltLeafUnIDField = `id` AltLeafUnNameField = `name` AltLeafUnAltRootUnIDField = `altRootUnID` AltLeafUnAltRootUnField = `altRootUn` )
IDs used to access the AltLeafUn object fields by name using the Get function. doc: type=AltLeafUn
const ( AltRootUnIDField = `id` AltRootUnNameField = `name` AltRootUnAltLeafUnField = `altLeafUn` )
IDs used to access the AltRootUn object fields by name using the Get function. doc: type=AltRootUn
const ( AutoGenIDField = `id` AutoGenGroLockField = `groLock` AutoGenGroTimestampField = `groTimestamp` AutoGenCreatedField = `created` AutoGenModifiedField = `modified` AutoGenNameField = `name` )
IDs used to access the AutoGen object fields by name using the Get function. doc: type=AutoGen
const ( DoubleIndexIDField = `id` DoubleIndexFieldIntField = `fieldInt` DoubleIndexFieldStringField = `fieldString` DoubleIndexField2IntField = `field2Int` DoubleIndexField2StringField = `field2String` )
IDs used to access the DoubleIndex object fields by name using the Get function. doc: type=DoubleIndex
const ( LeafIDField = `id` LeafNameField = `name` LeafRootIDField = `rootID` LeafRootField = `root` )
IDs used to access the Leaf object fields by name using the Get function. doc: type=Leaf
const ( LeafLIDField = `id` LeafLNameField = `name` LeafLGroLockField = `groLock` LeafLRootLIDField = `rootLID` LeafLRootLField = `rootL` )
IDs used to access the LeafL object fields by name using the Get function. doc: type=LeafL
const ( LeafNIDField = `id` LeafNNameField = `name` LeafNRootNIDField = `rootNID` LeafNRootNField = `rootN` )
IDs used to access the LeafN object fields by name using the Get function. doc: type=LeafN
const ( LeafNlIDField = `id` LeafNlNameField = `name` LeafNlGroLockField = `groLock` LeafNlRootNlIDField = `rootNlID` LeafNlRootNlField = `rootNl` LeafNlLeaf2sField = `leaf2s` LeafNlLeaf1sField = `leaf1s` )
IDs used to access the LeafNl object fields by name using the Get function. doc: type=LeafNl
const ( LeafUIDField = `id` LeafUNameField = `name` LeafURootUIDField = `rootUID` LeafURootUField = `rootU` )
IDs used to access the LeafU object fields by name using the Get function. doc: type=LeafU
const ( LeafUlIDField = `id` LeafUlNameField = `name` LeafUlGroLockField = `groLock` LeafUlRootUlIDField = `rootUlID` LeafUlRootUlField = `rootUl` )
IDs used to access the LeafUl object fields by name using the Get function. doc: type=LeafUl
const ( LeafUnIDField = `id` LeafUnNameField = `name` LeafUnRootUnIDField = `rootUnID` LeafUnRootUnField = `rootUn` )
IDs used to access the LeafUn object fields by name using the Get function. doc: type=LeafUn
const ( LeafUnlIDField = `id` LeafUnlNameField = `name` LeafUnlGroLockField = `groLock` LeafUnlRootUnlIDField = `rootUnlID` LeafUnlRootUnlField = `rootUnl` )
IDs used to access the LeafUnl object fields by name using the Get function. doc: type=LeafUnl
const ( MultiParentIDField = `id` MultiParentNameField = `name` MultiParentParent1IDField = `parent1ID` MultiParentParent1Field = `parent1` MultiParentParent2IDField = `parent2ID` MultiParentParent2Field = `parent2` MultiParentParent1MultiParentField = `parent1MultiParents` MultiParentParent2MultiParentField = `parent2MultiParents` )
IDs used to access the MultiParent object fields by name using the Get function. doc: type=MultiParent
const ( RootIDField = `id` RootNameField = `name` RootLeafField = `leafs` )
IDs used to access the Root object fields by name using the Get function. doc: type=Root
const ( RootLIDField = `id` RootLNameField = `name` RootLGroLockField = `groLock` RootLLeafLField = `leafLs` )
IDs used to access the RootL object fields by name using the Get function. doc: type=RootL
const ( RootNIDField = `id` RootNNameField = `name` RootNLeafNField = `leafNs` )
IDs used to access the RootN object fields by name using the Get function. doc: type=RootN
const ( RootNlIDField = `id` RootNlNameField = `name` RootNlGroLockField = `groLock` RootNlLeafNlField = `leafNls` )
IDs used to access the RootNl object fields by name using the Get function. doc: type=RootNl
const ( RootUIDField = `id` RootUNameField = `name` RootULeafUField = `leafU` )
IDs used to access the RootU object fields by name using the Get function. doc: type=RootU
const ( RootUlIDField = `id` RootUlNameField = `name` RootUlGroLockField = `groLock` RootUlLeafUlField = `leafUl` )
IDs used to access the RootUl object fields by name using the Get function. doc: type=RootUl
const ( RootUnIDField = `id` RootUnNameField = `name` RootUnLeafUnField = `leafUn` )
IDs used to access the RootUn object fields by name using the Get function. doc: type=RootUn
const ( RootUnlIDField = `id` RootUnlNameField = `name` RootUnlGroLockField = `groLock` RootUnlLeafUnlField = `leafUnl` )
IDs used to access the RootUnl object fields by name using the Get function. doc: type=RootUnl
const ( TimeoutTestIDField = `id` TimeoutTestNameField = `name` )
IDs used to access the TimeoutTest object fields by name using the Get function. doc: type=TimeoutTest
const ( TwoKeyServerField = `server` TwoKeyDirectoryField = `directory` TwoKeyFileNameField = `fileName` )
IDs used to access the TwoKey object fields by name using the Get function. doc: type=TwoKey
const ( TypeTestIDField = `id` TypeTestDateField = `date` TypeTestTimeField = `time` TypeTestDateTimeField = `dateTime` TypeTestCreationTimeField = `creationTime` TypeTestModifiedTimeField = `modifiedTime` TypeTestTestIntField = `testInt` TypeTestTestUnsignedField = `testUnsigned` TypeTestTestInt64Field = `testInt64` TypeTestTestUint64Field = `testUint64` TypeTestTestFloat32Field = `testFloat32` TypeTestTestFloat64Field = `testFloat64` TypeTestTestNumericField = `testNumeric` TypeTestTestBoolField = `testBool` TypeTestTestUnlimitedStringField = `testUnlimitedString` TypeTestTestLimitedStringField = `testLimitedString` TypeTestTestLongstringField = `testLongstring` TypeTestTestUnlimitedBytesField = `testUnlimitedBytes` TypeTestTestLimitedBytesField = `testLimitedBytes` TypeTestTypeLongBytesField = `typeLongBytes` )
IDs used to access the TypeTest object fields by name using the Get function. doc: type=TypeTest
const ( UnsupportedTypeTypeSerialField = `typeSerial` UnsupportedTypeTypeSetField = `typeSet` UnsupportedTypeTypeEnumeratedField = `typeEnumerated` UnsupportedTypeTypeGeoField = `typeGeo` UnsupportedTypeTypeTinyblobField = `typeTinyblob` UnsupportedTypeTypeBinaryField = `typeBinary` UnsupportedTypeTypeSmallField = `typeSmall` UnsupportedTypeTypeMediumField = `typeMedium` UnsupportedTypeTypePolygonField = `typePolygon` UnsupportedTypeTypeMultFk1Field = `typeMultFk1` UnsupportedTypeTypeMultiFk2Field = `typeMultiFk2` )
IDs used to access the UnsupportedType object fields by name using the Get function. doc: type=UnsupportedType
const AltLeafUnNameMaxLength = 100 // The number of runes the column can hold
const AltRootUnNameMaxLength = 100 // The number of runes the column can hold
const AutoGenNameMaxLength = 30 // The number of runes the column can hold
const DoubleIndexField2IntMax = 2147483647
const DoubleIndexField2IntMin = -2147483648
const DoubleIndexField2StringMaxLength = 100 // The number of runes the column can hold
const DoubleIndexFieldIntMax = 2147483647
const DoubleIndexFieldIntMin = -2147483648
const DoubleIndexFieldStringMaxLength = 50 // The number of runes the column can hold
const DoubleIndexIDMax = 2147483647
const DoubleIndexIDMin = -2147483648
const LeafLNameMaxLength = 100 // The number of runes the column can hold
const LeafNNameMaxLength = 100 // The number of runes the column can hold
const LeafNameMaxLength = 100 // The number of runes the column can hold
const LeafNlNameMaxLength = 100 // The number of runes the column can hold
const LeafUNameMaxLength = 100 // The number of runes the column can hold
const LeafUlNameMaxLength = 100 // The number of runes the column can hold
const LeafUnNameMaxLength = 100 // The number of runes the column can hold
const LeafUnlNameMaxLength = 100 // The number of runes the column can hold
const MultiParentNameMaxLength = 100 // The number of runes the column can hold
const RootLNameMaxLength = 100 // The number of runes the column can hold
const RootNNameMaxLength = 100 // The number of runes the column can hold
const RootNameMaxLength = 100 // The number of runes the column can hold
const RootNlNameMaxLength = 100 // The number of runes the column can hold
const RootUNameMaxLength = 100 // The number of runes the column can hold
const RootUlNameMaxLength = 100 // The number of runes the column can hold
const RootUnNameMaxLength = 100 // The number of runes the column can hold
const RootUnlNameMaxLength = 100 // The number of runes the column can hold
const TimeoutTestNameMaxLength = 100 // The number of runes the column can hold
const TwoKeyDirectoryMaxLength = 50 // The number of runes the column can hold
const TwoKeyFileNameMaxLength = 50 // The number of runes the column can hold
const TwoKeyServerMaxLength = 50 // The number of runes the column can hold
const TypeTestTestIntMax = 2147483647
const TypeTestTestIntMin = -2147483648
const TypeTestTestLimitedBytesMaxLength = 10 // The number of bytes the column can hold
const TypeTestTestLimitedStringMaxLength = 10 // The number of runes the column can hold
const TypeTestTestLongstringMaxLength = 1000000000 // The number of runes the column can hold
const TypeTestTestNumericMaxLength = 12 // The number of runes the column can hold
const TypeTestTestUnsignedMax = 4294967295
const TypeTestTestUnsignedMin = 0
const TypeTestTypeLongBytesMaxLength = 4294967295 // The number of bytes the column can hold
const UnsupportedTypeTypeEnumeratedMaxLength = 1 // The number of bytes the column can hold
const UnsupportedTypeTypeMediumMax = 8388607
const UnsupportedTypeTypeMediumMin = -8388608
const UnsupportedTypeTypeMultFk1MaxLength = 50 // The number of runes the column can hold
const UnsupportedTypeTypeMultiFk2MaxLength = 50 // The number of runes the column can hold
const UnsupportedTypeTypeSetMaxLength = 5 // The number of bytes the column can hold
const UnsupportedTypeTypeSmallMax = 32767
const UnsupportedTypeTypeSmallMin = -32768
const UnsupportedTypeTypeTinyblobMaxLength = 255 // The number of bytes the column can hold
Variables ¶
This section is empty.
Functions ¶
func CountAltLeafUns ¶
CountAltLeafUns returns the total number of items in the alt_leaf_un table.
func CountAltLeafUnsByAltRootUnID ¶
CountAltLeafUnsByAltRootUnID queries the database and returns the number of AltLeafUn objects that have altRootUnID. doc: type=AltLeafUn
func CountAltRootUns ¶
CountAltRootUns returns the total number of items in the alt_root_un table.
func CountAutoGens ¶
CountAutoGens returns the total number of items in the auto_gen table.
func CountDoubleIndices ¶
CountDoubleIndices returns the total number of items in the double_index table.
func CountDoubleIndicesByField2IntField2String ¶
func CountDoubleIndicesByField2IntField2String(ctx context.Context, field2Int int, field2String string) (int, error)
CountDoubleIndicesByField2IntField2String queries the database and returns the number of DoubleIndex objects that have field2Int and field2String. doc: type=DoubleIndex
func CountDoubleIndicesByFieldIntFieldString ¶
func CountDoubleIndicesByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string) (int, error)
CountDoubleIndicesByFieldIntFieldString queries the database and returns the number of DoubleIndex objects that have fieldInt and fieldString. doc: type=DoubleIndex
func CountLeafLs ¶
CountLeafLs returns the total number of items in the leaf_l table.
func CountLeafLsByRootLID ¶
CountLeafLsByRootLID queries the database and returns the number of LeafL objects that have rootLID. doc: type=LeafL
func CountLeafNls ¶
CountLeafNls returns the total number of items in the leaf_nl table.
func CountLeafNlsByRootNlID ¶
CountLeafNlsByRootNlID queries the database and returns the number of LeafNl objects that have rootNlID. doc: type=LeafNl
func CountLeafNs ¶
CountLeafNs returns the total number of items in the leaf_n table.
func CountLeafNsByRootNID ¶
CountLeafNsByRootNID queries the database and returns the number of LeafN objects that have rootNID. doc: type=LeafN
func CountLeafUls ¶
CountLeafUls returns the total number of items in the leaf_ul table.
func CountLeafUlsByRootUlID ¶
CountLeafUlsByRootUlID queries the database and returns the number of LeafUl objects that have rootUlID. doc: type=LeafUl
func CountLeafUnls ¶
CountLeafUnls returns the total number of items in the leaf_unl table.
func CountLeafUnlsByRootUnlID ¶
CountLeafUnlsByRootUnlID queries the database and returns the number of LeafUnl objects that have rootUnlID. doc: type=LeafUnl
func CountLeafUns ¶
CountLeafUns returns the total number of items in the leaf_un table.
func CountLeafUnsByRootUnID ¶
CountLeafUnsByRootUnID queries the database and returns the number of LeafUn objects that have rootUnID. doc: type=LeafUn
func CountLeafUs ¶
CountLeafUs returns the total number of items in the leaf_u table.
func CountLeafUsByRootUID ¶
CountLeafUsByRootUID queries the database and returns the number of LeafU objects that have rootUID. doc: type=LeafU
func CountLeafs ¶
CountLeafs returns the total number of items in the leaf table.
func CountLeafsByRootID ¶
CountLeafsByRootID queries the database and returns the number of Leaf objects that have rootID. doc: type=Leaf
func CountMultiParents ¶
CountMultiParents returns the total number of items in the multi_parent table.
func CountMultiParentsByParent1ID ¶
CountMultiParentsByParent1ID queries the database and returns the number of MultiParent objects that have parent1ID. doc: type=MultiParent
func CountMultiParentsByParent2ID ¶
CountMultiParentsByParent2ID queries the database and returns the number of MultiParent objects that have parent2ID. doc: type=MultiParent
func CountRootLs ¶
CountRootLs returns the total number of items in the root_l table.
func CountRootNls ¶
CountRootNls returns the total number of items in the root_nl table.
func CountRootNs ¶
CountRootNs returns the total number of items in the root_n table.
func CountRootUls ¶
CountRootUls returns the total number of items in the root_ul table.
func CountRootUnls ¶
CountRootUnls returns the total number of items in the root_unl table.
func CountRootUns ¶
CountRootUns returns the total number of items in the root_un table.
func CountRootUs ¶
CountRootUs returns the total number of items in the root_u table.
func CountRoots ¶
CountRoots returns the total number of items in the root table.
func CountTimeoutTests ¶
CountTimeoutTests returns the total number of items in the timeout_test table.
func CountTwoKeys ¶
CountTwoKeys returns the total number of items in the two_key table.
func CountTypeTests ¶
CountTypeTests returns the total number of items in the type_test table.
func CountUnsupportedTypes ¶
CountUnsupportedTypes returns the total number of items in the unsupported_type table.
func CountUnsupportedTypesByTypeMultFk1TypeMultiFk2 ¶
func CountUnsupportedTypesByTypeMultFk1TypeMultiFk2(ctx context.Context, typeMultFk1 string, typeMultiFk2 string) (int, error)
CountUnsupportedTypesByTypeMultFk1TypeMultiFk2 queries the database and returns the number of UnsupportedType objects that have typeMultFk1 and typeMultiFk2. doc: type=UnsupportedType
func Database ¶
Database returns the database object corresponding to "goradd_unit" in the global database cluster. Use this to call directly into the database through the DatabaseI interface, or if you want to call functions specific to the database, cast the interface to the driver.
func DeleteAltLeafUn ¶
func DeleteAltLeafUn(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteAltLeafUn deletes the alt_leaf_un record with primary key pk from the database. Note that you can also delete loaded AltLeafUn objects by calling Delete on them. doc: type=AltLeafUn
func DeleteAltRootUn ¶
DeleteAltRootUn deletes the alt_root_un record with primary key pk from the database. Note that you can also delete loaded AltRootUn objects by calling Delete on them. doc: type=AltRootUn
func DeleteAutoGen ¶
func DeleteAutoGen(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteAutoGen deletes the auto_gen record with primary key pk from the database. Note that you can also delete loaded AutoGen objects by calling Delete on them. doc: type=AutoGen
func DeleteDoubleIndex ¶
DeleteDoubleIndex deletes the double_index record with primary key pk from the database. Note that you can also delete loaded DoubleIndex objects by calling Delete on them. doc: type=DoubleIndex
func DeleteLeaf ¶
func DeleteLeaf(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeaf deletes the leaf record with primary key pk from the database. Note that you can also delete loaded Leaf objects by calling Delete on them. doc: type=Leaf
func DeleteLeafL ¶
func DeleteLeafL(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafL deletes the leaf_l record with primary key pk from the database. Note that you can also delete loaded LeafL objects by calling Delete on them. doc: type=LeafL
func DeleteLeafN ¶
func DeleteLeafN(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafN deletes the leaf_n record with primary key pk from the database. Note that you can also delete loaded LeafN objects by calling Delete on them. doc: type=LeafN
func DeleteLeafNl ¶
func DeleteLeafNl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafNl deletes the leaf_nl record with primary key pk from the database. Note that you can also delete loaded LeafNl objects by calling Delete on them. doc: type=LeafNl
func DeleteLeafU ¶
func DeleteLeafU(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafU deletes the leaf_u record with primary key pk from the database. Note that you can also delete loaded LeafU objects by calling Delete on them. doc: type=LeafU
func DeleteLeafUl ¶
func DeleteLeafUl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafUl deletes the leaf_ul record with primary key pk from the database. Note that you can also delete loaded LeafUl objects by calling Delete on them. doc: type=LeafUl
func DeleteLeafUn ¶
func DeleteLeafUn(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafUn deletes the leaf_un record with primary key pk from the database. Note that you can also delete loaded LeafUn objects by calling Delete on them. doc: type=LeafUn
func DeleteLeafUnl ¶
func DeleteLeafUnl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteLeafUnl deletes the leaf_unl record with primary key pk from the database. Note that you can also delete loaded LeafUnl objects by calling Delete on them. doc: type=LeafUnl
func DeleteMultiParent ¶
func DeleteMultiParent(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteMultiParent deletes the multi_parent record with primary key pk from the database. Note that you can also delete loaded MultiParent objects by calling Delete on them. doc: type=MultiParent
func DeleteRoot ¶
func DeleteRoot(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRoot deletes the root record with primary key pk from the database. Note that you can also delete loaded Root objects by calling Delete on them. doc: type=Root
func DeleteRootL ¶
func DeleteRootL(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootL deletes the root_l record with primary key pk from the database. Note that you can also delete loaded RootL objects by calling Delete on them. doc: type=RootL
func DeleteRootN ¶
func DeleteRootN(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootN deletes the root_n record with primary key pk from the database. Note that you can also delete loaded RootN objects by calling Delete on them. doc: type=RootN
func DeleteRootNl ¶
func DeleteRootNl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootNl deletes the root_nl record with primary key pk from the database. Note that you can also delete loaded RootNl objects by calling Delete on them. doc: type=RootNl
func DeleteRootU ¶
func DeleteRootU(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootU deletes the root_u record with primary key pk from the database. Note that you can also delete loaded RootU objects by calling Delete on them. doc: type=RootU
func DeleteRootUl ¶
func DeleteRootUl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootUl deletes the root_ul record with primary key pk from the database. Note that you can also delete loaded RootUl objects by calling Delete on them. doc: type=RootUl
func DeleteRootUn ¶
func DeleteRootUn(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootUn deletes the root_un record with primary key pk from the database. Note that you can also delete loaded RootUn objects by calling Delete on them. doc: type=RootUn
func DeleteRootUnl ¶
func DeleteRootUnl(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteRootUnl deletes the root_unl record with primary key pk from the database. Note that you can also delete loaded RootUnl objects by calling Delete on them. doc: type=RootUnl
func DeleteTimeoutTest ¶
func DeleteTimeoutTest(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteTimeoutTest deletes the timeout_test record with primary key pk from the database. Note that you can also delete loaded TimeoutTest objects by calling Delete on them. doc: type=TimeoutTest
func DeleteTwoKey ¶
func DeleteTwoKey(ctx context.Context, pk TwoKeyPrimaryKey) error
DeleteTwoKey deletes the two_key record with primary key pk from the database. Note that you can also delete loaded TwoKey objects by calling Delete on them. doc: type=TwoKey
func DeleteTypeTest ¶
func DeleteTypeTest(ctx context.Context, pk query.AutoPrimaryKey) error
DeleteTypeTest deletes the type_test record with primary key pk from the database. Note that you can also delete loaded TypeTest objects by calling Delete on them. doc: type=TypeTest
func DeleteUnsupportedType ¶
DeleteUnsupportedType deletes the unsupported_type record with primary key pk from the database. Note that you can also delete loaded UnsupportedType objects by calling Delete on them. doc: type=UnsupportedType
func HasAltLeafUn ¶
HasAltLeafUn returns true if a AltLeafUn with the given primary key exists in the database. doc: type=AltLeafUn
func HasAltLeafUnByAltRootUnID ¶
HasAltLeafUnByAltRootUnID returns true if the given unique index values exist in the database. doc: type=AltLeafUn
func HasAltRootUn ¶
HasAltRootUn returns true if a AltRootUn with the given primary key exists in the database. doc: type=AltRootUn
func HasAutoGen ¶
HasAutoGen returns true if a AutoGen with the given primary key exists in the database. doc: type=AutoGen
func HasDoubleIndex ¶
HasDoubleIndex returns true if a DoubleIndex with the given primary key exists in the database. doc: type=DoubleIndex
func HasDoubleIndexByField2IntField2String ¶
func HasDoubleIndexByField2IntField2String(ctx context.Context, field2Int interface{}, field2String interface{}) (bool, error)
HasDoubleIndexByField2IntField2String returns true if the given unique index values exist in the database. doc: type=DoubleIndex
func HasDoubleIndexByFieldIntFieldString ¶
func HasDoubleIndexByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string) (bool, error)
HasDoubleIndexByFieldIntFieldString returns true if the given unique index values exist in the database. doc: type=DoubleIndex
func HasLeaf ¶
HasLeaf returns true if a Leaf with the given primary key exists in the database. doc: type=Leaf
func HasLeafByRootID ¶
HasLeafByRootID returns true if the given index values exist in the database. doc: type=Leaf
func HasLeafL ¶
HasLeafL returns true if a LeafL with the given primary key exists in the database. doc: type=LeafL
func HasLeafLByRootLID ¶
HasLeafLByRootLID returns true if the given index values exist in the database. doc: type=LeafL
func HasLeafN ¶
HasLeafN returns true if a LeafN with the given primary key exists in the database. doc: type=LeafN
func HasLeafNByRootNID ¶
HasLeafNByRootNID returns true if the given index values exist in the database. doc: type=LeafN
func HasLeafNl ¶
HasLeafNl returns true if a LeafNl with the given primary key exists in the database. doc: type=LeafNl
func HasLeafNlByRootNlID ¶
HasLeafNlByRootNlID returns true if the given index values exist in the database. doc: type=LeafNl
func HasLeafU ¶
HasLeafU returns true if a LeafU with the given primary key exists in the database. doc: type=LeafU
func HasLeafUByRootUID ¶
HasLeafUByRootUID returns true if the given unique index values exist in the database. doc: type=LeafU
func HasLeafUl ¶
HasLeafUl returns true if a LeafUl with the given primary key exists in the database. doc: type=LeafUl
func HasLeafUlByRootUlID ¶
HasLeafUlByRootUlID returns true if the given unique index values exist in the database. doc: type=LeafUl
func HasLeafUn ¶
HasLeafUn returns true if a LeafUn with the given primary key exists in the database. doc: type=LeafUn
func HasLeafUnByRootUnID ¶
HasLeafUnByRootUnID returns true if the given unique index values exist in the database. doc: type=LeafUn
func HasLeafUnl ¶
HasLeafUnl returns true if a LeafUnl with the given primary key exists in the database. doc: type=LeafUnl
func HasLeafUnlByRootUnlID ¶
HasLeafUnlByRootUnlID returns true if the given unique index values exist in the database. doc: type=LeafUnl
func HasMultiParent ¶
HasMultiParent returns true if a MultiParent with the given primary key exists in the database. doc: type=MultiParent
func HasMultiParentByParent1ID ¶
HasMultiParentByParent1ID returns true if the given index values exist in the database. doc: type=MultiParent
func HasMultiParentByParent2ID ¶
HasMultiParentByParent2ID returns true if the given index values exist in the database. doc: type=MultiParent
func HasRoot ¶
HasRoot returns true if a Root with the given primary key exists in the database. doc: type=Root
func HasRootL ¶
HasRootL returns true if a RootL with the given primary key exists in the database. doc: type=RootL
func HasRootN ¶
HasRootN returns true if a RootN with the given primary key exists in the database. doc: type=RootN
func HasRootNl ¶
HasRootNl returns true if a RootNl with the given primary key exists in the database. doc: type=RootNl
func HasRootU ¶
HasRootU returns true if a RootU with the given primary key exists in the database. doc: type=RootU
func HasRootUl ¶
HasRootUl returns true if a RootUl with the given primary key exists in the database. doc: type=RootUl
func HasRootUn ¶
HasRootUn returns true if a RootUn with the given primary key exists in the database. doc: type=RootUn
func HasRootUnl ¶
HasRootUnl returns true if a RootUnl with the given primary key exists in the database. doc: type=RootUnl
func HasTimeoutTest ¶
HasTimeoutTest returns true if a TimeoutTest with the given primary key exists in the database. doc: type=TimeoutTest
func HasTwoKey ¶
func HasTwoKey(ctx context.Context, pk TwoKeyPrimaryKey) (bool, error)
HasTwoKey returns true if a TwoKey with the given primary key exists in the database. doc: type=TwoKey
func HasTypeTest ¶
HasTypeTest returns true if a TypeTest with the given primary key exists in the database. doc: type=TypeTest
func HasUnsupportedType ¶
HasUnsupportedType returns true if a UnsupportedType with the given primary key exists in the database. doc: type=UnsupportedType
func HasUnsupportedTypeByTypeMultFk1TypeMultiFk2 ¶
func HasUnsupportedTypeByTypeMultFk1TypeMultiFk2(ctx context.Context, typeMultFk1 string, typeMultiFk2 string) (bool, error)
HasUnsupportedTypeByTypeMultFk1TypeMultiFk2 returns true if the given index values exist in the database. doc: type=UnsupportedType
func JsonDecodeAll ¶
JsonDecodeAll imports the entire database from JSON that was created using JsonEncodeAll. This is done within a transaction and with constraints off in case there are circular references.
Types ¶
type AltLeafUn ¶
type AltLeafUn struct {
// contains filtered or unexported fields
}
AltLeafUn represents an item in the alt_leaf_un table in the database.
func LoadAltLeafUn ¶
func LoadAltLeafUn(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*AltLeafUn, error)
LoadAltLeafUn returns a AltLeafUn from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [AltLeafUnsBuilder.Select] for more info.
func LoadAltLeafUnByAltRootUnID ¶
func LoadAltLeafUnByAltRootUnID(ctx context.Context, altRootUnID interface{}, selectNodes ...query.Node) (*AltLeafUn, error)
LoadAltLeafUnByAltRootUnID queries for a single AltLeafUn object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [AltLeafUnsBuilder.Select]. If you need a more elaborate query, use QueryAltLeafUns() to start a query builder.
func NewAltLeafUn ¶
func NewAltLeafUn() *AltLeafUn
NewAltLeafUn creates a new AltLeafUn object and initializes it to default values.
func (*AltLeafUn) AltRootUn ¶
func (o *AltLeafUn) AltRootUn() *AltRootUn
AltRootUn returns the current value of the loaded AltRootUn, and nil if its not loaded.
func (*AltLeafUn) AltRootUnID ¶
func (o *AltLeafUn) AltRootUnID() float32
AltRootUnID returns the value of the loaded alt_root_un_id field in the database.
func (*AltLeafUn) AltRootUnIDIsLoaded ¶
func (o *AltLeafUn) AltRootUnIDIsLoaded() bool
AltRootUnIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*AltLeafUn) AltRootUnIDIsNull ¶
func (o *AltLeafUn) AltRootUnIDIsNull() bool
AltRootUnIDIsNull returns true if the related database value is null.
func (*AltLeafUn) Copy ¶
func (o *AltLeafUn) Copy() (newObject *AltLeafUn)
Copy copies most fields to a new AltLeafUn object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*AltLeafUn) Get ¶
func (o *AltLeafUn) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*AltLeafUn) GetAlias ¶
func (o *AltLeafUn) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*AltLeafUn) ID ¶
func (o *AltLeafUn) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*AltLeafUn) IDIsLoaded ¶
func (o *AltLeafUn) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*AltLeafUn) Initialize ¶
func (o *AltLeafUn) Initialize()
Initialize will initialize or re-initialize a AltLeafUn database object to default values.
func (*AltLeafUn) IsDirty ¶
func (o *AltLeafUn) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*AltLeafUn) IsNew ¶
func (o *AltLeafUn) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*AltLeafUn) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*AltLeafUn) LoadAltRootUn ¶
LoadAltRootUn returns the related AltRootUn. If it is not already loaded, it will attempt to load it, provided the AltRootUnID column has been loaded first.
func (*AltLeafUn) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*AltLeafUn) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*AltLeafUn) MarshalStringMap ¶
func (o *AltLeafUn) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*AltLeafUn) Name ¶
func (o *AltLeafUn) Name() string
Name returns the value of the loaded name field in the database.
func (*AltLeafUn) NameIsLoaded ¶
func (o *AltLeafUn) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*AltLeafUn) OriginalPrimaryKey ¶
func (o *AltLeafUn) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*AltLeafUn) PrimaryKey ¶
func (o *AltLeafUn) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*AltLeafUn) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*AltLeafUn) SetAltRootUn ¶
func (o *AltLeafUn) SetAltRootUn(altRootUn *AltRootUn)
SetAltRootUn will set the reference to altRootUn. The referenced object will be saved when AltLeafUn is saved. Pass nil to break the connection.
func (*AltLeafUn) SetAltRootUnID ¶
func (o *AltLeafUn) SetAltRootUnID(v float32)
SetAltRootUnID sets the value of AltRootUnID in the object, to be saved later in the database using the Save() function.
func (*AltLeafUn) SetAltRootUnIDToNull ¶
func (o *AltLeafUn) SetAltRootUnIDToNull()
SetAltRootUnIDToNull() will set the alt_root_un_id value in the database to NULL. AltRootUnID() will return the column's default value after this. Will also set the attached o.AltRootUn to nil.
func (*AltLeafUn) SetID ¶
func (o *AltLeafUn) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AltLeafUn) SetName ¶
func (o *AltLeafUn) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*AltLeafUn) SetPrimaryKey ¶
func (o *AltLeafUn) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AltLeafUn) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*AltLeafUn) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a AltLeafUn object.
func (*AltLeafUn) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the AltLeafUn. The AltLeafUn can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*AltLeafUn) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in AltLeafUn to modify the json before sending it here.
type AltLeafUnBuilder ¶
type AltLeafUnBuilder struct {
// contains filtered or unexported fields
}
The AltLeafUnBuilder uses a builder pattern to create a query on the database. Create a AltLeafUnBuilder by calling QueryAltLeafUns, which will select all the AltLeafUn object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A AltLeafUnBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryAltLeafUns ¶
func QueryAltLeafUns(ctx context.Context) *AltLeafUnBuilder
QueryAltLeafUns returns a new query builder. See AltLeafUnBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*AltLeafUnBuilder) Calculation ¶
func (b *AltLeafUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AltLeafUnBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*AltLeafUnBuilder) Count ¶
func (b *AltLeafUnBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*AltLeafUnBuilder) Distinct ¶
func (b *AltLeafUnBuilder) Distinct() *AltLeafUnBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*AltLeafUnBuilder) Get ¶
func (b *AltLeafUnBuilder) Get() (*AltLeafUn, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*AltLeafUnBuilder) GroupBy ¶
func (b *AltLeafUnBuilder) GroupBy(nodes ...query.Node) *AltLeafUnBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*AltLeafUnBuilder) Having ¶
func (b *AltLeafUnBuilder) Having(node query.Node) *AltLeafUnBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*AltLeafUnBuilder) Limit ¶
func (b *AltLeafUnBuilder) Limit(maxRowCount int, offset int) *AltLeafUnBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*AltLeafUnBuilder) Load ¶
func (b *AltLeafUnBuilder) Load() (altLeafUns []*AltLeafUn, err error)
Load terminates the query builder, performs the query, and returns a slice of AltLeafUn objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AltLeafUnBuilder) LoadCursor ¶
func (b *AltLeafUnBuilder) LoadCursor() (altLeafUnsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*AltLeafUnBuilder) LoadI ¶
func (b *AltLeafUnBuilder) LoadI() (altLeafUns []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AltLeafUnBuilder) OrderBy ¶
func (b *AltLeafUnBuilder) OrderBy(nodes ...query.Sorter) *AltLeafUnBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*AltLeafUnBuilder) Select ¶
func (b *AltLeafUnBuilder) Select(nodes ...query.Node) *AltLeafUnBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the alt_leaf_un table will be queried and loaded. If nodes contains columns from the alt_leaf_un table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*AltLeafUnBuilder) Where ¶
func (b *AltLeafUnBuilder) Where(c query.Node) *AltLeafUnBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type AltRootUn ¶
type AltRootUn struct {
// contains filtered or unexported fields
}
AltRootUn represents an item in the alt_root_un table in the database.
func LoadAltRootUn ¶
LoadAltRootUn returns a AltRootUn from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [AltRootUnsBuilder.Select] for more info.
func NewAltRootUn ¶
func NewAltRootUn() *AltRootUn
NewAltRootUn creates a new AltRootUn object and initializes it to default values.
func (*AltRootUn) AltLeafUn ¶
func (o *AltRootUn) AltLeafUn() *AltLeafUn
AltLeafUn returns the connected AltLeafUn object, if one was loaded. Otherwise, it will return nil.
func (*AltRootUn) Copy ¶
func (o *AltRootUn) Copy() (newObject *AltRootUn)
Copy copies most fields to a new AltRootUn object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied. You will need to manually set the primary key field before saving. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*AltRootUn) Delete ¶
Delete deletes the record from the database.
An associated AltLeafUn will have its AltRootUn field set to NULL.
func (*AltRootUn) Get ¶
func (o *AltRootUn) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*AltRootUn) GetAlias ¶
func (o *AltRootUn) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*AltRootUn) ID ¶
func (o *AltRootUn) ID() float32
ID returns the loaded value of the id field in the database.
func (*AltRootUn) IDIsLoaded ¶
func (o *AltRootUn) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*AltRootUn) Initialize ¶
func (o *AltRootUn) Initialize()
Initialize will initialize or re-initialize a AltRootUn database object to default values.
func (*AltRootUn) IsDirty ¶
func (o *AltRootUn) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*AltRootUn) IsNew ¶
func (o *AltRootUn) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*AltRootUn) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*AltRootUn) LoadAltLeafUn ¶
LoadAltLeafUn returns the connected AltLeafUn object, if one was loaded. Otherwise, it will load a new one and return it.
func (*AltRootUn) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*AltRootUn) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*AltRootUn) MarshalStringMap ¶
func (o *AltRootUn) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*AltRootUn) Name ¶
func (o *AltRootUn) Name() string
Name returns the value of the loaded name field in the database.
func (*AltRootUn) NameIsLoaded ¶
func (o *AltRootUn) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*AltRootUn) OriginalPrimaryKey ¶
func (o *AltRootUn) OriginalPrimaryKey() float32
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*AltRootUn) PrimaryKey ¶
func (o *AltRootUn) PrimaryKey() float32
PrimaryKey returns the value of the primary key of the record.
func (*AltRootUn) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*AltRootUn) SetAltLeafUn ¶
func (o *AltRootUn) SetAltLeafUn(obj *AltLeafUn)
SetAltLeafUn associates obj with this AltRootUn through the reverse relationship in AltLeafUn.AltRootUn.
The association is temporary until you call Save(). Since this is a unique relationship, if a different AltLeafUn object is currently pointing to this AltRootUn, that AltLeafUn's AltRootUn value will be set to null when Save is called. If you did not use a join to query the attached AltLeafUn in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be inadvertently changing an item that is not currently attached to this AltRootUn.
func (*AltRootUn) SetID ¶
func (o *AltRootUn) SetID(v float32)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AltRootUn) SetName ¶
func (o *AltRootUn) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*AltRootUn) SetPrimaryKey ¶
func (o *AltRootUn) SetPrimaryKey(v float32)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AltRootUn) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*AltRootUn) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a AltRootUn object.
func (*AltRootUn) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the AltRootUn. The AltRootUn can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - float32 "name" - string
func (*AltRootUn) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in AltRootUn to modify the json before sending it here.
type AltRootUnBuilder ¶
type AltRootUnBuilder struct {
// contains filtered or unexported fields
}
The AltRootUnBuilder uses a builder pattern to create a query on the database. Create a AltRootUnBuilder by calling QueryAltRootUns, which will select all the AltRootUn object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A AltRootUnBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryAltRootUns ¶
func QueryAltRootUns(ctx context.Context) *AltRootUnBuilder
QueryAltRootUns returns a new query builder. See AltRootUnBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*AltRootUnBuilder) Calculation ¶
func (b *AltRootUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AltRootUnBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*AltRootUnBuilder) Count ¶
func (b *AltRootUnBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*AltRootUnBuilder) Distinct ¶
func (b *AltRootUnBuilder) Distinct() *AltRootUnBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*AltRootUnBuilder) Get ¶
func (b *AltRootUnBuilder) Get() (*AltRootUn, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*AltRootUnBuilder) GroupBy ¶
func (b *AltRootUnBuilder) GroupBy(nodes ...query.Node) *AltRootUnBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*AltRootUnBuilder) Having ¶
func (b *AltRootUnBuilder) Having(node query.Node) *AltRootUnBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*AltRootUnBuilder) Limit ¶
func (b *AltRootUnBuilder) Limit(maxRowCount int, offset int) *AltRootUnBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*AltRootUnBuilder) Load ¶
func (b *AltRootUnBuilder) Load() (altRootUns []*AltRootUn, err error)
Load terminates the query builder, performs the query, and returns a slice of AltRootUn objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AltRootUnBuilder) LoadCursor ¶
func (b *AltRootUnBuilder) LoadCursor() (altRootUnsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*AltRootUnBuilder) LoadI ¶
func (b *AltRootUnBuilder) LoadI() (altRootUns []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AltRootUnBuilder) OrderBy ¶
func (b *AltRootUnBuilder) OrderBy(nodes ...query.Sorter) *AltRootUnBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*AltRootUnBuilder) Select ¶
func (b *AltRootUnBuilder) Select(nodes ...query.Node) *AltRootUnBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the alt_root_un table will be queried and loaded. If nodes contains columns from the alt_root_un table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*AltRootUnBuilder) Where ¶
func (b *AltRootUnBuilder) Where(c query.Node) *AltRootUnBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type AutoGen ¶
type AutoGen struct {
// contains filtered or unexported fields
}
AutoGen represents an item in the auto_gen table in the database.
func LoadAutoGen ¶
func LoadAutoGen(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*AutoGen, error)
LoadAutoGen returns a AutoGen from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [AutoGensBuilder.Select] for more info.
func NewAutoGen ¶
func NewAutoGen() *AutoGen
NewAutoGen creates a new AutoGen object and initializes it to default values.
func (*AutoGen) Copy ¶
func (o *AutoGen) Copy() (newObject *AutoGen)
Copy copies most fields to a new AutoGen object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*AutoGen) CreatedIsLoaded ¶
func (o *AutoGen) CreatedIsLoaded() bool
CreatedIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) Get ¶
func (o *AutoGen) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*AutoGen) GetAlias ¶
func (o *AutoGen) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*AutoGen) GroLock ¶
func (o *AutoGen) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*AutoGen) GroLockIsLoaded ¶
func (o *AutoGen) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) GroTimestamp ¶
func (o *AutoGen) GroTimestamp() int64
GroTimestamp returns the value of the loaded gro_timestamp field in the database.
func (*AutoGen) GroTimestampIsLoaded ¶
func (o *AutoGen) GroTimestampIsLoaded() bool
GroTimestampIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) ID ¶
func (o *AutoGen) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*AutoGen) IDIsLoaded ¶
func (o *AutoGen) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) Initialize ¶
func (o *AutoGen) Initialize()
Initialize will initialize or re-initialize a AutoGen database object to default values.
func (*AutoGen) IsDirty ¶
func (o *AutoGen) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*AutoGen) IsNew ¶
func (o *AutoGen) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*AutoGen) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*AutoGen) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*AutoGen) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*AutoGen) MarshalStringMap ¶
func (o *AutoGen) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*AutoGen) ModifiedIsLoaded ¶
func (o *AutoGen) ModifiedIsLoaded() bool
ModifiedIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) ModifiedIsNull ¶
func (o *AutoGen) ModifiedIsNull() bool
ModifiedIsNull returns true if the related database value is null.
func (*AutoGen) Name ¶
func (o *AutoGen) Name() string
Name returns the value of the loaded name field in the database.
func (*AutoGen) NameIsLoaded ¶
func (o *AutoGen) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*AutoGen) OriginalPrimaryKey ¶
func (o *AutoGen) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*AutoGen) PrimaryKey ¶
func (o *AutoGen) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*AutoGen) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*AutoGen) SetID ¶
func (o *AutoGen) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AutoGen) SetName ¶
func (o *AutoGen) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*AutoGen) SetPrimaryKey ¶
func (o *AutoGen) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*AutoGen) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*AutoGen) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a AutoGen object.
func (*AutoGen) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the AutoGen. The AutoGen can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "groLock" - int64 "groTimestamp" - int64 "created" - time.Time "modified" - time.Time, nullable "name" - string
func (*AutoGen) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in AutoGen to modify the json before sending it here.
type AutoGenBuilder ¶
type AutoGenBuilder struct {
// contains filtered or unexported fields
}
The AutoGenBuilder uses a builder pattern to create a query on the database. Create a AutoGenBuilder by calling QueryAutoGens, which will select all the AutoGen object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A AutoGenBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryAutoGens ¶
func QueryAutoGens(ctx context.Context) *AutoGenBuilder
QueryAutoGens returns a new query builder. See AutoGenBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*AutoGenBuilder) Calculation ¶
func (b *AutoGenBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *AutoGenBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*AutoGenBuilder) Count ¶
func (b *AutoGenBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*AutoGenBuilder) Distinct ¶
func (b *AutoGenBuilder) Distinct() *AutoGenBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*AutoGenBuilder) Get ¶
func (b *AutoGenBuilder) Get() (*AutoGen, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*AutoGenBuilder) GroupBy ¶
func (b *AutoGenBuilder) GroupBy(nodes ...query.Node) *AutoGenBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*AutoGenBuilder) Having ¶
func (b *AutoGenBuilder) Having(node query.Node) *AutoGenBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*AutoGenBuilder) Limit ¶
func (b *AutoGenBuilder) Limit(maxRowCount int, offset int) *AutoGenBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*AutoGenBuilder) Load ¶
func (b *AutoGenBuilder) Load() (autoGens []*AutoGen, err error)
Load terminates the query builder, performs the query, and returns a slice of AutoGen objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AutoGenBuilder) LoadCursor ¶
func (b *AutoGenBuilder) LoadCursor() (autoGensCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*AutoGenBuilder) LoadI ¶
func (b *AutoGenBuilder) LoadI() (autoGens []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*AutoGenBuilder) OrderBy ¶
func (b *AutoGenBuilder) OrderBy(nodes ...query.Sorter) *AutoGenBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*AutoGenBuilder) Select ¶
func (b *AutoGenBuilder) Select(nodes ...query.Node) *AutoGenBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the auto_gen table will be queried and loaded. If nodes contains columns from the auto_gen table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*AutoGenBuilder) Where ¶
func (b *AutoGenBuilder) Where(c query.Node) *AutoGenBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type DoubleIndex ¶
type DoubleIndex struct {
// contains filtered or unexported fields
}
DoubleIndex represents an item in the double_index table in the database.
func LoadDoubleIndex ¶
LoadDoubleIndex returns a DoubleIndex from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [DoubleIndicesBuilder.Select] for more info.
func LoadDoubleIndexByField2IntField2String ¶
func LoadDoubleIndexByField2IntField2String(ctx context.Context, field2Int interface{}, field2String interface{}, selectNodes ...query.Node) (*DoubleIndex, error)
LoadDoubleIndexByField2IntField2String queries for a single DoubleIndex object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [DoubleIndicesBuilder.Select]. If you need a more elaborate query, use QueryDoubleIndices() to start a query builder.
func LoadDoubleIndexByFieldIntFieldString ¶
func LoadDoubleIndexByFieldIntFieldString(ctx context.Context, fieldInt int, fieldString string, selectNodes ...query.Node) (*DoubleIndex, error)
LoadDoubleIndexByFieldIntFieldString queries for a single DoubleIndex object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [DoubleIndicesBuilder.Select]. If you need a more elaborate query, use QueryDoubleIndices() to start a query builder.
func NewDoubleIndex ¶
func NewDoubleIndex() *DoubleIndex
NewDoubleIndex creates a new DoubleIndex object and initializes it to default values.
func (*DoubleIndex) Copy ¶
func (o *DoubleIndex) Copy() (newObject *DoubleIndex)
Copy copies most fields to a new DoubleIndex object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied. You will need to manually set the primary key field before saving. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*DoubleIndex) Field2Int ¶
func (o *DoubleIndex) Field2Int() int
Field2Int returns the value of the loaded field2_int field in the database.
func (*DoubleIndex) Field2IntIsLoaded ¶
func (o *DoubleIndex) Field2IntIsLoaded() bool
Field2IntIsLoaded returns true if the value was loaded from the database or has been set.
func (*DoubleIndex) Field2IntIsNull ¶
func (o *DoubleIndex) Field2IntIsNull() bool
Field2IntIsNull returns true if the related database value is null.
func (*DoubleIndex) Field2String ¶
func (o *DoubleIndex) Field2String() string
Field2String returns the value of the loaded field2_string field in the database.
func (*DoubleIndex) Field2StringIsLoaded ¶
func (o *DoubleIndex) Field2StringIsLoaded() bool
Field2StringIsLoaded returns true if the value was loaded from the database or has been set.
func (*DoubleIndex) Field2StringIsNull ¶
func (o *DoubleIndex) Field2StringIsNull() bool
Field2StringIsNull returns true if the related database value is null.
func (*DoubleIndex) FieldInt ¶
func (o *DoubleIndex) FieldInt() int
FieldInt returns the value of the loaded field_int field in the database.
func (*DoubleIndex) FieldIntIsLoaded ¶
func (o *DoubleIndex) FieldIntIsLoaded() bool
FieldIntIsLoaded returns true if the value was loaded from the database or has been set.
func (*DoubleIndex) FieldString ¶
func (o *DoubleIndex) FieldString() string
FieldString returns the value of the loaded field_string field in the database.
func (*DoubleIndex) FieldStringIsLoaded ¶
func (o *DoubleIndex) FieldStringIsLoaded() bool
FieldStringIsLoaded returns true if the value was loaded from the database or has been set.
func (*DoubleIndex) Get ¶
func (o *DoubleIndex) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*DoubleIndex) GetAlias ¶
func (o *DoubleIndex) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*DoubleIndex) ID ¶
func (o *DoubleIndex) ID() int
ID returns the loaded value of the id field in the database.
func (*DoubleIndex) IDIsLoaded ¶
func (o *DoubleIndex) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*DoubleIndex) Initialize ¶
func (o *DoubleIndex) Initialize()
Initialize will initialize or re-initialize a DoubleIndex database object to default values.
func (*DoubleIndex) IsDirty ¶
func (o *DoubleIndex) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*DoubleIndex) IsNew ¶
func (o *DoubleIndex) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*DoubleIndex) Key ¶
func (o *DoubleIndex) Key() string
Key returns a unique key for the object, among a list of similar objects.
func (*DoubleIndex) Label ¶
func (o *DoubleIndex) Label() string
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*DoubleIndex) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*DoubleIndex) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*DoubleIndex) MarshalStringMap ¶
func (o *DoubleIndex) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*DoubleIndex) OriginalPrimaryKey ¶
func (o *DoubleIndex) OriginalPrimaryKey() int
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*DoubleIndex) PrimaryKey ¶
func (o *DoubleIndex) PrimaryKey() int
PrimaryKey returns the value of the primary key of the record.
func (*DoubleIndex) Save ¶
func (o *DoubleIndex) Save(ctx context.Context) error
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*DoubleIndex) SetField2Int ¶
func (o *DoubleIndex) SetField2Int(v int)
SetField2Int sets the value of Field2Int in the object, to be saved later in the database using the Save() function.
func (*DoubleIndex) SetField2IntToNull ¶
func (o *DoubleIndex) SetField2IntToNull()
SetField2IntToNull() will set the field2_int value in the database to NULL. Field2Int() will return the column's default value after this.
func (*DoubleIndex) SetField2String ¶
func (o *DoubleIndex) SetField2String(v string)
SetField2String sets the value of Field2String in the object, to be saved later in the database using the Save() function.
func (*DoubleIndex) SetField2StringToNull ¶
func (o *DoubleIndex) SetField2StringToNull()
SetField2StringToNull() will set the field2_string value in the database to NULL. Field2String() will return the column's default value after this.
func (*DoubleIndex) SetFieldInt ¶
func (o *DoubleIndex) SetFieldInt(v int)
SetFieldInt sets the value of FieldInt in the object, to be saved later in the database using the Save() function.
func (*DoubleIndex) SetFieldString ¶
func (o *DoubleIndex) SetFieldString(v string)
SetFieldString sets the value of FieldString in the object, to be saved later in the database using the Save() function.
func (*DoubleIndex) SetID ¶
func (o *DoubleIndex) SetID(v int)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*DoubleIndex) SetPrimaryKey ¶
func (o *DoubleIndex) SetPrimaryKey(v int)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*DoubleIndex) String ¶
func (o *DoubleIndex) String() string
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*DoubleIndex) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a DoubleIndex object.
func (*DoubleIndex) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the DoubleIndex. The DoubleIndex can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - int "fieldInt" - int "fieldString" - string "field2Int" - int, nullable "field2String" - string, nullable
func (*DoubleIndex) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in DoubleIndex to modify the json before sending it here.
type DoubleIndexBuilder ¶
type DoubleIndexBuilder struct {
// contains filtered or unexported fields
}
The DoubleIndexBuilder uses a builder pattern to create a query on the database. Create a DoubleIndexBuilder by calling QueryDoubleIndices, which will select all the DoubleIndex object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A DoubleIndexBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryDoubleIndices ¶
func QueryDoubleIndices(ctx context.Context) *DoubleIndexBuilder
QueryDoubleIndices returns a new query builder. See DoubleIndexBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*DoubleIndexBuilder) Calculation ¶
func (b *DoubleIndexBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *DoubleIndexBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*DoubleIndexBuilder) Count ¶
func (b *DoubleIndexBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*DoubleIndexBuilder) Distinct ¶
func (b *DoubleIndexBuilder) Distinct() *DoubleIndexBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*DoubleIndexBuilder) Get ¶
func (b *DoubleIndexBuilder) Get() (*DoubleIndex, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*DoubleIndexBuilder) GroupBy ¶
func (b *DoubleIndexBuilder) GroupBy(nodes ...query.Node) *DoubleIndexBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*DoubleIndexBuilder) Having ¶
func (b *DoubleIndexBuilder) Having(node query.Node) *DoubleIndexBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*DoubleIndexBuilder) Limit ¶
func (b *DoubleIndexBuilder) Limit(maxRowCount int, offset int) *DoubleIndexBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*DoubleIndexBuilder) Load ¶
func (b *DoubleIndexBuilder) Load() (doubleIndices []*DoubleIndex, err error)
Load terminates the query builder, performs the query, and returns a slice of DoubleIndex objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*DoubleIndexBuilder) LoadCursor ¶
func (b *DoubleIndexBuilder) LoadCursor() (doubleIndicesCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*DoubleIndexBuilder) LoadI ¶
func (b *DoubleIndexBuilder) LoadI() (doubleIndices []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*DoubleIndexBuilder) OrderBy ¶
func (b *DoubleIndexBuilder) OrderBy(nodes ...query.Sorter) *DoubleIndexBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*DoubleIndexBuilder) Select ¶
func (b *DoubleIndexBuilder) Select(nodes ...query.Node) *DoubleIndexBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the double_index table will be queried and loaded. If nodes contains columns from the double_index table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*DoubleIndexBuilder) Where ¶
func (b *DoubleIndexBuilder) Where(c query.Node) *DoubleIndexBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type Leaf ¶
type Leaf struct {
// contains filtered or unexported fields
}
Leaf represents an item in the leaf table in the database.
func LoadLeaf ¶
func LoadLeaf(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*Leaf, error)
LoadLeaf returns a Leaf from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafsBuilder.Select] for more info.
func LoadLeafsByRootID ¶
func LoadLeafsByRootID(ctx context.Context, rootID query.AutoPrimaryKey, selectNodes ...query.Node) ([]*Leaf, error)
LoadLeafsByRootID queries Leaf objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafsBuilder.Select]. If you need a more elaborate query, use QueryLeafs() to start a query builder.
func NewLeaf ¶
func NewLeaf() *Leaf
NewLeaf creates a new Leaf object and initializes it to default values.
func (*Leaf) Copy ¶
func (o *Leaf) Copy() (newObject *Leaf)
Copy copies most fields to a new Leaf object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*Leaf) Get ¶
func (o *Leaf) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*Leaf) GetAlias ¶
func (o *Leaf) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*Leaf) ID ¶
func (o *Leaf) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*Leaf) IDIsLoaded ¶
func (o *Leaf) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*Leaf) Initialize ¶
func (o *Leaf) Initialize()
Initialize will initialize or re-initialize a Leaf database object to default values.
func (*Leaf) IsDirty ¶
func (o *Leaf) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*Leaf) IsNew ¶
func (o *Leaf) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*Leaf) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*Leaf) LoadRoot ¶
LoadRoot returns the related Root. If it is not already loaded, it will attempt to load it, provided the RootID column has been loaded first.
func (*Leaf) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*Leaf) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*Leaf) MarshalStringMap ¶
func (o *Leaf) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*Leaf) Name ¶
func (o *Leaf) Name() string
Name returns the value of the loaded name field in the database.
func (*Leaf) NameIsLoaded ¶
func (o *Leaf) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*Leaf) OriginalPrimaryKey ¶
func (o *Leaf) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*Leaf) PrimaryKey ¶
func (o *Leaf) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*Leaf) Root ¶
func (o *Leaf) Root() *Root
Root returns the current value of the loaded Root, and nil if its not loaded.
func (*Leaf) RootID ¶
func (o *Leaf) RootID() query.AutoPrimaryKey
RootID returns the value of the loaded root_id field in the database.
func (*Leaf) RootIDIsLoaded ¶
func (o *Leaf) RootIDIsLoaded() bool
RootIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*Leaf) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*Leaf) SetID ¶
func (o *Leaf) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*Leaf) SetName ¶
func (o *Leaf) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*Leaf) SetPrimaryKey ¶
func (o *Leaf) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*Leaf) SetRoot ¶
func (o *Leaf) SetRoot(root *Root)
SetRoot sets the value of Root in the object, to be saved later using the Save() function.
func (*Leaf) SetRootID ¶
func (o *Leaf) SetRootID(v query.AutoPrimaryKey)
SetRootID sets the value of RootID in the object, to be saved later in the database using the Save() function.
func (*Leaf) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*Leaf) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a Leaf object.
func (*Leaf) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the Leaf. The Leaf can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*Leaf) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in Leaf to modify the json before sending it here.
type LeafBuilder ¶
type LeafBuilder struct {
// contains filtered or unexported fields
}
The LeafBuilder uses a builder pattern to create a query on the database. Create a LeafBuilder by calling QueryLeafs, which will select all the Leaf object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafs ¶
func QueryLeafs(ctx context.Context) *LeafBuilder
QueryLeafs returns a new query builder. See LeafBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafBuilder) Calculation ¶
func (b *LeafBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafBuilder) Count ¶
func (b *LeafBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafBuilder) Distinct ¶
func (b *LeafBuilder) Distinct() *LeafBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafBuilder) Get ¶
func (b *LeafBuilder) Get() (*Leaf, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafBuilder) GroupBy ¶
func (b *LeafBuilder) GroupBy(nodes ...query.Node) *LeafBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafBuilder) Having ¶
func (b *LeafBuilder) Having(node query.Node) *LeafBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafBuilder) Limit ¶
func (b *LeafBuilder) Limit(maxRowCount int, offset int) *LeafBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafBuilder) Load ¶
func (b *LeafBuilder) Load() (leafs []*Leaf, err error)
Load terminates the query builder, performs the query, and returns a slice of Leaf objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafBuilder) LoadCursor ¶
func (b *LeafBuilder) LoadCursor() (leafsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafBuilder) LoadI ¶
func (b *LeafBuilder) LoadI() (leafs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafBuilder) OrderBy ¶
func (b *LeafBuilder) OrderBy(nodes ...query.Sorter) *LeafBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafBuilder) Select ¶
func (b *LeafBuilder) Select(nodes ...query.Node) *LeafBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf table will be queried and loaded. If nodes contains columns from the leaf table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafBuilder) Where ¶
func (b *LeafBuilder) Where(c query.Node) *LeafBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafL ¶
type LeafL struct {
// contains filtered or unexported fields
}
LeafL represents an item in the leaf_l table in the database.
func LoadLeafL ¶
func LoadLeafL(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafL, error)
LoadLeafL returns a LeafL from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafLsBuilder.Select] for more info.
func LoadLeafLsByRootLID ¶
func LoadLeafLsByRootLID(ctx context.Context, rootLID query.AutoPrimaryKey, selectNodes ...query.Node) ([]*LeafL, error)
LoadLeafLsByRootLID queries LeafL objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafLsBuilder.Select]. If you need a more elaborate query, use QueryLeafLs() to start a query builder.
func NewLeafL ¶
func NewLeafL() *LeafL
NewLeafL creates a new LeafL object and initializes it to default values.
func (*LeafL) Copy ¶
func (o *LeafL) Copy() (newObject *LeafL)
Copy copies most fields to a new LeafL object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafL) Get ¶
func (o *LeafL) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafL) GetAlias ¶
func (o *LeafL) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafL) GroLock ¶
func (o *LeafL) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*LeafL) GroLockIsLoaded ¶
func (o *LeafL) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafL) ID ¶
func (o *LeafL) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafL) IDIsLoaded ¶
func (o *LeafL) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafL) Initialize ¶
func (o *LeafL) Initialize()
Initialize will initialize or re-initialize a LeafL database object to default values.
func (*LeafL) IsDirty ¶
func (o *LeafL) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafL) IsNew ¶
func (o *LeafL) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafL) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafL) LoadRootL ¶
LoadRootL returns the related RootL. If it is not already loaded, it will attempt to load it, provided the RootLID column has been loaded first.
func (*LeafL) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafL) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafL) MarshalStringMap ¶
func (o *LeafL) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafL) Name ¶
func (o *LeafL) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafL) NameIsLoaded ¶
func (o *LeafL) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafL) OriginalPrimaryKey ¶
func (o *LeafL) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafL) PrimaryKey ¶
func (o *LeafL) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafL) RootL ¶
func (o *LeafL) RootL() *RootL
RootL returns the current value of the loaded RootL, and nil if its not loaded.
func (*LeafL) RootLID ¶
func (o *LeafL) RootLID() query.AutoPrimaryKey
RootLID returns the value of the loaded root_l_id field in the database.
func (*LeafL) RootLIDIsLoaded ¶
func (o *LeafL) RootLIDIsLoaded() bool
RootLIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafL) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafL) SetID ¶
func (o *LeafL) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafL) SetName ¶
func (o *LeafL) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafL) SetPrimaryKey ¶
func (o *LeafL) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafL) SetRootL ¶
func (o *LeafL) SetRootL(rootL *RootL)
SetRootL sets the value of RootL in the object, to be saved later using the Save() function.
func (*LeafL) SetRootLID ¶
func (o *LeafL) SetRootLID(v query.AutoPrimaryKey)
SetRootLID sets the value of RootLID in the object, to be saved later in the database using the Save() function.
func (*LeafL) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafL) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafL object.
func (*LeafL) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafL. The LeafL can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*LeafL) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafL to modify the json before sending it here.
type LeafLBuilder ¶
type LeafLBuilder struct {
// contains filtered or unexported fields
}
The LeafLBuilder uses a builder pattern to create a query on the database. Create a LeafLBuilder by calling QueryLeafLs, which will select all the LeafL object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafLBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafLs ¶
func QueryLeafLs(ctx context.Context) *LeafLBuilder
QueryLeafLs returns a new query builder. See LeafLBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafLBuilder) Calculation ¶
func (b *LeafLBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafLBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafLBuilder) Count ¶
func (b *LeafLBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafLBuilder) Distinct ¶
func (b *LeafLBuilder) Distinct() *LeafLBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafLBuilder) Get ¶
func (b *LeafLBuilder) Get() (*LeafL, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafLBuilder) GroupBy ¶
func (b *LeafLBuilder) GroupBy(nodes ...query.Node) *LeafLBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafLBuilder) Having ¶
func (b *LeafLBuilder) Having(node query.Node) *LeafLBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafLBuilder) Limit ¶
func (b *LeafLBuilder) Limit(maxRowCount int, offset int) *LeafLBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafLBuilder) Load ¶
func (b *LeafLBuilder) Load() (leafLs []*LeafL, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafL objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafLBuilder) LoadCursor ¶
func (b *LeafLBuilder) LoadCursor() (leafLsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafLBuilder) LoadI ¶
func (b *LeafLBuilder) LoadI() (leafLs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafLBuilder) OrderBy ¶
func (b *LeafLBuilder) OrderBy(nodes ...query.Sorter) *LeafLBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafLBuilder) Select ¶
func (b *LeafLBuilder) Select(nodes ...query.Node) *LeafLBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_l table will be queried and loaded. If nodes contains columns from the leaf_l table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafLBuilder) Where ¶
func (b *LeafLBuilder) Where(c query.Node) *LeafLBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafN ¶
type LeafN struct {
// contains filtered or unexported fields
}
LeafN represents an item in the leaf_n table in the database.
func LoadLeafN ¶
func LoadLeafN(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafN, error)
LoadLeafN returns a LeafN from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafNsBuilder.Select] for more info.
func LoadLeafNsByRootNID ¶
func LoadLeafNsByRootNID(ctx context.Context, rootNID interface{}, selectNodes ...query.Node) ([]*LeafN, error)
LoadLeafNsByRootNID queries LeafN objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafNsBuilder.Select]. If you need a more elaborate query, use QueryLeafNs() to start a query builder.
func NewLeafN ¶
func NewLeafN() *LeafN
NewLeafN creates a new LeafN object and initializes it to default values.
func (*LeafN) Copy ¶
func (o *LeafN) Copy() (newObject *LeafN)
Copy copies most fields to a new LeafN object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafN) Get ¶
func (o *LeafN) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafN) GetAlias ¶
func (o *LeafN) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafN) ID ¶
func (o *LeafN) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafN) IDIsLoaded ¶
func (o *LeafN) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafN) Initialize ¶
func (o *LeafN) Initialize()
Initialize will initialize or re-initialize a LeafN database object to default values.
func (*LeafN) IsDirty ¶
func (o *LeafN) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafN) IsNew ¶
func (o *LeafN) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafN) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafN) LoadRootN ¶
LoadRootN returns the related RootN. If it is not already loaded, it will attempt to load it, provided the RootNID column has been loaded first.
func (*LeafN) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafN) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafN) MarshalStringMap ¶
func (o *LeafN) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafN) Name ¶
func (o *LeafN) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafN) NameIsLoaded ¶
func (o *LeafN) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafN) OriginalPrimaryKey ¶
func (o *LeafN) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafN) PrimaryKey ¶
func (o *LeafN) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafN) RootN ¶
func (o *LeafN) RootN() *RootN
RootN returns the current value of the loaded RootN, and nil if its not loaded.
func (*LeafN) RootNID ¶
func (o *LeafN) RootNID() query.AutoPrimaryKey
RootNID returns the value of the loaded root_n_id field in the database.
func (*LeafN) RootNIDIsLoaded ¶
func (o *LeafN) RootNIDIsLoaded() bool
RootNIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafN) RootNIDIsNull ¶
func (o *LeafN) RootNIDIsNull() bool
RootNIDIsNull returns true if the related database value is null.
func (*LeafN) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafN) SetID ¶
func (o *LeafN) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafN) SetName ¶
func (o *LeafN) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafN) SetPrimaryKey ¶
func (o *LeafN) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafN) SetRootN ¶
func (o *LeafN) SetRootN(rootN *RootN)
SetRootN will set the reference to rootN. The referenced object will be saved when LeafN is saved. Pass nil to break the connection.
func (*LeafN) SetRootNID ¶
func (o *LeafN) SetRootNID(v query.AutoPrimaryKey)
SetRootNID sets the value of RootNID in the object, to be saved later in the database using the Save() function.
func (*LeafN) SetRootNIDToNull ¶
func (o *LeafN) SetRootNIDToNull()
SetRootNIDToNull() will set the root_n_id value in the database to NULL. RootNID() will return the column's default value after this. Will also set the attached o.RootN to nil.
func (*LeafN) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafN) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafN object.
func (*LeafN) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafN. The LeafN can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*LeafN) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafN to modify the json before sending it here.
type LeafNBuilder ¶
type LeafNBuilder struct {
// contains filtered or unexported fields
}
The LeafNBuilder uses a builder pattern to create a query on the database. Create a LeafNBuilder by calling QueryLeafNs, which will select all the LeafN object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafNBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafNs ¶
func QueryLeafNs(ctx context.Context) *LeafNBuilder
QueryLeafNs returns a new query builder. See LeafNBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafNBuilder) Calculation ¶
func (b *LeafNBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafNBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafNBuilder) Count ¶
func (b *LeafNBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafNBuilder) Distinct ¶
func (b *LeafNBuilder) Distinct() *LeafNBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafNBuilder) Get ¶
func (b *LeafNBuilder) Get() (*LeafN, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafNBuilder) GroupBy ¶
func (b *LeafNBuilder) GroupBy(nodes ...query.Node) *LeafNBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafNBuilder) Having ¶
func (b *LeafNBuilder) Having(node query.Node) *LeafNBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafNBuilder) Limit ¶
func (b *LeafNBuilder) Limit(maxRowCount int, offset int) *LeafNBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafNBuilder) Load ¶
func (b *LeafNBuilder) Load() (leafNs []*LeafN, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafN objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafNBuilder) LoadCursor ¶
func (b *LeafNBuilder) LoadCursor() (leafNsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafNBuilder) LoadI ¶
func (b *LeafNBuilder) LoadI() (leafNs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafNBuilder) OrderBy ¶
func (b *LeafNBuilder) OrderBy(nodes ...query.Sorter) *LeafNBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafNBuilder) Select ¶
func (b *LeafNBuilder) Select(nodes ...query.Node) *LeafNBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_n table will be queried and loaded. If nodes contains columns from the leaf_n table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafNBuilder) Where ¶
func (b *LeafNBuilder) Where(c query.Node) *LeafNBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafNl ¶
type LeafNl struct {
// contains filtered or unexported fields
}
LeafNl represents an item in the leaf_nl table in the database.
func LoadLeafNl ¶
func LoadLeafNl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafNl, error)
LoadLeafNl returns a LeafNl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafNlsBuilder.Select] for more info.
func LoadLeafNlsByRootNlID ¶
func LoadLeafNlsByRootNlID(ctx context.Context, rootNlID interface{}, selectNodes ...query.Node) ([]*LeafNl, error)
LoadLeafNlsByRootNlID queries LeafNl objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafNlsBuilder.Select]. If you need a more elaborate query, use QueryLeafNls() to start a query builder.
func NewLeafNl ¶
func NewLeafNl() *LeafNl
NewLeafNl creates a new LeafNl object and initializes it to default values.
func (*LeafNl) Copy ¶
func (o *LeafNl) Copy() (newObject *LeafNl)
Copy copies most fields to a new LeafNl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafNl) CountLeaf1s ¶
CountLeaf1s counts the number of associated leaf1s objects in the database. Note that this returns what is reflected by the database at that instant, and not what is the count of the loaded objects.
func (*LeafNl) CountLeaf2s ¶
CountLeaf2s counts the number of associated leaf2s objects in the database. Note that this returns what is reflected by the database at that instant, and not what is the count of the loaded objects.
func (*LeafNl) Get ¶
func (o *LeafNl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafNl) GetAlias ¶
func (o *LeafNl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafNl) GroLock ¶
func (o *LeafNl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*LeafNl) GroLockIsLoaded ¶
func (o *LeafNl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafNl) ID ¶
func (o *LeafNl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafNl) IDIsLoaded ¶
func (o *LeafNl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafNl) Initialize ¶
func (o *LeafNl) Initialize()
Initialize will initialize or re-initialize a LeafNl database object to default values.
func (*LeafNl) IsDirty ¶
func (o *LeafNl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafNl) IsNew ¶
func (o *LeafNl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafNl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafNl) Leaf1 ¶
func (o *LeafNl) Leaf1(pk query.AutoPrimaryKey) *LeafNl
Leaf1 returns a single LeafNl object by primary key pk, if one was loaded. Otherwise, it will return nil.
func (*LeafNl) Leaf1s ¶
func (o *LeafNl) Leaf1s() []*LeafNl
Leaf1s returns a slice of LeafNl objects if loaded. If not loaded, will return nil. The values will be ordered by the latest query or in the order they were assigned.
func (*LeafNl) Leaf2 ¶
func (o *LeafNl) Leaf2(pk query.AutoPrimaryKey) *LeafNl
Leaf2 returns a single LeafNl object by primary key pk, if one was loaded. Otherwise, it will return nil.
func (*LeafNl) Leaf2s ¶
func (o *LeafNl) Leaf2s() []*LeafNl
Leaf2s returns a slice of LeafNl objects if loaded. If not loaded, will return nil. The values will be ordered by the latest query or in the order they were assigned.
func (*LeafNl) LoadLeaf1s ¶
LoadLeaf1s loads the LeafNl objects associated through the Leaf1-Leaf2 relationship.
func (*LeafNl) LoadLeaf2s ¶
LoadLeaf2s loads the LeafNl objects associated through the Leaf2-Leaf1 relationship.
func (*LeafNl) LoadRootNl ¶
LoadRootNl returns the related RootNl. If it is not already loaded, it will attempt to load it, provided the RootNlID column has been loaded first.
func (*LeafNl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafNl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafNl) MarshalStringMap ¶
func (o *LeafNl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafNl) Name ¶
func (o *LeafNl) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafNl) NameIsLoaded ¶
func (o *LeafNl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafNl) OriginalPrimaryKey ¶
func (o *LeafNl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafNl) PrimaryKey ¶
func (o *LeafNl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafNl) RootNl ¶
func (o *LeafNl) RootNl() *RootNl
RootNl returns the current value of the loaded RootNl, and nil if its not loaded.
func (*LeafNl) RootNlID ¶
func (o *LeafNl) RootNlID() query.AutoPrimaryKey
RootNlID returns the value of the loaded root_nl_id field in the database.
func (*LeafNl) RootNlIDIsLoaded ¶
func (o *LeafNl) RootNlIDIsLoaded() bool
RootNlIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafNl) RootNlIDIsNull ¶
func (o *LeafNl) RootNlIDIsNull() bool
RootNlIDIsNull returns true if the related database value is null.
func (*LeafNl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafNl) SetID ¶
func (o *LeafNl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafNl) SetLeaf1s ¶
func (o *LeafNl) SetLeaf1s(objs ...*LeafNl)
SetLeaf1s sets the associated objects to the given slice of LeafNl objects in preparation for saving. The associations will not be updated until Save() is called. Objects that are modified or are new will be saved before completing the association.
func (*LeafNl) SetLeaf1sByID ¶
func (o *LeafNl) SetLeaf1sByID(ids ...query.AutoPrimaryKey)
SetLeaf1sByID prepares to associate LeafNl objects by the primary keys in ids. If objects are currently loaded, they will be unloaded. The association does not take place until Save() is called. Calling Load before calling Save will load the items that will be associated in the database after the Save call. After calling Save, the objects will be unloaded, and you must call Load again if you want them loaded.
func (*LeafNl) SetLeaf2s ¶
func (o *LeafNl) SetLeaf2s(objs ...*LeafNl)
SetLeaf2s sets the associated objects to the given slice of LeafNl objects in preparation for saving. The associations will not be updated until Save() is called. Objects that are modified or are new will be saved before completing the association.
func (*LeafNl) SetLeaf2sByID ¶
func (o *LeafNl) SetLeaf2sByID(ids ...query.AutoPrimaryKey)
SetLeaf2sByID prepares to associate LeafNl objects by the primary keys in ids. If objects are currently loaded, they will be unloaded. The association does not take place until Save() is called. Calling Load before calling Save will load the items that will be associated in the database after the Save call. After calling Save, the objects will be unloaded, and you must call Load again if you want them loaded.
func (*LeafNl) SetName ¶
func (o *LeafNl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafNl) SetPrimaryKey ¶
func (o *LeafNl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafNl) SetRootNl ¶
func (o *LeafNl) SetRootNl(rootNl *RootNl)
SetRootNl will set the reference to rootNl. The referenced object will be saved when LeafNl is saved. Pass nil to break the connection.
func (*LeafNl) SetRootNlID ¶
func (o *LeafNl) SetRootNlID(v query.AutoPrimaryKey)
SetRootNlID sets the value of RootNlID in the object, to be saved later in the database using the Save() function.
func (*LeafNl) SetRootNlIDToNull ¶
func (o *LeafNl) SetRootNlIDToNull()
SetRootNlIDToNull() will set the root_nl_id value in the database to NULL. RootNlID() will return the column's default value after this. Will also set the attached o.RootNl to nil.
func (*LeafNl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafNl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafNl object.
func (*LeafNl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafNl. The LeafNl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*LeafNl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafNl to modify the json before sending it here.
type LeafNlBuilder ¶
type LeafNlBuilder struct {
// contains filtered or unexported fields
}
The LeafNlBuilder uses a builder pattern to create a query on the database. Create a LeafNlBuilder by calling QueryLeafNls, which will select all the LeafNl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafNlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafNls ¶
func QueryLeafNls(ctx context.Context) *LeafNlBuilder
QueryLeafNls returns a new query builder. See LeafNlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafNlBuilder) Calculation ¶
func (b *LeafNlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafNlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafNlBuilder) Count ¶
func (b *LeafNlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafNlBuilder) Distinct ¶
func (b *LeafNlBuilder) Distinct() *LeafNlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafNlBuilder) Get ¶
func (b *LeafNlBuilder) Get() (*LeafNl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafNlBuilder) GroupBy ¶
func (b *LeafNlBuilder) GroupBy(nodes ...query.Node) *LeafNlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafNlBuilder) Having ¶
func (b *LeafNlBuilder) Having(node query.Node) *LeafNlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafNlBuilder) Limit ¶
func (b *LeafNlBuilder) Limit(maxRowCount int, offset int) *LeafNlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafNlBuilder) Load ¶
func (b *LeafNlBuilder) Load() (leafNls []*LeafNl, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafNl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafNlBuilder) LoadCursor ¶
func (b *LeafNlBuilder) LoadCursor() (leafNlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafNlBuilder) LoadI ¶
func (b *LeafNlBuilder) LoadI() (leafNls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafNlBuilder) OrderBy ¶
func (b *LeafNlBuilder) OrderBy(nodes ...query.Sorter) *LeafNlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafNlBuilder) Select ¶
func (b *LeafNlBuilder) Select(nodes ...query.Node) *LeafNlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_nl table will be queried and loaded. If nodes contains columns from the leaf_nl table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafNlBuilder) Where ¶
func (b *LeafNlBuilder) Where(c query.Node) *LeafNlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafU ¶
type LeafU struct {
// contains filtered or unexported fields
}
LeafU represents an item in the leaf_u table in the database.
func LoadLeafU ¶
func LoadLeafU(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafU, error)
LoadLeafU returns a LeafU from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafUsBuilder.Select] for more info.
func LoadLeafUByRootUID ¶
func LoadLeafUByRootUID(ctx context.Context, rootUID query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafU, error)
LoadLeafUByRootUID queries for a single LeafU object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafUsBuilder.Select]. If you need a more elaborate query, use QueryLeafUs() to start a query builder.
func NewLeafU ¶
func NewLeafU() *LeafU
NewLeafU creates a new LeafU object and initializes it to default values.
func (*LeafU) Copy ¶
func (o *LeafU) Copy() (newObject *LeafU)
Copy copies most fields to a new LeafU object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafU) Get ¶
func (o *LeafU) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafU) GetAlias ¶
func (o *LeafU) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafU) ID ¶
func (o *LeafU) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafU) IDIsLoaded ¶
func (o *LeafU) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafU) Initialize ¶
func (o *LeafU) Initialize()
Initialize will initialize or re-initialize a LeafU database object to default values.
func (*LeafU) IsDirty ¶
func (o *LeafU) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafU) IsNew ¶
func (o *LeafU) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafU) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafU) LoadRootU ¶
LoadRootU returns the related RootU. If it is not already loaded, it will attempt to load it, provided the RootUID column has been loaded first.
func (*LeafU) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafU) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafU) MarshalStringMap ¶
func (o *LeafU) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafU) Name ¶
func (o *LeafU) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafU) NameIsLoaded ¶
func (o *LeafU) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafU) OriginalPrimaryKey ¶
func (o *LeafU) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafU) PrimaryKey ¶
func (o *LeafU) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafU) RootU ¶
func (o *LeafU) RootU() *RootU
RootU returns the current value of the loaded RootU, and nil if its not loaded.
func (*LeafU) RootUID ¶
func (o *LeafU) RootUID() query.AutoPrimaryKey
RootUID returns the value of the loaded root_u_id field in the database.
func (*LeafU) RootUIDIsLoaded ¶
func (o *LeafU) RootUIDIsLoaded() bool
RootUIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafU) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafU) SetID ¶
func (o *LeafU) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafU) SetName ¶
func (o *LeafU) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafU) SetPrimaryKey ¶
func (o *LeafU) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafU) SetRootU ¶
func (o *LeafU) SetRootU(rootU *RootU)
SetRootU sets the value of RootU in the object, to be saved later using the Save() function.
func (*LeafU) SetRootUID ¶
func (o *LeafU) SetRootUID(v query.AutoPrimaryKey)
SetRootUID sets the value of RootUID in the object, to be saved later in the database using the Save() function.
func (*LeafU) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafU) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafU object.
func (*LeafU) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafU. The LeafU can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*LeafU) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafU to modify the json before sending it here.
type LeafUBuilder ¶
type LeafUBuilder struct {
// contains filtered or unexported fields
}
The LeafUBuilder uses a builder pattern to create a query on the database. Create a LeafUBuilder by calling QueryLeafUs, which will select all the LeafU object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafUBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafUs ¶
func QueryLeafUs(ctx context.Context) *LeafUBuilder
QueryLeafUs returns a new query builder. See LeafUBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafUBuilder) Calculation ¶
func (b *LeafUBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafUBuilder) Count ¶
func (b *LeafUBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafUBuilder) Distinct ¶
func (b *LeafUBuilder) Distinct() *LeafUBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafUBuilder) Get ¶
func (b *LeafUBuilder) Get() (*LeafU, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafUBuilder) GroupBy ¶
func (b *LeafUBuilder) GroupBy(nodes ...query.Node) *LeafUBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafUBuilder) Having ¶
func (b *LeafUBuilder) Having(node query.Node) *LeafUBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafUBuilder) Limit ¶
func (b *LeafUBuilder) Limit(maxRowCount int, offset int) *LeafUBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafUBuilder) Load ¶
func (b *LeafUBuilder) Load() (leafUs []*LeafU, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafU objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUBuilder) LoadCursor ¶
func (b *LeafUBuilder) LoadCursor() (leafUsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafUBuilder) LoadI ¶
func (b *LeafUBuilder) LoadI() (leafUs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUBuilder) OrderBy ¶
func (b *LeafUBuilder) OrderBy(nodes ...query.Sorter) *LeafUBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafUBuilder) Select ¶
func (b *LeafUBuilder) Select(nodes ...query.Node) *LeafUBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_u table will be queried and loaded. If nodes contains columns from the leaf_u table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafUBuilder) Where ¶
func (b *LeafUBuilder) Where(c query.Node) *LeafUBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafUl ¶
type LeafUl struct {
// contains filtered or unexported fields
}
LeafUl represents an item in the leaf_ul table in the database.
func LoadLeafUl ¶
func LoadLeafUl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafUl, error)
LoadLeafUl returns a LeafUl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafUlsBuilder.Select] for more info.
func LoadLeafUlByRootUlID ¶
func LoadLeafUlByRootUlID(ctx context.Context, rootUlID query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafUl, error)
LoadLeafUlByRootUlID queries for a single LeafUl object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafUlsBuilder.Select]. If you need a more elaborate query, use QueryLeafUls() to start a query builder.
func NewLeafUl ¶
func NewLeafUl() *LeafUl
NewLeafUl creates a new LeafUl object and initializes it to default values.
func (*LeafUl) Copy ¶
func (o *LeafUl) Copy() (newObject *LeafUl)
Copy copies most fields to a new LeafUl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafUl) Get ¶
func (o *LeafUl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafUl) GetAlias ¶
func (o *LeafUl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafUl) GroLock ¶
func (o *LeafUl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*LeafUl) GroLockIsLoaded ¶
func (o *LeafUl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUl) ID ¶
func (o *LeafUl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafUl) IDIsLoaded ¶
func (o *LeafUl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUl) Initialize ¶
func (o *LeafUl) Initialize()
Initialize will initialize or re-initialize a LeafUl database object to default values.
func (*LeafUl) IsDirty ¶
func (o *LeafUl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafUl) IsNew ¶
func (o *LeafUl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafUl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafUl) LoadRootUl ¶
LoadRootUl returns the related RootUl. If it is not already loaded, it will attempt to load it, provided the RootUlID column has been loaded first.
func (*LeafUl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafUl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafUl) MarshalStringMap ¶
func (o *LeafUl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafUl) Name ¶
func (o *LeafUl) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafUl) NameIsLoaded ¶
func (o *LeafUl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUl) OriginalPrimaryKey ¶
func (o *LeafUl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafUl) PrimaryKey ¶
func (o *LeafUl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafUl) RootUl ¶
func (o *LeafUl) RootUl() *RootUl
RootUl returns the current value of the loaded RootUl, and nil if its not loaded.
func (*LeafUl) RootUlID ¶
func (o *LeafUl) RootUlID() query.AutoPrimaryKey
RootUlID returns the value of the loaded root_ul_id field in the database.
func (*LeafUl) RootUlIDIsLoaded ¶
func (o *LeafUl) RootUlIDIsLoaded() bool
RootUlIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafUl) SetID ¶
func (o *LeafUl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUl) SetName ¶
func (o *LeafUl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafUl) SetPrimaryKey ¶
func (o *LeafUl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUl) SetRootUl ¶
func (o *LeafUl) SetRootUl(rootUl *RootUl)
SetRootUl sets the value of RootUl in the object, to be saved later using the Save() function.
func (*LeafUl) SetRootUlID ¶
func (o *LeafUl) SetRootUlID(v query.AutoPrimaryKey)
SetRootUlID sets the value of RootUlID in the object, to be saved later in the database using the Save() function.
func (*LeafUl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafUl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafUl object.
func (*LeafUl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafUl. The LeafUl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*LeafUl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafUl to modify the json before sending it here.
type LeafUlBuilder ¶
type LeafUlBuilder struct {
// contains filtered or unexported fields
}
The LeafUlBuilder uses a builder pattern to create a query on the database. Create a LeafUlBuilder by calling QueryLeafUls, which will select all the LeafUl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafUlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafUls ¶
func QueryLeafUls(ctx context.Context) *LeafUlBuilder
QueryLeafUls returns a new query builder. See LeafUlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafUlBuilder) Calculation ¶
func (b *LeafUlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafUlBuilder) Count ¶
func (b *LeafUlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafUlBuilder) Distinct ¶
func (b *LeafUlBuilder) Distinct() *LeafUlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafUlBuilder) Get ¶
func (b *LeafUlBuilder) Get() (*LeafUl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafUlBuilder) GroupBy ¶
func (b *LeafUlBuilder) GroupBy(nodes ...query.Node) *LeafUlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafUlBuilder) Having ¶
func (b *LeafUlBuilder) Having(node query.Node) *LeafUlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafUlBuilder) Limit ¶
func (b *LeafUlBuilder) Limit(maxRowCount int, offset int) *LeafUlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafUlBuilder) Load ¶
func (b *LeafUlBuilder) Load() (leafUls []*LeafUl, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafUl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUlBuilder) LoadCursor ¶
func (b *LeafUlBuilder) LoadCursor() (leafUlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafUlBuilder) LoadI ¶
func (b *LeafUlBuilder) LoadI() (leafUls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUlBuilder) OrderBy ¶
func (b *LeafUlBuilder) OrderBy(nodes ...query.Sorter) *LeafUlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafUlBuilder) Select ¶
func (b *LeafUlBuilder) Select(nodes ...query.Node) *LeafUlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_ul table will be queried and loaded. If nodes contains columns from the leaf_ul table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafUlBuilder) Where ¶
func (b *LeafUlBuilder) Where(c query.Node) *LeafUlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafUn ¶
type LeafUn struct {
// contains filtered or unexported fields
}
LeafUn represents an item in the leaf_un table in the database.
func LoadLeafUn ¶
func LoadLeafUn(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafUn, error)
LoadLeafUn returns a LeafUn from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafUnsBuilder.Select] for more info.
func LoadLeafUnByRootUnID ¶
func LoadLeafUnByRootUnID(ctx context.Context, rootUnID interface{}, selectNodes ...query.Node) (*LeafUn, error)
LoadLeafUnByRootUnID queries for a single LeafUn object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafUnsBuilder.Select]. If you need a more elaborate query, use QueryLeafUns() to start a query builder.
func NewLeafUn ¶
func NewLeafUn() *LeafUn
NewLeafUn creates a new LeafUn object and initializes it to default values.
func (*LeafUn) Copy ¶
func (o *LeafUn) Copy() (newObject *LeafUn)
Copy copies most fields to a new LeafUn object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafUn) Get ¶
func (o *LeafUn) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafUn) GetAlias ¶
func (o *LeafUn) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafUn) ID ¶
func (o *LeafUn) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafUn) IDIsLoaded ¶
func (o *LeafUn) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUn) Initialize ¶
func (o *LeafUn) Initialize()
Initialize will initialize or re-initialize a LeafUn database object to default values.
func (*LeafUn) IsDirty ¶
func (o *LeafUn) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafUn) IsNew ¶
func (o *LeafUn) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafUn) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafUn) LoadRootUn ¶
LoadRootUn returns the related RootUn. If it is not already loaded, it will attempt to load it, provided the RootUnID column has been loaded first.
func (*LeafUn) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafUn) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafUn) MarshalStringMap ¶
func (o *LeafUn) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafUn) Name ¶
func (o *LeafUn) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafUn) NameIsLoaded ¶
func (o *LeafUn) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUn) OriginalPrimaryKey ¶
func (o *LeafUn) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafUn) PrimaryKey ¶
func (o *LeafUn) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafUn) RootUn ¶
func (o *LeafUn) RootUn() *RootUn
RootUn returns the current value of the loaded RootUn, and nil if its not loaded.
func (*LeafUn) RootUnID ¶
func (o *LeafUn) RootUnID() query.AutoPrimaryKey
RootUnID returns the value of the loaded root_un_id field in the database.
func (*LeafUn) RootUnIDIsLoaded ¶
func (o *LeafUn) RootUnIDIsLoaded() bool
RootUnIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUn) RootUnIDIsNull ¶
func (o *LeafUn) RootUnIDIsNull() bool
RootUnIDIsNull returns true if the related database value is null.
func (*LeafUn) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafUn) SetID ¶
func (o *LeafUn) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUn) SetName ¶
func (o *LeafUn) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafUn) SetPrimaryKey ¶
func (o *LeafUn) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUn) SetRootUn ¶
func (o *LeafUn) SetRootUn(rootUn *RootUn)
SetRootUn will set the reference to rootUn. The referenced object will be saved when LeafUn is saved. Pass nil to break the connection.
func (*LeafUn) SetRootUnID ¶
func (o *LeafUn) SetRootUnID(v query.AutoPrimaryKey)
SetRootUnID sets the value of RootUnID in the object, to be saved later in the database using the Save() function.
func (*LeafUn) SetRootUnIDToNull ¶
func (o *LeafUn) SetRootUnIDToNull()
SetRootUnIDToNull() will set the root_un_id value in the database to NULL. RootUnID() will return the column's default value after this. Will also set the attached o.RootUn to nil.
func (*LeafUn) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafUn) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafUn object.
func (*LeafUn) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafUn. The LeafUn can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*LeafUn) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafUn to modify the json before sending it here.
type LeafUnBuilder ¶
type LeafUnBuilder struct {
// contains filtered or unexported fields
}
The LeafUnBuilder uses a builder pattern to create a query on the database. Create a LeafUnBuilder by calling QueryLeafUns, which will select all the LeafUn object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafUnBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafUns ¶
func QueryLeafUns(ctx context.Context) *LeafUnBuilder
QueryLeafUns returns a new query builder. See LeafUnBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafUnBuilder) Calculation ¶
func (b *LeafUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUnBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafUnBuilder) Count ¶
func (b *LeafUnBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafUnBuilder) Distinct ¶
func (b *LeafUnBuilder) Distinct() *LeafUnBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafUnBuilder) Get ¶
func (b *LeafUnBuilder) Get() (*LeafUn, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafUnBuilder) GroupBy ¶
func (b *LeafUnBuilder) GroupBy(nodes ...query.Node) *LeafUnBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafUnBuilder) Having ¶
func (b *LeafUnBuilder) Having(node query.Node) *LeafUnBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafUnBuilder) Limit ¶
func (b *LeafUnBuilder) Limit(maxRowCount int, offset int) *LeafUnBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafUnBuilder) Load ¶
func (b *LeafUnBuilder) Load() (leafUns []*LeafUn, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafUn objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUnBuilder) LoadCursor ¶
func (b *LeafUnBuilder) LoadCursor() (leafUnsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafUnBuilder) LoadI ¶
func (b *LeafUnBuilder) LoadI() (leafUns []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUnBuilder) OrderBy ¶
func (b *LeafUnBuilder) OrderBy(nodes ...query.Sorter) *LeafUnBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafUnBuilder) Select ¶
func (b *LeafUnBuilder) Select(nodes ...query.Node) *LeafUnBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_un table will be queried and loaded. If nodes contains columns from the leaf_un table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafUnBuilder) Where ¶
func (b *LeafUnBuilder) Where(c query.Node) *LeafUnBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type LeafUnl ¶
type LeafUnl struct {
// contains filtered or unexported fields
}
LeafUnl represents an item in the leaf_unl table in the database.
func LoadLeafUnl ¶
func LoadLeafUnl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*LeafUnl, error)
LoadLeafUnl returns a LeafUnl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [LeafUnlsBuilder.Select] for more info.
func LoadLeafUnlByRootUnlID ¶
func LoadLeafUnlByRootUnlID(ctx context.Context, rootUnlID interface{}, selectNodes ...query.Node) (*LeafUnl, error)
LoadLeafUnlByRootUnlID queries for a single LeafUnl object by the given unique index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [LeafUnlsBuilder.Select]. If you need a more elaborate query, use QueryLeafUnls() to start a query builder.
func NewLeafUnl ¶
func NewLeafUnl() *LeafUnl
NewLeafUnl creates a new LeafUnl object and initializes it to default values.
func (*LeafUnl) Copy ¶
func (o *LeafUnl) Copy() (newObject *LeafUnl)
Copy copies most fields to a new LeafUnl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*LeafUnl) Get ¶
func (o *LeafUnl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*LeafUnl) GetAlias ¶
func (o *LeafUnl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*LeafUnl) GroLock ¶
func (o *LeafUnl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*LeafUnl) GroLockIsLoaded ¶
func (o *LeafUnl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUnl) ID ¶
func (o *LeafUnl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*LeafUnl) IDIsLoaded ¶
func (o *LeafUnl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUnl) Initialize ¶
func (o *LeafUnl) Initialize()
Initialize will initialize or re-initialize a LeafUnl database object to default values.
func (*LeafUnl) IsDirty ¶
func (o *LeafUnl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*LeafUnl) IsNew ¶
func (o *LeafUnl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*LeafUnl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*LeafUnl) LoadRootUnl ¶
LoadRootUnl returns the related RootUnl. If it is not already loaded, it will attempt to load it, provided the RootUnlID column has been loaded first.
func (*LeafUnl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*LeafUnl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*LeafUnl) MarshalStringMap ¶
func (o *LeafUnl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*LeafUnl) Name ¶
func (o *LeafUnl) Name() string
Name returns the value of the loaded name field in the database.
func (*LeafUnl) NameIsLoaded ¶
func (o *LeafUnl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUnl) OriginalPrimaryKey ¶
func (o *LeafUnl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*LeafUnl) PrimaryKey ¶
func (o *LeafUnl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*LeafUnl) RootUnl ¶
func (o *LeafUnl) RootUnl() *RootUnl
RootUnl returns the current value of the loaded RootUnl, and nil if its not loaded.
func (*LeafUnl) RootUnlID ¶
func (o *LeafUnl) RootUnlID() query.AutoPrimaryKey
RootUnlID returns the value of the loaded root_unl_id field in the database.
func (*LeafUnl) RootUnlIDIsLoaded ¶
func (o *LeafUnl) RootUnlIDIsLoaded() bool
RootUnlIDIsLoaded returns true if the value was loaded from the database or has been set.
func (*LeafUnl) RootUnlIDIsNull ¶
func (o *LeafUnl) RootUnlIDIsNull() bool
RootUnlIDIsNull returns true if the related database value is null.
func (*LeafUnl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*LeafUnl) SetID ¶
func (o *LeafUnl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUnl) SetName ¶
func (o *LeafUnl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*LeafUnl) SetPrimaryKey ¶
func (o *LeafUnl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*LeafUnl) SetRootUnl ¶
func (o *LeafUnl) SetRootUnl(rootUnl *RootUnl)
SetRootUnl will set the reference to rootUnl. The referenced object will be saved when LeafUnl is saved. Pass nil to break the connection.
func (*LeafUnl) SetRootUnlID ¶
func (o *LeafUnl) SetRootUnlID(v query.AutoPrimaryKey)
SetRootUnlID sets the value of RootUnlID in the object, to be saved later in the database using the Save() function.
func (*LeafUnl) SetRootUnlIDToNull ¶
func (o *LeafUnl) SetRootUnlIDToNull()
SetRootUnlIDToNull() will set the root_unl_id value in the database to NULL. RootUnlID() will return the column's default value after this. Will also set the attached o.RootUnl to nil.
func (*LeafUnl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*LeafUnl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a LeafUnl object.
func (*LeafUnl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the LeafUnl. The LeafUnl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*LeafUnl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in LeafUnl to modify the json before sending it here.
type LeafUnlBuilder ¶
type LeafUnlBuilder struct {
// contains filtered or unexported fields
}
The LeafUnlBuilder uses a builder pattern to create a query on the database. Create a LeafUnlBuilder by calling QueryLeafUnls, which will select all the LeafUnl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A LeafUnlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryLeafUnls ¶
func QueryLeafUnls(ctx context.Context) *LeafUnlBuilder
QueryLeafUnls returns a new query builder. See LeafUnlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*LeafUnlBuilder) Calculation ¶
func (b *LeafUnlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *LeafUnlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*LeafUnlBuilder) Count ¶
func (b *LeafUnlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*LeafUnlBuilder) Distinct ¶
func (b *LeafUnlBuilder) Distinct() *LeafUnlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*LeafUnlBuilder) Get ¶
func (b *LeafUnlBuilder) Get() (*LeafUnl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*LeafUnlBuilder) GroupBy ¶
func (b *LeafUnlBuilder) GroupBy(nodes ...query.Node) *LeafUnlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*LeafUnlBuilder) Having ¶
func (b *LeafUnlBuilder) Having(node query.Node) *LeafUnlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*LeafUnlBuilder) Limit ¶
func (b *LeafUnlBuilder) Limit(maxRowCount int, offset int) *LeafUnlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*LeafUnlBuilder) Load ¶
func (b *LeafUnlBuilder) Load() (leafUnls []*LeafUnl, err error)
Load terminates the query builder, performs the query, and returns a slice of LeafUnl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUnlBuilder) LoadCursor ¶
func (b *LeafUnlBuilder) LoadCursor() (leafUnlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*LeafUnlBuilder) LoadI ¶
func (b *LeafUnlBuilder) LoadI() (leafUnls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*LeafUnlBuilder) OrderBy ¶
func (b *LeafUnlBuilder) OrderBy(nodes ...query.Sorter) *LeafUnlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*LeafUnlBuilder) Select ¶
func (b *LeafUnlBuilder) Select(nodes ...query.Node) *LeafUnlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the leaf_unl table will be queried and loaded. If nodes contains columns from the leaf_unl table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*LeafUnlBuilder) Where ¶
func (b *LeafUnlBuilder) Where(c query.Node) *LeafUnlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type MultiParent ¶
type MultiParent struct {
// contains filtered or unexported fields
}
MultiParent represents an item in the multi_parent table in the database.
func LoadMultiParent ¶
func LoadMultiParent(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*MultiParent, error)
LoadMultiParent returns a MultiParent from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [MultiParentsBuilder.Select] for more info.
func LoadMultiParentsByParent1ID ¶
func LoadMultiParentsByParent1ID(ctx context.Context, parent1ID interface{}, selectNodes ...query.Node) ([]*MultiParent, error)
LoadMultiParentsByParent1ID queries MultiParent objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [MultiParentsBuilder.Select]. If you need a more elaborate query, use QueryMultiParents() to start a query builder.
func LoadMultiParentsByParent2ID ¶
func LoadMultiParentsByParent2ID(ctx context.Context, parent2ID interface{}, selectNodes ...query.Node) ([]*MultiParent, error)
LoadMultiParentsByParent2ID queries MultiParent objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [MultiParentsBuilder.Select]. If you need a more elaborate query, use QueryMultiParents() to start a query builder.
func NewMultiParent ¶
func NewMultiParent() *MultiParent
NewMultiParent creates a new MultiParent object and initializes it to default values.
func (*MultiParent) Copy ¶
func (o *MultiParent) Copy() (newObject *MultiParent)
Copy copies most fields to a new MultiParent object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*MultiParent) CountParent1MultiParents ¶
CountParent1MultiParents does a database query and returns the number of MultiParent objects currently in the database that have a Parent1ID value that equals this objects primary key.
func (*MultiParent) CountParent2MultiParents ¶
CountParent2MultiParents does a database query and returns the number of MultiParent objects currently in the database that have a Parent2ID value that equals this objects primary key.
func (*MultiParent) Delete ¶
Delete deletes the record from the database.
Associated Parent1MultiParent will have their Parent1 field set to NULL. Associated Parent2MultiParent will have their Parent2 field set to NULL.
func (*MultiParent) Get ¶
func (o *MultiParent) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*MultiParent) GetAlias ¶
func (o *MultiParent) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*MultiParent) ID ¶
func (o *MultiParent) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*MultiParent) IDIsLoaded ¶
func (o *MultiParent) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*MultiParent) Initialize ¶
func (o *MultiParent) Initialize()
Initialize will initialize or re-initialize a MultiParent database object to default values.
func (*MultiParent) IsDirty ¶
func (o *MultiParent) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*MultiParent) IsNew ¶
func (o *MultiParent) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*MultiParent) Key ¶
func (o *MultiParent) Key() string
Key returns a unique key for the object, among a list of similar objects.
func (*MultiParent) Label ¶
func (o *MultiParent) Label() string
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*MultiParent) LoadParent1 ¶
func (o *MultiParent) LoadParent1(ctx context.Context) (*MultiParent, error)
LoadParent1 returns the related Parent1. If it is not already loaded, it will attempt to load it, provided the Parent1ID column has been loaded first.
func (*MultiParent) LoadParent1MultiParents ¶
func (o *MultiParent) LoadParent1MultiParents(ctx context.Context) ([]*MultiParent, error)
LoadParent1MultiParents loads a new slice of MultiParent objects and returns it.
func (*MultiParent) LoadParent2 ¶
func (o *MultiParent) LoadParent2(ctx context.Context) (*MultiParent, error)
LoadParent2 returns the related Parent2. If it is not already loaded, it will attempt to load it, provided the Parent2ID column has been loaded first.
func (*MultiParent) LoadParent2MultiParents ¶
func (o *MultiParent) LoadParent2MultiParents(ctx context.Context) ([]*MultiParent, error)
LoadParent2MultiParents loads a new slice of MultiParent objects and returns it.
func (*MultiParent) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*MultiParent) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*MultiParent) MarshalStringMap ¶
func (o *MultiParent) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*MultiParent) Name ¶
func (o *MultiParent) Name() string
Name returns the value of the loaded name field in the database.
func (*MultiParent) NameIsLoaded ¶
func (o *MultiParent) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*MultiParent) NameIsNull ¶
func (o *MultiParent) NameIsNull() bool
NameIsNull returns true if the related database value is null.
func (*MultiParent) OriginalPrimaryKey ¶
func (o *MultiParent) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*MultiParent) Parent1 ¶
func (o *MultiParent) Parent1() *MultiParent
Parent1 returns the current value of the loaded Parent1, and nil if its not loaded.
func (*MultiParent) Parent1ID ¶
func (o *MultiParent) Parent1ID() query.AutoPrimaryKey
Parent1ID returns the value of the loaded parent_1_id field in the database.
func (*MultiParent) Parent1IDIsLoaded ¶
func (o *MultiParent) Parent1IDIsLoaded() bool
Parent1IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*MultiParent) Parent1IDIsNull ¶
func (o *MultiParent) Parent1IDIsNull() bool
Parent1IDIsNull returns true if the related database value is null.
func (*MultiParent) Parent1MultiParent ¶
func (o *MultiParent) Parent1MultiParent(pk query.AutoPrimaryKey) *MultiParent
Parent1MultiParent returns a single MultiParent object by primary key, if one was loaded. Otherwise, it will return nil. It will not return MultiParent objects that are not saved.
func (*MultiParent) Parent1MultiParents ¶
func (o *MultiParent) Parent1MultiParents() []*MultiParent
Parent1MultiParents returns a slice of MultiParent objects if loaded.
func (*MultiParent) Parent2 ¶
func (o *MultiParent) Parent2() *MultiParent
Parent2 returns the current value of the loaded Parent2, and nil if its not loaded.
func (*MultiParent) Parent2ID ¶
func (o *MultiParent) Parent2ID() query.AutoPrimaryKey
Parent2ID returns the value of the loaded parent_2_id field in the database.
func (*MultiParent) Parent2IDIsLoaded ¶
func (o *MultiParent) Parent2IDIsLoaded() bool
Parent2IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*MultiParent) Parent2IDIsNull ¶
func (o *MultiParent) Parent2IDIsNull() bool
Parent2IDIsNull returns true if the related database value is null.
func (*MultiParent) Parent2MultiParent ¶
func (o *MultiParent) Parent2MultiParent(pk query.AutoPrimaryKey) *MultiParent
Parent2MultiParent returns a single MultiParent object by primary key, if one was loaded. Otherwise, it will return nil. It will not return MultiParent objects that are not saved.
func (*MultiParent) Parent2MultiParents ¶
func (o *MultiParent) Parent2MultiParents() []*MultiParent
Parent2MultiParents returns a slice of MultiParent objects if loaded.
func (*MultiParent) PrimaryKey ¶
func (o *MultiParent) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*MultiParent) Save ¶
func (o *MultiParent) Save(ctx context.Context) error
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*MultiParent) SetID ¶
func (o *MultiParent) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*MultiParent) SetName ¶
func (o *MultiParent) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*MultiParent) SetNameToNull ¶
func (o *MultiParent) SetNameToNull()
SetNameToNull() will set the name value in the database to NULL. Name() will return the column's default value after this.
func (*MultiParent) SetParent1 ¶
func (o *MultiParent) SetParent1(parent1 *MultiParent)
SetParent1 will set the reference to parent1. The referenced object will be saved when MultiParent is saved. Pass nil to break the connection.
func (*MultiParent) SetParent1ID ¶
func (o *MultiParent) SetParent1ID(v query.AutoPrimaryKey)
SetParent1ID sets the value of Parent1ID in the object, to be saved later in the database using the Save() function.
func (*MultiParent) SetParent1IDToNull ¶
func (o *MultiParent) SetParent1IDToNull()
SetParent1IDToNull() will set the parent_1_id value in the database to NULL. Parent1ID() will return the column's default value after this. Will also set the attached o.Parent1 to nil.
func (*MultiParent) SetParent1MultiParents ¶
func (o *MultiParent) SetParent1MultiParents(objs ...*MultiParent)
SetParent1MultiParents associates the objects in objs with this MultiParent by setting their Parent1ID values to this object's primary key. If it has Parent1MultiParents already associated with it that will not be associated after a save, the foreign keys for those Parent1MultiParents will be set to null. If you did not use a join to query the items in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be changing items that are not currently attached to this MultiParent.
func (*MultiParent) SetParent2 ¶
func (o *MultiParent) SetParent2(parent2 *MultiParent)
SetParent2 will set the reference to parent2. The referenced object will be saved when MultiParent is saved. Pass nil to break the connection.
func (*MultiParent) SetParent2ID ¶
func (o *MultiParent) SetParent2ID(v query.AutoPrimaryKey)
SetParent2ID sets the value of Parent2ID in the object, to be saved later in the database using the Save() function.
func (*MultiParent) SetParent2IDToNull ¶
func (o *MultiParent) SetParent2IDToNull()
SetParent2IDToNull() will set the parent_2_id value in the database to NULL. Parent2ID() will return the column's default value after this. Will also set the attached o.Parent2 to nil.
func (*MultiParent) SetParent2MultiParents ¶
func (o *MultiParent) SetParent2MultiParents(objs ...*MultiParent)
SetParent2MultiParents associates the objects in objs with this MultiParent by setting their Parent2ID values to this object's primary key. If it has Parent2MultiParents already associated with it that will not be associated after a save, the foreign keys for those Parent2MultiParents will be set to null. If you did not use a join to query the items in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be changing items that are not currently attached to this MultiParent.
func (*MultiParent) SetPrimaryKey ¶
func (o *MultiParent) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*MultiParent) String ¶
func (o *MultiParent) String() string
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*MultiParent) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a MultiParent object.
func (*MultiParent) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the MultiParent. The MultiParent can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string, nullable
func (*MultiParent) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in MultiParent to modify the json before sending it here.
type MultiParentBuilder ¶
type MultiParentBuilder struct {
// contains filtered or unexported fields
}
The MultiParentBuilder uses a builder pattern to create a query on the database. Create a MultiParentBuilder by calling QueryMultiParents, which will select all the MultiParent object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A MultiParentBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryMultiParents ¶
func QueryMultiParents(ctx context.Context) *MultiParentBuilder
QueryMultiParents returns a new query builder. See MultiParentBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*MultiParentBuilder) Calculation ¶
func (b *MultiParentBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *MultiParentBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*MultiParentBuilder) Count ¶
func (b *MultiParentBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*MultiParentBuilder) Distinct ¶
func (b *MultiParentBuilder) Distinct() *MultiParentBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*MultiParentBuilder) Get ¶
func (b *MultiParentBuilder) Get() (*MultiParent, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*MultiParentBuilder) GroupBy ¶
func (b *MultiParentBuilder) GroupBy(nodes ...query.Node) *MultiParentBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*MultiParentBuilder) Having ¶
func (b *MultiParentBuilder) Having(node query.Node) *MultiParentBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*MultiParentBuilder) Limit ¶
func (b *MultiParentBuilder) Limit(maxRowCount int, offset int) *MultiParentBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*MultiParentBuilder) Load ¶
func (b *MultiParentBuilder) Load() (multiParents []*MultiParent, err error)
Load terminates the query builder, performs the query, and returns a slice of MultiParent objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*MultiParentBuilder) LoadCursor ¶
func (b *MultiParentBuilder) LoadCursor() (multiParentsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*MultiParentBuilder) LoadI ¶
func (b *MultiParentBuilder) LoadI() (multiParents []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*MultiParentBuilder) OrderBy ¶
func (b *MultiParentBuilder) OrderBy(nodes ...query.Sorter) *MultiParentBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*MultiParentBuilder) Select ¶
func (b *MultiParentBuilder) Select(nodes ...query.Node) *MultiParentBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the multi_parent table will be queried and loaded. If nodes contains columns from the multi_parent table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*MultiParentBuilder) Where ¶
func (b *MultiParentBuilder) Where(c query.Node) *MultiParentBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
Root represents an item in the root table in the database.
func LoadRoot ¶
func LoadRoot(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*Root, error)
LoadRoot returns a Root from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootsBuilder.Select] for more info.
func NewRoot ¶
func NewRoot() *Root
NewRoot creates a new Root object and initializes it to default values.
func (*Root) Copy ¶
func (o *Root) Copy() (newObject *Root)
Copy copies most fields to a new Root object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*Root) CountLeafs ¶
CountLeafs does a database query and returns the number of Leaf objects currently in the database that have a RootID value that equals this objects primary key.
func (*Root) Delete ¶
Delete deletes the record from the database.
Associated Leaf will also be deleted since their Root fields are not nullable.
func (*Root) Get ¶
func (o *Root) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*Root) GetAlias ¶
func (o *Root) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*Root) ID ¶
func (o *Root) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*Root) IDIsLoaded ¶
func (o *Root) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*Root) Initialize ¶
func (o *Root) Initialize()
Initialize will initialize or re-initialize a Root database object to default values.
func (*Root) IsDirty ¶
func (o *Root) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*Root) IsNew ¶
func (o *Root) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*Root) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*Root) Leaf ¶
func (o *Root) Leaf(pk query.AutoPrimaryKey) *Leaf
Leaf returns a single Leaf object by primary key, if one was loaded. Otherwise, it will return nil. It will not return Leaf objects that are not saved.
func (*Root) Leafs ¶
func (o *Root) Leafs() []*Leaf
Leafs returns a slice of Leaf objects if loaded.
func (*Root) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*Root) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*Root) MarshalStringMap ¶
func (o *Root) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*Root) Name ¶
func (o *Root) Name() string
Name returns the value of the loaded name field in the database.
func (*Root) NameIsLoaded ¶
func (o *Root) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*Root) OriginalPrimaryKey ¶
func (o *Root) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*Root) PrimaryKey ¶
func (o *Root) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*Root) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*Root) SetID ¶
func (o *Root) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*Root) SetLeafs ¶
func (o *Root) SetLeafs(objs ...*Leaf)
SetLeafs associates the objects in objs with this Root by setting their RootID values to this object's primary key. WARNING! If it has Leafs already associated with it that will not be associated after a save, Save will panic. Be sure to delete those Leafs or otherwise fix those pointers before calling save.
func (*Root) SetName ¶
func (o *Root) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*Root) SetPrimaryKey ¶
func (o *Root) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*Root) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*Root) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a Root object.
func (*Root) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the Root. The Root can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*Root) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in Root to modify the json before sending it here.
type RootBuilder ¶
type RootBuilder struct {
// contains filtered or unexported fields
}
The RootBuilder uses a builder pattern to create a query on the database. Create a RootBuilder by calling QueryRoots, which will select all the Root object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRoots ¶
func QueryRoots(ctx context.Context) *RootBuilder
QueryRoots returns a new query builder. See RootBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootBuilder) Calculation ¶
func (b *RootBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootBuilder) Count ¶
func (b *RootBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootBuilder) Distinct ¶
func (b *RootBuilder) Distinct() *RootBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootBuilder) Get ¶
func (b *RootBuilder) Get() (*Root, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootBuilder) GroupBy ¶
func (b *RootBuilder) GroupBy(nodes ...query.Node) *RootBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootBuilder) Having ¶
func (b *RootBuilder) Having(node query.Node) *RootBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootBuilder) Limit ¶
func (b *RootBuilder) Limit(maxRowCount int, offset int) *RootBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootBuilder) Load ¶
func (b *RootBuilder) Load() (roots []*Root, err error)
Load terminates the query builder, performs the query, and returns a slice of Root objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootBuilder) LoadCursor ¶
func (b *RootBuilder) LoadCursor() (rootsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootBuilder) LoadI ¶
func (b *RootBuilder) LoadI() (roots []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootBuilder) OrderBy ¶
func (b *RootBuilder) OrderBy(nodes ...query.Sorter) *RootBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootBuilder) Select ¶
func (b *RootBuilder) Select(nodes ...query.Node) *RootBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root table will be queried and loaded. If nodes contains columns from the root table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootBuilder) Where ¶
func (b *RootBuilder) Where(c query.Node) *RootBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootL ¶
type RootL struct {
// contains filtered or unexported fields
}
RootL represents an item in the root_l table in the database.
func LoadRootL ¶
func LoadRootL(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootL, error)
LoadRootL returns a RootL from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootLsBuilder.Select] for more info.
func NewRootL ¶
func NewRootL() *RootL
NewRootL creates a new RootL object and initializes it to default values.
func (*RootL) Copy ¶
func (o *RootL) Copy() (newObject *RootL)
Copy copies most fields to a new RootL object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootL) CountLeafLs ¶
CountLeafLs does a database query and returns the number of LeafL objects currently in the database that have a RootLID value that equals this objects primary key.
func (*RootL) Delete ¶
Delete deletes the record from the database.
Associated LeafL will also be deleted since their RootL fields are not nullable.
func (*RootL) Get ¶
func (o *RootL) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootL) GetAlias ¶
func (o *RootL) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootL) GroLock ¶
func (o *RootL) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*RootL) GroLockIsLoaded ¶
func (o *RootL) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootL) ID ¶
func (o *RootL) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootL) IDIsLoaded ¶
func (o *RootL) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootL) Initialize ¶
func (o *RootL) Initialize()
Initialize will initialize or re-initialize a RootL database object to default values.
func (*RootL) IsDirty ¶
func (o *RootL) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootL) IsNew ¶
func (o *RootL) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootL) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootL) LeafL ¶
func (o *RootL) LeafL(pk query.AutoPrimaryKey) *LeafL
LeafL returns a single LeafL object by primary key, if one was loaded. Otherwise, it will return nil. It will not return LeafL objects that are not saved.
func (*RootL) LeafLs ¶
func (o *RootL) LeafLs() []*LeafL
LeafLs returns a slice of LeafL objects if loaded.
func (*RootL) LoadLeafLs ¶
LoadLeafLs loads a new slice of LeafL objects and returns it.
func (*RootL) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootL) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootL) MarshalStringMap ¶
func (o *RootL) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootL) Name ¶
func (o *RootL) Name() string
Name returns the value of the loaded name field in the database.
func (*RootL) NameIsLoaded ¶
func (o *RootL) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootL) OriginalPrimaryKey ¶
func (o *RootL) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootL) PrimaryKey ¶
func (o *RootL) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootL) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootL) SetID ¶
func (o *RootL) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootL) SetLeafLs ¶
func (o *RootL) SetLeafLs(objs ...*LeafL)
SetLeafLs associates the objects in objs with this RootL by setting their RootLID values to this object's primary key. WARNING! If it has LeafLs already associated with it that will not be associated after a save, Save will panic. Be sure to delete those LeafLs or otherwise fix those pointers before calling save.
func (*RootL) SetName ¶
func (o *RootL) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootL) SetPrimaryKey ¶
func (o *RootL) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootL) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootL) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootL object.
func (*RootL) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootL. The RootL can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*RootL) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootL to modify the json before sending it here.
type RootLBuilder ¶
type RootLBuilder struct {
// contains filtered or unexported fields
}
The RootLBuilder uses a builder pattern to create a query on the database. Create a RootLBuilder by calling QueryRootLs, which will select all the RootL object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootLBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootLs ¶
func QueryRootLs(ctx context.Context) *RootLBuilder
QueryRootLs returns a new query builder. See RootLBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootLBuilder) Calculation ¶
func (b *RootLBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootLBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootLBuilder) Count ¶
func (b *RootLBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootLBuilder) Distinct ¶
func (b *RootLBuilder) Distinct() *RootLBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootLBuilder) Get ¶
func (b *RootLBuilder) Get() (*RootL, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootLBuilder) GroupBy ¶
func (b *RootLBuilder) GroupBy(nodes ...query.Node) *RootLBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootLBuilder) Having ¶
func (b *RootLBuilder) Having(node query.Node) *RootLBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootLBuilder) Limit ¶
func (b *RootLBuilder) Limit(maxRowCount int, offset int) *RootLBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootLBuilder) Load ¶
func (b *RootLBuilder) Load() (rootLs []*RootL, err error)
Load terminates the query builder, performs the query, and returns a slice of RootL objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootLBuilder) LoadCursor ¶
func (b *RootLBuilder) LoadCursor() (rootLsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootLBuilder) LoadI ¶
func (b *RootLBuilder) LoadI() (rootLs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootLBuilder) OrderBy ¶
func (b *RootLBuilder) OrderBy(nodes ...query.Sorter) *RootLBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootLBuilder) Select ¶
func (b *RootLBuilder) Select(nodes ...query.Node) *RootLBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_l table will be queried and loaded. If nodes contains columns from the root_l table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootLBuilder) Where ¶
func (b *RootLBuilder) Where(c query.Node) *RootLBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootN ¶
type RootN struct {
// contains filtered or unexported fields
}
RootN represents an item in the root_n table in the database.
func LoadRootN ¶
func LoadRootN(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootN, error)
LoadRootN returns a RootN from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootNsBuilder.Select] for more info.
func NewRootN ¶
func NewRootN() *RootN
NewRootN creates a new RootN object and initializes it to default values.
func (*RootN) Copy ¶
func (o *RootN) Copy() (newObject *RootN)
Copy copies most fields to a new RootN object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootN) CountLeafNs ¶
CountLeafNs does a database query and returns the number of LeafN objects currently in the database that have a RootNID value that equals this objects primary key.
func (*RootN) Delete ¶
Delete deletes the record from the database.
Associated LeafN will have their RootN field set to NULL.
func (*RootN) Get ¶
func (o *RootN) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootN) GetAlias ¶
func (o *RootN) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootN) ID ¶
func (o *RootN) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootN) IDIsLoaded ¶
func (o *RootN) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootN) Initialize ¶
func (o *RootN) Initialize()
Initialize will initialize or re-initialize a RootN database object to default values.
func (*RootN) IsDirty ¶
func (o *RootN) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootN) IsNew ¶
func (o *RootN) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootN) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootN) LeafN ¶
func (o *RootN) LeafN(pk query.AutoPrimaryKey) *LeafN
LeafN returns a single LeafN object by primary key, if one was loaded. Otherwise, it will return nil. It will not return LeafN objects that are not saved.
func (*RootN) LeafNs ¶
func (o *RootN) LeafNs() []*LeafN
LeafNs returns a slice of LeafN objects if loaded.
func (*RootN) LoadLeafNs ¶
LoadLeafNs loads a new slice of LeafN objects and returns it.
func (*RootN) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootN) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootN) MarshalStringMap ¶
func (o *RootN) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootN) Name ¶
func (o *RootN) Name() string
Name returns the value of the loaded name field in the database.
func (*RootN) NameIsLoaded ¶
func (o *RootN) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootN) OriginalPrimaryKey ¶
func (o *RootN) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootN) PrimaryKey ¶
func (o *RootN) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootN) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootN) SetID ¶
func (o *RootN) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootN) SetLeafNs ¶
func (o *RootN) SetLeafNs(objs ...*LeafN)
SetLeafNs associates the objects in objs with this RootN by setting their RootNID values to this object's primary key. If it has LeafNs already associated with it that will not be associated after a save, the foreign keys for those LeafNs will be set to null. If you did not use a join to query the items in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be changing items that are not currently attached to this RootN.
func (*RootN) SetName ¶
func (o *RootN) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootN) SetPrimaryKey ¶
func (o *RootN) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootN) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootN) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootN object.
func (*RootN) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootN. The RootN can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*RootN) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootN to modify the json before sending it here.
type RootNBuilder ¶
type RootNBuilder struct {
// contains filtered or unexported fields
}
The RootNBuilder uses a builder pattern to create a query on the database. Create a RootNBuilder by calling QueryRootNs, which will select all the RootN object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootNBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootNs ¶
func QueryRootNs(ctx context.Context) *RootNBuilder
QueryRootNs returns a new query builder. See RootNBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootNBuilder) Calculation ¶
func (b *RootNBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootNBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootNBuilder) Count ¶
func (b *RootNBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootNBuilder) Distinct ¶
func (b *RootNBuilder) Distinct() *RootNBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootNBuilder) Get ¶
func (b *RootNBuilder) Get() (*RootN, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootNBuilder) GroupBy ¶
func (b *RootNBuilder) GroupBy(nodes ...query.Node) *RootNBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootNBuilder) Having ¶
func (b *RootNBuilder) Having(node query.Node) *RootNBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootNBuilder) Limit ¶
func (b *RootNBuilder) Limit(maxRowCount int, offset int) *RootNBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootNBuilder) Load ¶
func (b *RootNBuilder) Load() (rootNs []*RootN, err error)
Load terminates the query builder, performs the query, and returns a slice of RootN objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootNBuilder) LoadCursor ¶
func (b *RootNBuilder) LoadCursor() (rootNsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootNBuilder) LoadI ¶
func (b *RootNBuilder) LoadI() (rootNs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootNBuilder) OrderBy ¶
func (b *RootNBuilder) OrderBy(nodes ...query.Sorter) *RootNBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootNBuilder) Select ¶
func (b *RootNBuilder) Select(nodes ...query.Node) *RootNBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_n table will be queried and loaded. If nodes contains columns from the root_n table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootNBuilder) Where ¶
func (b *RootNBuilder) Where(c query.Node) *RootNBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootNl ¶
type RootNl struct {
// contains filtered or unexported fields
}
RootNl represents an item in the root_nl table in the database.
func LoadRootNl ¶
func LoadRootNl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootNl, error)
LoadRootNl returns a RootNl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootNlsBuilder.Select] for more info.
func NewRootNl ¶
func NewRootNl() *RootNl
NewRootNl creates a new RootNl object and initializes it to default values.
func (*RootNl) Copy ¶
func (o *RootNl) Copy() (newObject *RootNl)
Copy copies most fields to a new RootNl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootNl) CountLeafNls ¶
CountLeafNls does a database query and returns the number of LeafNl objects currently in the database that have a RootNlID value that equals this objects primary key.
func (*RootNl) Delete ¶
Delete deletes the record from the database.
Associated LeafNl will have their RootNl field set to NULL.
func (*RootNl) Get ¶
func (o *RootNl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootNl) GetAlias ¶
func (o *RootNl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootNl) GroLock ¶
func (o *RootNl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*RootNl) GroLockIsLoaded ¶
func (o *RootNl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootNl) ID ¶
func (o *RootNl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootNl) IDIsLoaded ¶
func (o *RootNl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootNl) Initialize ¶
func (o *RootNl) Initialize()
Initialize will initialize or re-initialize a RootNl database object to default values.
func (*RootNl) IsDirty ¶
func (o *RootNl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootNl) IsNew ¶
func (o *RootNl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootNl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootNl) LeafNl ¶
func (o *RootNl) LeafNl(pk query.AutoPrimaryKey) *LeafNl
LeafNl returns a single LeafNl object by primary key, if one was loaded. Otherwise, it will return nil. It will not return LeafNl objects that are not saved.
func (*RootNl) LeafNls ¶
func (o *RootNl) LeafNls() []*LeafNl
LeafNls returns a slice of LeafNl objects if loaded.
func (*RootNl) LoadLeafNls ¶
LoadLeafNls loads a new slice of LeafNl objects and returns it.
func (*RootNl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootNl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootNl) MarshalStringMap ¶
func (o *RootNl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootNl) Name ¶
func (o *RootNl) Name() string
Name returns the value of the loaded name field in the database.
func (*RootNl) NameIsLoaded ¶
func (o *RootNl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootNl) OriginalPrimaryKey ¶
func (o *RootNl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootNl) PrimaryKey ¶
func (o *RootNl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootNl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootNl) SetID ¶
func (o *RootNl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootNl) SetLeafNls ¶
func (o *RootNl) SetLeafNls(objs ...*LeafNl)
SetLeafNls associates the objects in objs with this RootNl by setting their RootNlID values to this object's primary key. If it has LeafNls already associated with it that will not be associated after a save, the foreign keys for those LeafNls will be set to null. If you did not use a join to query the items in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be changing items that are not currently attached to this RootNl.
func (*RootNl) SetName ¶
func (o *RootNl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootNl) SetPrimaryKey ¶
func (o *RootNl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootNl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootNl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootNl object.
func (*RootNl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootNl. The RootNl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*RootNl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootNl to modify the json before sending it here.
type RootNlBuilder ¶
type RootNlBuilder struct {
// contains filtered or unexported fields
}
The RootNlBuilder uses a builder pattern to create a query on the database. Create a RootNlBuilder by calling QueryRootNls, which will select all the RootNl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootNlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootNls ¶
func QueryRootNls(ctx context.Context) *RootNlBuilder
QueryRootNls returns a new query builder. See RootNlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootNlBuilder) Calculation ¶
func (b *RootNlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootNlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootNlBuilder) Count ¶
func (b *RootNlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootNlBuilder) Distinct ¶
func (b *RootNlBuilder) Distinct() *RootNlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootNlBuilder) Get ¶
func (b *RootNlBuilder) Get() (*RootNl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootNlBuilder) GroupBy ¶
func (b *RootNlBuilder) GroupBy(nodes ...query.Node) *RootNlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootNlBuilder) Having ¶
func (b *RootNlBuilder) Having(node query.Node) *RootNlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootNlBuilder) Limit ¶
func (b *RootNlBuilder) Limit(maxRowCount int, offset int) *RootNlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootNlBuilder) Load ¶
func (b *RootNlBuilder) Load() (rootNls []*RootNl, err error)
Load terminates the query builder, performs the query, and returns a slice of RootNl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootNlBuilder) LoadCursor ¶
func (b *RootNlBuilder) LoadCursor() (rootNlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootNlBuilder) LoadI ¶
func (b *RootNlBuilder) LoadI() (rootNls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootNlBuilder) OrderBy ¶
func (b *RootNlBuilder) OrderBy(nodes ...query.Sorter) *RootNlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootNlBuilder) Select ¶
func (b *RootNlBuilder) Select(nodes ...query.Node) *RootNlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_nl table will be queried and loaded. If nodes contains columns from the root_nl table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootNlBuilder) Where ¶
func (b *RootNlBuilder) Where(c query.Node) *RootNlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootU ¶
type RootU struct {
// contains filtered or unexported fields
}
RootU represents an item in the root_u table in the database.
func LoadRootU ¶
func LoadRootU(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootU, error)
LoadRootU returns a RootU from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootUsBuilder.Select] for more info.
func NewRootU ¶
func NewRootU() *RootU
NewRootU creates a new RootU object and initializes it to default values.
func (*RootU) Copy ¶
func (o *RootU) Copy() (newObject *RootU)
Copy copies most fields to a new RootU object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootU) Delete ¶
Delete deletes the record from the database.
An associated {= rev.ReverseIdentifier will also be deleted since its RootU field is not nullable.
func (*RootU) Get ¶
func (o *RootU) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootU) GetAlias ¶
func (o *RootU) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootU) ID ¶
func (o *RootU) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootU) IDIsLoaded ¶
func (o *RootU) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootU) Initialize ¶
func (o *RootU) Initialize()
Initialize will initialize or re-initialize a RootU database object to default values.
func (*RootU) IsDirty ¶
func (o *RootU) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootU) IsNew ¶
func (o *RootU) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootU) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootU) LeafU ¶
func (o *RootU) LeafU() *LeafU
LeafU returns the connected LeafU object, if one was loaded. Otherwise, it will return nil.
func (*RootU) LoadLeafU ¶
LoadLeafU returns the connected LeafU object, if one was loaded. Otherwise, it will load a new one and return it.
func (*RootU) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootU) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootU) MarshalStringMap ¶
func (o *RootU) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootU) Name ¶
func (o *RootU) Name() string
Name returns the value of the loaded name field in the database.
func (*RootU) NameIsLoaded ¶
func (o *RootU) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootU) OriginalPrimaryKey ¶
func (o *RootU) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootU) PrimaryKey ¶
func (o *RootU) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootU) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootU) SetID ¶
func (o *RootU) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootU) SetLeafU ¶
func (o *RootU) SetLeafU(obj *LeafU)
SetLeafU associates obj with this RootU through the reverse relationship in LeafU.RootU.
The association is temporary until you call Save(). WARNING! Since this is a non-nullable unique relationship, if a different LeafU object is currently pointing to this RootU, it will be deleted. Pass nil to just delete the old object.
func (*RootU) SetName ¶
func (o *RootU) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootU) SetPrimaryKey ¶
func (o *RootU) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootU) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootU) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootU object.
func (*RootU) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootU. The RootU can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*RootU) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootU to modify the json before sending it here.
type RootUBuilder ¶
type RootUBuilder struct {
// contains filtered or unexported fields
}
The RootUBuilder uses a builder pattern to create a query on the database. Create a RootUBuilder by calling QueryRootUs, which will select all the RootU object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootUBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootUs ¶
func QueryRootUs(ctx context.Context) *RootUBuilder
QueryRootUs returns a new query builder. See RootUBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootUBuilder) Calculation ¶
func (b *RootUBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootUBuilder) Count ¶
func (b *RootUBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootUBuilder) Distinct ¶
func (b *RootUBuilder) Distinct() *RootUBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootUBuilder) Get ¶
func (b *RootUBuilder) Get() (*RootU, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootUBuilder) GroupBy ¶
func (b *RootUBuilder) GroupBy(nodes ...query.Node) *RootUBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootUBuilder) Having ¶
func (b *RootUBuilder) Having(node query.Node) *RootUBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootUBuilder) Limit ¶
func (b *RootUBuilder) Limit(maxRowCount int, offset int) *RootUBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootUBuilder) Load ¶
func (b *RootUBuilder) Load() (rootUs []*RootU, err error)
Load terminates the query builder, performs the query, and returns a slice of RootU objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUBuilder) LoadCursor ¶
func (b *RootUBuilder) LoadCursor() (rootUsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootUBuilder) LoadI ¶
func (b *RootUBuilder) LoadI() (rootUs []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUBuilder) OrderBy ¶
func (b *RootUBuilder) OrderBy(nodes ...query.Sorter) *RootUBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootUBuilder) Select ¶
func (b *RootUBuilder) Select(nodes ...query.Node) *RootUBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_u table will be queried and loaded. If nodes contains columns from the root_u table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootUBuilder) Where ¶
func (b *RootUBuilder) Where(c query.Node) *RootUBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootUl ¶
type RootUl struct {
// contains filtered or unexported fields
}
RootUl represents an item in the root_ul table in the database.
func LoadRootUl ¶
func LoadRootUl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootUl, error)
LoadRootUl returns a RootUl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootUlsBuilder.Select] for more info.
func NewRootUl ¶
func NewRootUl() *RootUl
NewRootUl creates a new RootUl object and initializes it to default values.
func (*RootUl) Copy ¶
func (o *RootUl) Copy() (newObject *RootUl)
Copy copies most fields to a new RootUl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootUl) Delete ¶
Delete deletes the record from the database.
An associated {= rev.ReverseIdentifier will also be deleted since its RootUl field is not nullable.
func (*RootUl) Get ¶
func (o *RootUl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootUl) GetAlias ¶
func (o *RootUl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootUl) GroLock ¶
func (o *RootUl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*RootUl) GroLockIsLoaded ¶
func (o *RootUl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUl) ID ¶
func (o *RootUl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootUl) IDIsLoaded ¶
func (o *RootUl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUl) Initialize ¶
func (o *RootUl) Initialize()
Initialize will initialize or re-initialize a RootUl database object to default values.
func (*RootUl) IsDirty ¶
func (o *RootUl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootUl) IsNew ¶
func (o *RootUl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootUl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootUl) LeafUl ¶
func (o *RootUl) LeafUl() *LeafUl
LeafUl returns the connected LeafUl object, if one was loaded. Otherwise, it will return nil.
func (*RootUl) LoadLeafUl ¶
LoadLeafUl returns the connected LeafUl object, if one was loaded. Otherwise, it will load a new one and return it.
func (*RootUl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootUl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootUl) MarshalStringMap ¶
func (o *RootUl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootUl) Name ¶
func (o *RootUl) Name() string
Name returns the value of the loaded name field in the database.
func (*RootUl) NameIsLoaded ¶
func (o *RootUl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUl) OriginalPrimaryKey ¶
func (o *RootUl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootUl) PrimaryKey ¶
func (o *RootUl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootUl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootUl) SetID ¶
func (o *RootUl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUl) SetLeafUl ¶
func (o *RootUl) SetLeafUl(obj *LeafUl)
SetLeafUl associates obj with this RootUl through the reverse relationship in LeafUl.RootUl.
The association is temporary until you call Save(). WARNING! Since this is a non-nullable unique relationship, if a different LeafUl object is currently pointing to this RootUl, it will be deleted. Pass nil to just delete the old object.
func (*RootUl) SetName ¶
func (o *RootUl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootUl) SetPrimaryKey ¶
func (o *RootUl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootUl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootUl object.
func (*RootUl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootUl. The RootUl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*RootUl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootUl to modify the json before sending it here.
type RootUlBuilder ¶
type RootUlBuilder struct {
// contains filtered or unexported fields
}
The RootUlBuilder uses a builder pattern to create a query on the database. Create a RootUlBuilder by calling QueryRootUls, which will select all the RootUl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootUlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootUls ¶
func QueryRootUls(ctx context.Context) *RootUlBuilder
QueryRootUls returns a new query builder. See RootUlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootUlBuilder) Calculation ¶
func (b *RootUlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootUlBuilder) Count ¶
func (b *RootUlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootUlBuilder) Distinct ¶
func (b *RootUlBuilder) Distinct() *RootUlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootUlBuilder) Get ¶
func (b *RootUlBuilder) Get() (*RootUl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootUlBuilder) GroupBy ¶
func (b *RootUlBuilder) GroupBy(nodes ...query.Node) *RootUlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootUlBuilder) Having ¶
func (b *RootUlBuilder) Having(node query.Node) *RootUlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootUlBuilder) Limit ¶
func (b *RootUlBuilder) Limit(maxRowCount int, offset int) *RootUlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootUlBuilder) Load ¶
func (b *RootUlBuilder) Load() (rootUls []*RootUl, err error)
Load terminates the query builder, performs the query, and returns a slice of RootUl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUlBuilder) LoadCursor ¶
func (b *RootUlBuilder) LoadCursor() (rootUlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootUlBuilder) LoadI ¶
func (b *RootUlBuilder) LoadI() (rootUls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUlBuilder) OrderBy ¶
func (b *RootUlBuilder) OrderBy(nodes ...query.Sorter) *RootUlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootUlBuilder) Select ¶
func (b *RootUlBuilder) Select(nodes ...query.Node) *RootUlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_ul table will be queried and loaded. If nodes contains columns from the root_ul table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootUlBuilder) Where ¶
func (b *RootUlBuilder) Where(c query.Node) *RootUlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootUn ¶
type RootUn struct {
// contains filtered or unexported fields
}
RootUn represents an item in the root_un table in the database.
func LoadRootUn ¶
func LoadRootUn(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootUn, error)
LoadRootUn returns a RootUn from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootUnsBuilder.Select] for more info.
func NewRootUn ¶
func NewRootUn() *RootUn
NewRootUn creates a new RootUn object and initializes it to default values.
func (*RootUn) Copy ¶
func (o *RootUn) Copy() (newObject *RootUn)
Copy copies most fields to a new RootUn object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootUn) Delete ¶
Delete deletes the record from the database.
An associated LeafUn will have its RootUn field set to NULL.
func (*RootUn) Get ¶
func (o *RootUn) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootUn) GetAlias ¶
func (o *RootUn) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootUn) ID ¶
func (o *RootUn) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootUn) IDIsLoaded ¶
func (o *RootUn) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUn) Initialize ¶
func (o *RootUn) Initialize()
Initialize will initialize or re-initialize a RootUn database object to default values.
func (*RootUn) IsDirty ¶
func (o *RootUn) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootUn) IsNew ¶
func (o *RootUn) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootUn) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootUn) LeafUn ¶
func (o *RootUn) LeafUn() *LeafUn
LeafUn returns the connected LeafUn object, if one was loaded. Otherwise, it will return nil.
func (*RootUn) LoadLeafUn ¶
LoadLeafUn returns the connected LeafUn object, if one was loaded. Otherwise, it will load a new one and return it.
func (*RootUn) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootUn) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootUn) MarshalStringMap ¶
func (o *RootUn) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootUn) Name ¶
func (o *RootUn) Name() string
Name returns the value of the loaded name field in the database.
func (*RootUn) NameIsLoaded ¶
func (o *RootUn) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUn) OriginalPrimaryKey ¶
func (o *RootUn) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootUn) PrimaryKey ¶
func (o *RootUn) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootUn) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootUn) SetID ¶
func (o *RootUn) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUn) SetLeafUn ¶
func (o *RootUn) SetLeafUn(obj *LeafUn)
SetLeafUn associates obj with this RootUn through the reverse relationship in LeafUn.RootUn.
The association is temporary until you call Save(). Since this is a unique relationship, if a different LeafUn object is currently pointing to this RootUn, that LeafUn's RootUn value will be set to null when Save is called. If you did not use a join to query the attached LeafUn in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be inadvertently changing an item that is not currently attached to this RootUn.
func (*RootUn) SetName ¶
func (o *RootUn) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootUn) SetPrimaryKey ¶
func (o *RootUn) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUn) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootUn) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootUn object.
func (*RootUn) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootUn. The RootUn can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*RootUn) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootUn to modify the json before sending it here.
type RootUnBuilder ¶
type RootUnBuilder struct {
// contains filtered or unexported fields
}
The RootUnBuilder uses a builder pattern to create a query on the database. Create a RootUnBuilder by calling QueryRootUns, which will select all the RootUn object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootUnBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootUns ¶
func QueryRootUns(ctx context.Context) *RootUnBuilder
QueryRootUns returns a new query builder. See RootUnBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootUnBuilder) Calculation ¶
func (b *RootUnBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUnBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootUnBuilder) Count ¶
func (b *RootUnBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootUnBuilder) Distinct ¶
func (b *RootUnBuilder) Distinct() *RootUnBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootUnBuilder) Get ¶
func (b *RootUnBuilder) Get() (*RootUn, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootUnBuilder) GroupBy ¶
func (b *RootUnBuilder) GroupBy(nodes ...query.Node) *RootUnBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootUnBuilder) Having ¶
func (b *RootUnBuilder) Having(node query.Node) *RootUnBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootUnBuilder) Limit ¶
func (b *RootUnBuilder) Limit(maxRowCount int, offset int) *RootUnBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootUnBuilder) Load ¶
func (b *RootUnBuilder) Load() (rootUns []*RootUn, err error)
Load terminates the query builder, performs the query, and returns a slice of RootUn objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUnBuilder) LoadCursor ¶
func (b *RootUnBuilder) LoadCursor() (rootUnsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootUnBuilder) LoadI ¶
func (b *RootUnBuilder) LoadI() (rootUns []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUnBuilder) OrderBy ¶
func (b *RootUnBuilder) OrderBy(nodes ...query.Sorter) *RootUnBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootUnBuilder) Select ¶
func (b *RootUnBuilder) Select(nodes ...query.Node) *RootUnBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_un table will be queried and loaded. If nodes contains columns from the root_un table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootUnBuilder) Where ¶
func (b *RootUnBuilder) Where(c query.Node) *RootUnBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type RootUnl ¶
type RootUnl struct {
// contains filtered or unexported fields
}
RootUnl represents an item in the root_unl table in the database.
func LoadRootUnl ¶
func LoadRootUnl(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*RootUnl, error)
LoadRootUnl returns a RootUnl from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [RootUnlsBuilder.Select] for more info.
func NewRootUnl ¶
func NewRootUnl() *RootUnl
NewRootUnl creates a new RootUnl object and initializes it to default values.
func (*RootUnl) Copy ¶
func (o *RootUnl) Copy() (newObject *RootUnl)
Copy copies most fields to a new RootUnl object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*RootUnl) Delete ¶
Delete deletes the record from the database.
An associated LeafUnl will have its RootUnl field set to NULL.
func (*RootUnl) Get ¶
func (o *RootUnl) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*RootUnl) GetAlias ¶
func (o *RootUnl) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*RootUnl) GroLock ¶
func (o *RootUnl) GroLock() int64
GroLock returns the value of the loaded gro_lock field in the database.
func (*RootUnl) GroLockIsLoaded ¶
func (o *RootUnl) GroLockIsLoaded() bool
GroLockIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUnl) ID ¶
func (o *RootUnl) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*RootUnl) IDIsLoaded ¶
func (o *RootUnl) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUnl) Initialize ¶
func (o *RootUnl) Initialize()
Initialize will initialize or re-initialize a RootUnl database object to default values.
func (*RootUnl) IsDirty ¶
func (o *RootUnl) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*RootUnl) IsNew ¶
func (o *RootUnl) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*RootUnl) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*RootUnl) LeafUnl ¶
func (o *RootUnl) LeafUnl() *LeafUnl
LeafUnl returns the connected LeafUnl object, if one was loaded. Otherwise, it will return nil.
func (*RootUnl) LoadLeafUnl ¶
LoadLeafUnl returns the connected LeafUnl object, if one was loaded. Otherwise, it will load a new one and return it.
func (*RootUnl) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*RootUnl) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*RootUnl) MarshalStringMap ¶
func (o *RootUnl) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*RootUnl) Name ¶
func (o *RootUnl) Name() string
Name returns the value of the loaded name field in the database.
func (*RootUnl) NameIsLoaded ¶
func (o *RootUnl) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*RootUnl) OriginalPrimaryKey ¶
func (o *RootUnl) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*RootUnl) PrimaryKey ¶
func (o *RootUnl) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*RootUnl) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*RootUnl) SetID ¶
func (o *RootUnl) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUnl) SetLeafUnl ¶
func (o *RootUnl) SetLeafUnl(obj *LeafUnl)
SetLeafUnl associates obj with this RootUnl through the reverse relationship in LeafUnl.RootUnl.
The association is temporary until you call Save(). Since this is a unique relationship, if a different LeafUnl object is currently pointing to this RootUnl, that LeafUnl's RootUnl value will be set to null when Save is called. If you did not use a join to query the attached LeafUnl in the first place, used a conditional join, or joined with an expansion, be particularly careful, since you may be inadvertently changing an item that is not currently attached to this RootUnl.
func (*RootUnl) SetName ¶
func (o *RootUnl) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*RootUnl) SetPrimaryKey ¶
func (o *RootUnl) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*RootUnl) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*RootUnl) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a RootUnl object.
func (*RootUnl) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the RootUnl. The RootUnl can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string "groLock" - int64
func (*RootUnl) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in RootUnl to modify the json before sending it here.
type RootUnlBuilder ¶
type RootUnlBuilder struct {
// contains filtered or unexported fields
}
The RootUnlBuilder uses a builder pattern to create a query on the database. Create a RootUnlBuilder by calling QueryRootUnls, which will select all the RootUnl object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A RootUnlBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryRootUnls ¶
func QueryRootUnls(ctx context.Context) *RootUnlBuilder
QueryRootUnls returns a new query builder. See RootUnlBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*RootUnlBuilder) Calculation ¶
func (b *RootUnlBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *RootUnlBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*RootUnlBuilder) Count ¶
func (b *RootUnlBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*RootUnlBuilder) Distinct ¶
func (b *RootUnlBuilder) Distinct() *RootUnlBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*RootUnlBuilder) Get ¶
func (b *RootUnlBuilder) Get() (*RootUnl, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*RootUnlBuilder) GroupBy ¶
func (b *RootUnlBuilder) GroupBy(nodes ...query.Node) *RootUnlBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*RootUnlBuilder) Having ¶
func (b *RootUnlBuilder) Having(node query.Node) *RootUnlBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*RootUnlBuilder) Limit ¶
func (b *RootUnlBuilder) Limit(maxRowCount int, offset int) *RootUnlBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*RootUnlBuilder) Load ¶
func (b *RootUnlBuilder) Load() (rootUnls []*RootUnl, err error)
Load terminates the query builder, performs the query, and returns a slice of RootUnl objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUnlBuilder) LoadCursor ¶
func (b *RootUnlBuilder) LoadCursor() (rootUnlsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*RootUnlBuilder) LoadI ¶
func (b *RootUnlBuilder) LoadI() (rootUnls []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*RootUnlBuilder) OrderBy ¶
func (b *RootUnlBuilder) OrderBy(nodes ...query.Sorter) *RootUnlBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*RootUnlBuilder) Select ¶
func (b *RootUnlBuilder) Select(nodes ...query.Node) *RootUnlBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the root_unl table will be queried and loaded. If nodes contains columns from the root_unl table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*RootUnlBuilder) Where ¶
func (b *RootUnlBuilder) Where(c query.Node) *RootUnlBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type TimeoutTest ¶
type TimeoutTest struct {
// contains filtered or unexported fields
}
TimeoutTest represents an item in the timeout_test table in the database.
func LoadTimeoutTest ¶
func LoadTimeoutTest(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*TimeoutTest, error)
LoadTimeoutTest returns a TimeoutTest from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [TimeoutTestsBuilder.Select] for more info.
func NewTimeoutTest ¶
func NewTimeoutTest() *TimeoutTest
NewTimeoutTest creates a new TimeoutTest object and initializes it to default values.
func (*TimeoutTest) Copy ¶
func (o *TimeoutTest) Copy() (newObject *TimeoutTest)
Copy copies most fields to a new TimeoutTest object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*TimeoutTest) Get ¶
func (o *TimeoutTest) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*TimeoutTest) GetAlias ¶
func (o *TimeoutTest) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*TimeoutTest) ID ¶
func (o *TimeoutTest) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*TimeoutTest) IDIsLoaded ¶
func (o *TimeoutTest) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*TimeoutTest) Initialize ¶
func (o *TimeoutTest) Initialize()
Initialize will initialize or re-initialize a TimeoutTest database object to default values.
func (*TimeoutTest) IsDirty ¶
func (o *TimeoutTest) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*TimeoutTest) IsNew ¶
func (o *TimeoutTest) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*TimeoutTest) Key ¶
func (o *TimeoutTest) Key() string
Key returns a unique key for the object, among a list of similar objects.
func (*TimeoutTest) Label ¶
func (o *TimeoutTest) Label() string
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*TimeoutTest) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*TimeoutTest) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*TimeoutTest) MarshalStringMap ¶
func (o *TimeoutTest) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*TimeoutTest) Name ¶
func (o *TimeoutTest) Name() string
Name returns the value of the loaded name field in the database.
func (*TimeoutTest) NameIsLoaded ¶
func (o *TimeoutTest) NameIsLoaded() bool
NameIsLoaded returns true if the value was loaded from the database or has been set.
func (*TimeoutTest) OriginalPrimaryKey ¶
func (o *TimeoutTest) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*TimeoutTest) PrimaryKey ¶
func (o *TimeoutTest) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*TimeoutTest) Save ¶
func (o *TimeoutTest) Save(ctx context.Context) error
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*TimeoutTest) SetID ¶
func (o *TimeoutTest) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TimeoutTest) SetName ¶
func (o *TimeoutTest) SetName(v string)
SetName sets the value of Name in the object, to be saved later in the database using the Save() function.
func (*TimeoutTest) SetPrimaryKey ¶
func (o *TimeoutTest) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TimeoutTest) String ¶
func (o *TimeoutTest) String() string
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*TimeoutTest) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a TimeoutTest object.
func (*TimeoutTest) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the TimeoutTest. The TimeoutTest can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "name" - string
func (*TimeoutTest) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in TimeoutTest to modify the json before sending it here.
type TimeoutTestBuilder ¶
type TimeoutTestBuilder struct {
// contains filtered or unexported fields
}
The TimeoutTestBuilder uses a builder pattern to create a query on the database. Create a TimeoutTestBuilder by calling QueryTimeoutTests, which will select all the TimeoutTest object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A TimeoutTestBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryTimeoutTests ¶
func QueryTimeoutTests(ctx context.Context) *TimeoutTestBuilder
QueryTimeoutTests returns a new query builder. See TimeoutTestBuilder for doc on how to use the builder.
func (*TimeoutTestBuilder) Calculation ¶
func (b *TimeoutTestBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TimeoutTestBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*TimeoutTestBuilder) Count ¶
func (b *TimeoutTestBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*TimeoutTestBuilder) Distinct ¶
func (b *TimeoutTestBuilder) Distinct() *TimeoutTestBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*TimeoutTestBuilder) Get ¶
func (b *TimeoutTestBuilder) Get() (*TimeoutTest, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*TimeoutTestBuilder) GroupBy ¶
func (b *TimeoutTestBuilder) GroupBy(nodes ...query.Node) *TimeoutTestBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*TimeoutTestBuilder) Having ¶
func (b *TimeoutTestBuilder) Having(node query.Node) *TimeoutTestBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*TimeoutTestBuilder) Limit ¶
func (b *TimeoutTestBuilder) Limit(maxRowCount int, offset int) *TimeoutTestBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*TimeoutTestBuilder) Load ¶
func (b *TimeoutTestBuilder) Load() (timeoutTests []*TimeoutTest, err error)
Load terminates the query builder, performs the query, and returns a slice of TimeoutTest objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TimeoutTestBuilder) LoadCursor ¶
func (b *TimeoutTestBuilder) LoadCursor() (timeoutTestsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
LoadCursor is NOT protected by a timeout on the context. You should set your own timeout on the context, but all the rows of the cursor must be read before canceling the cursor.
func (*TimeoutTestBuilder) LoadI ¶
func (b *TimeoutTestBuilder) LoadI() (timeoutTests []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TimeoutTestBuilder) OrderBy ¶
func (b *TimeoutTestBuilder) OrderBy(nodes ...query.Sorter) *TimeoutTestBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*TimeoutTestBuilder) Select ¶
func (b *TimeoutTestBuilder) Select(nodes ...query.Node) *TimeoutTestBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the timeout_test table will be queried and loaded. If nodes contains columns from the timeout_test table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*TimeoutTestBuilder) Where ¶
func (b *TimeoutTestBuilder) Where(c query.Node) *TimeoutTestBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type TwoKey ¶
type TwoKey struct {
// contains filtered or unexported fields
}
TwoKey represents an item in the two_key table in the database.
func LoadTwoKey ¶
func LoadTwoKey(ctx context.Context, pk TwoKeyPrimaryKey, selectNodes ...query.Node) (*TwoKey, error)
LoadTwoKey returns a TwoKey from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [TwoKeysBuilder.Select] for more info.
func NewTwoKey ¶
func NewTwoKey() *TwoKey
NewTwoKey creates a new TwoKey object and initializes it to default values.
func (*TwoKey) Copy ¶
func (o *TwoKey) Copy() (newObject *TwoKey)
Copy copies most fields to a new TwoKey object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied. You will need to manually set the primary key field before saving. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*TwoKey) Directory ¶
func (o *TwoKey) Directory() string
Directory returns the loaded value of the directory field in the database.
func (*TwoKey) DirectoryIsLoaded ¶
func (o *TwoKey) DirectoryIsLoaded() bool
DirectoryIsLoaded returns true if the value was loaded from the database or has been set.
func (*TwoKey) FileName ¶
func (o *TwoKey) FileName() string
FileName returns the value of the loaded file_name field in the database.
func (*TwoKey) FileNameIsLoaded ¶
func (o *TwoKey) FileNameIsLoaded() bool
FileNameIsLoaded returns true if the value was loaded from the database or has been set.
func (*TwoKey) Get ¶
func (o *TwoKey) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*TwoKey) GetAlias ¶
func (o *TwoKey) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*TwoKey) Initialize ¶
func (o *TwoKey) Initialize()
Initialize will initialize or re-initialize a TwoKey database object to default values.
func (*TwoKey) IsDirty ¶
func (o *TwoKey) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*TwoKey) IsNew ¶
func (o *TwoKey) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*TwoKey) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*TwoKey) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*TwoKey) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*TwoKey) MarshalStringMap ¶
func (o *TwoKey) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*TwoKey) OriginalPrimaryKey ¶
func (o *TwoKey) OriginalPrimaryKey() TwoKeyPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*TwoKey) PrimaryKey ¶
func (o *TwoKey) PrimaryKey() TwoKeyPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*TwoKey) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*TwoKey) Server ¶
func (o *TwoKey) Server() string
Server returns the loaded value of the server field in the database.
func (*TwoKey) ServerIsLoaded ¶
func (o *TwoKey) ServerIsLoaded() bool
ServerIsLoaded returns true if the value was loaded from the database or has been set.
func (*TwoKey) SetDirectory ¶
func (o *TwoKey) SetDirectory(v string)
SetDirectory sets the value of Directory in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TwoKey) SetFileName ¶
func (o *TwoKey) SetFileName(v string)
SetFileName sets the value of FileName in the object, to be saved later in the database using the Save() function.
func (*TwoKey) SetPrimaryKey ¶
func (o *TwoKey) SetPrimaryKey(v TwoKeyPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TwoKey) SetServer ¶
func (o *TwoKey) SetServer(v string)
SetServer sets the value of Server in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TwoKey) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*TwoKey) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a TwoKey object.
func (*TwoKey) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the TwoKey. The TwoKey can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"server" - string "directory" - string "fileName" - string
func (*TwoKey) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in TwoKey to modify the json before sending it here.
type TwoKeyBuilder ¶
type TwoKeyBuilder struct {
// contains filtered or unexported fields
}
The TwoKeyBuilder uses a builder pattern to create a query on the database. Create a TwoKeyBuilder by calling QueryTwoKeys, which will select all the TwoKey object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A TwoKeyBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryTwoKeys ¶
func QueryTwoKeys(ctx context.Context) *TwoKeyBuilder
QueryTwoKeys returns a new query builder. See TwoKeyBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*TwoKeyBuilder) Calculation ¶
func (b *TwoKeyBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TwoKeyBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*TwoKeyBuilder) Count ¶
func (b *TwoKeyBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*TwoKeyBuilder) Distinct ¶
func (b *TwoKeyBuilder) Distinct() *TwoKeyBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*TwoKeyBuilder) Get ¶
func (b *TwoKeyBuilder) Get() (*TwoKey, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*TwoKeyBuilder) GroupBy ¶
func (b *TwoKeyBuilder) GroupBy(nodes ...query.Node) *TwoKeyBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*TwoKeyBuilder) Having ¶
func (b *TwoKeyBuilder) Having(node query.Node) *TwoKeyBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*TwoKeyBuilder) Limit ¶
func (b *TwoKeyBuilder) Limit(maxRowCount int, offset int) *TwoKeyBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*TwoKeyBuilder) Load ¶
func (b *TwoKeyBuilder) Load() (twoKeys []*TwoKey, err error)
Load terminates the query builder, performs the query, and returns a slice of TwoKey objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TwoKeyBuilder) LoadCursor ¶
func (b *TwoKeyBuilder) LoadCursor() (twoKeysCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*TwoKeyBuilder) LoadI ¶
func (b *TwoKeyBuilder) LoadI() (twoKeys []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TwoKeyBuilder) OrderBy ¶
func (b *TwoKeyBuilder) OrderBy(nodes ...query.Sorter) *TwoKeyBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*TwoKeyBuilder) Select ¶
func (b *TwoKeyBuilder) Select(nodes ...query.Node) *TwoKeyBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the two_key table will be queried and loaded. If nodes contains columns from the two_key table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*TwoKeyBuilder) Where ¶
func (b *TwoKeyBuilder) Where(c query.Node) *TwoKeyBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type TwoKeyPrimaryKey ¶
type TypeTest ¶
type TypeTest struct {
// contains filtered or unexported fields
}
TypeTest represents an item in the type_test table in the database.
func LoadTypeTest ¶
func LoadTypeTest(ctx context.Context, pk query.AutoPrimaryKey, selectNodes ...query.Node) (*TypeTest, error)
LoadTypeTest returns a TypeTest from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [TypeTestsBuilder.Select] for more info.
func NewTypeTest ¶
func NewTypeTest() *TypeTest
NewTypeTest creates a new TypeTest object and initializes it to default values.
func (*TypeTest) Copy ¶
func (o *TypeTest) Copy() (newObject *TypeTest)
Copy copies most fields to a new TypeTest object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied, since it is normally auto-generated. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*TypeTest) CreationTime ¶
CreationTime returns the value of the loaded creation_time field in the database.
func (*TypeTest) CreationTimeIsLoaded ¶
func (o *TypeTest) CreationTimeIsLoaded() bool
CreationTimeIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) DateIsLoaded ¶
func (o *TypeTest) DateIsLoaded() bool
DateIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) DateIsNull ¶
func (o *TypeTest) DateIsNull() bool
DateIsNull returns true if the related database value is null.
func (*TypeTest) DateTime ¶
DateTime returns the value of the loaded date_time field in the database.
func (*TypeTest) DateTimeIsLoaded ¶
func (o *TypeTest) DateTimeIsLoaded() bool
DateTimeIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) DateTimeIsNull ¶
func (o *TypeTest) DateTimeIsNull() bool
DateTimeIsNull returns true if the related database value is null.
func (*TypeTest) Get ¶
func (o *TypeTest) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*TypeTest) GetAlias ¶
func (o *TypeTest) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*TypeTest) ID ¶
func (o *TypeTest) ID() query.AutoPrimaryKey
ID returns the loaded value of the id field in the database.
func (*TypeTest) IDIsLoaded ¶
func (o *TypeTest) IDIsLoaded() bool
IDIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) Initialize ¶
func (o *TypeTest) Initialize()
Initialize will initialize or re-initialize a TypeTest database object to default values.
func (*TypeTest) IsDirty ¶
func (o *TypeTest) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*TypeTest) IsNew ¶
func (o *TypeTest) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*TypeTest) Label ¶
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*TypeTest) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*TypeTest) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*TypeTest) MarshalStringMap ¶
func (o *TypeTest) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*TypeTest) ModifiedTime ¶
ModifiedTime returns the value of the loaded modified_time field in the database.
func (*TypeTest) ModifiedTimeIsLoaded ¶
func (o *TypeTest) ModifiedTimeIsLoaded() bool
ModifiedTimeIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) OriginalPrimaryKey ¶
func (o *TypeTest) OriginalPrimaryKey() query.AutoPrimaryKey
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*TypeTest) PrimaryKey ¶
func (o *TypeTest) PrimaryKey() query.AutoPrimaryKey
PrimaryKey returns the value of the primary key of the record.
func (*TypeTest) Save ¶
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*TypeTest) SetDate ¶
SetDate sets the value of Date in the object, to be saved later in the database using the Save() function.
The value v will be converted to UTC time. The time will also be zeroed. This may cause the date value to change. To prevent this, be sure that the date given is already in UTC time.
func (*TypeTest) SetDateTime ¶
SetDateTime sets the value of DateTime in the object, to be saved later in the database using the Save() function.
The value v will be converted to UTC time.
func (*TypeTest) SetDateTimeToNull ¶
func (o *TypeTest) SetDateTimeToNull()
SetDateTimeToNull() will set the date_time value in the database to NULL. DateTime() will return the column's default value after this.
func (*TypeTest) SetDateToNull ¶
func (o *TypeTest) SetDateToNull()
SetDateToNull() will set the date value in the database to NULL. Date() will return the column's default value after this.
func (*TypeTest) SetID ¶
func (o *TypeTest) SetID(v query.AutoPrimaryKey)
SetID sets the value of ID in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the ID value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TypeTest) SetPrimaryKey ¶
func (o *TypeTest) SetPrimaryKey(v query.AutoPrimaryKey)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. Normally you will not need to call this function, since the primary key value is automatically generated by the database driver. Exceptions might include importing data to a new database, or correcting primary key conflicts when merging data. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*TypeTest) SetTestBool ¶
func (o *TypeTest) SetTestBool(v bool)
SetTestBool sets the value of TestBool in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestFloat32 ¶
func (o *TypeTest) SetTestFloat32(v float32)
SetTestFloat32 sets the value of TestFloat32 in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestFloat32ToNull ¶
func (o *TypeTest) SetTestFloat32ToNull()
SetTestFloat32ToNull() will set the test_float32 value in the database to NULL. TestFloat32() will return the column's default value after this.
func (*TypeTest) SetTestFloat64 ¶
func (o *TypeTest) SetTestFloat64(v float64)
SetTestFloat64 sets the value of TestFloat64 in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestInt ¶
func (o *TypeTest) SetTestInt(v int)
SetTestInt sets the value of TestInt in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestInt64 ¶
func (o *TypeTest) SetTestInt64(v int64)
SetTestInt64 sets the value of TestInt64 in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestIntToNull ¶
func (o *TypeTest) SetTestIntToNull()
SetTestIntToNull() will set the test_int value in the database to NULL. TestInt() will return the column's default value after this.
func (*TypeTest) SetTestLimitedBytes ¶
func (o *TypeTest) SetTestLimitedBytes(v []byte)
SetTestLimitedBytes copies the value of TestLimitedBytes, to be saved later in the database using the Save() function. Passing nil will set test_limited_bytes to an empty array.
func (*TypeTest) SetTestLimitedString ¶
func (o *TypeTest) SetTestLimitedString(v string)
SetTestLimitedString sets the value of TestLimitedString in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestLongstring ¶
func (o *TypeTest) SetTestLongstring(v string)
SetTestLongstring sets the value of TestLongstring in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestNumeric ¶
func (o *TypeTest) SetTestNumeric(v string)
SetTestNumeric sets the value of TestNumeric in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestUint64 ¶
func (o *TypeTest) SetTestUint64(v uint64)
SetTestUint64 sets the value of TestUint64 in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestUnlimitedBytes ¶
func (o *TypeTest) SetTestUnlimitedBytes(v []byte)
SetTestUnlimitedBytes copies the value of TestUnlimitedBytes, to be saved later in the database using the Save() function. Passing nil will set test_unlimited_bytes to an empty array.
func (*TypeTest) SetTestUnlimitedString ¶
func (o *TypeTest) SetTestUnlimitedString(v string)
SetTestUnlimitedString sets the value of TestUnlimitedString in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTestUnsigned ¶
func (o *TypeTest) SetTestUnsigned(v uint)
SetTestUnsigned sets the value of TestUnsigned in the object, to be saved later in the database using the Save() function.
func (*TypeTest) SetTime ¶
SetTime sets the value of Time in the object, to be saved later in the database using the Save() function.
The value v will be converted to UTC time. The date will also be zeroed. This process may cause the time value to change. To prevent this, be sure that the time given is already in UTC time.
func (*TypeTest) SetTimeToNull ¶
func (o *TypeTest) SetTimeToNull()
SetTimeToNull() will set the time value in the database to NULL. Time() will return the column's default value after this.
func (*TypeTest) SetTypeLongBytes ¶
func (o *TypeTest) SetTypeLongBytes(v []byte)
SetTypeLongBytes copies the value of TypeLongBytes, to be saved later in the database using the Save() function. Passing nil will set type_long_bytes to an empty array.
func (*TypeTest) String ¶
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*TypeTest) TestBool ¶
func (o *TypeTest) TestBool() bool
TestBool returns the value of the loaded test_bool field in the database.
func (*TypeTest) TestBoolIsLoaded ¶
func (o *TypeTest) TestBoolIsLoaded() bool
TestBoolIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestFloat32 ¶
func (o *TypeTest) TestFloat32() float32
TestFloat32 returns the value of the loaded test_float32 field in the database.
func (*TypeTest) TestFloat32IsLoaded ¶
func (o *TypeTest) TestFloat32IsLoaded() bool
TestFloat32IsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestFloat32IsNull ¶
func (o *TypeTest) TestFloat32IsNull() bool
TestFloat32IsNull returns true if the related database value is null.
func (*TypeTest) TestFloat64 ¶
func (o *TypeTest) TestFloat64() float64
TestFloat64 returns the value of the loaded test_float64 field in the database.
func (*TypeTest) TestFloat64IsLoaded ¶
func (o *TypeTest) TestFloat64IsLoaded() bool
TestFloat64IsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestInt ¶
func (o *TypeTest) TestInt() int
TestInt returns the value of the loaded test_int field in the database.
func (*TypeTest) TestInt64 ¶
func (o *TypeTest) TestInt64() int64
TestInt64 returns the value of the loaded test_int64 field in the database.
func (*TypeTest) TestInt64IsLoaded ¶
func (o *TypeTest) TestInt64IsLoaded() bool
TestInt64IsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestIntIsLoaded ¶
func (o *TypeTest) TestIntIsLoaded() bool
TestIntIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestIntIsNull ¶
func (o *TypeTest) TestIntIsNull() bool
TestIntIsNull returns true if the related database value is null.
func (*TypeTest) TestLimitedBytes ¶
func (o *TypeTest) TestLimitedBytes() []byte
TestLimitedBytes returns the value of the loaded test_limited_bytes field in the database.
func (*TypeTest) TestLimitedBytesIsLoaded ¶
func (o *TypeTest) TestLimitedBytesIsLoaded() bool
TestLimitedBytesIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestLimitedString ¶
func (o *TypeTest) TestLimitedString() string
TestLimitedString returns the value of the loaded test_limited_string field in the database.
func (*TypeTest) TestLimitedStringIsLoaded ¶
func (o *TypeTest) TestLimitedStringIsLoaded() bool
TestLimitedStringIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestLongstring ¶
func (o *TypeTest) TestLongstring() string
TestLongstring returns the value of the loaded test_longstring field in the database.
func (*TypeTest) TestLongstringIsLoaded ¶
func (o *TypeTest) TestLongstringIsLoaded() bool
TestLongstringIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestNumeric ¶
func (o *TypeTest) TestNumeric() string
TestNumeric returns the value of the loaded test_numeric field in the database.
func (*TypeTest) TestNumericIsLoaded ¶
func (o *TypeTest) TestNumericIsLoaded() bool
TestNumericIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestUint64 ¶
func (o *TypeTest) TestUint64() uint64
TestUint64 returns the value of the loaded test_uint64 field in the database.
func (*TypeTest) TestUint64IsLoaded ¶
func (o *TypeTest) TestUint64IsLoaded() bool
TestUint64IsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestUnlimitedBytes ¶
func (o *TypeTest) TestUnlimitedBytes() []byte
TestUnlimitedBytes returns the value of the loaded test_unlimited_bytes field in the database.
func (*TypeTest) TestUnlimitedBytesIsLoaded ¶
func (o *TypeTest) TestUnlimitedBytesIsLoaded() bool
TestUnlimitedBytesIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestUnlimitedString ¶
func (o *TypeTest) TestUnlimitedString() string
TestUnlimitedString returns the value of the loaded test_unlimited_string field in the database.
func (*TypeTest) TestUnlimitedStringIsLoaded ¶
func (o *TypeTest) TestUnlimitedStringIsLoaded() bool
TestUnlimitedStringIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TestUnsigned ¶
func (o *TypeTest) TestUnsigned() uint
TestUnsigned returns the value of the loaded test_unsigned field in the database.
func (*TypeTest) TestUnsignedIsLoaded ¶
func (o *TypeTest) TestUnsignedIsLoaded() bool
TestUnsignedIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TimeIsLoaded ¶
func (o *TypeTest) TimeIsLoaded() bool
TimeIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) TimeIsNull ¶
func (o *TypeTest) TimeIsNull() bool
TimeIsNull returns true if the related database value is null.
func (*TypeTest) TypeLongBytes ¶
func (o *TypeTest) TypeLongBytes() []byte
TypeLongBytes returns the value of the loaded type_long_bytes field in the database.
func (*TypeTest) TypeLongBytesIsLoaded ¶
func (o *TypeTest) TypeLongBytesIsLoaded() bool
TypeLongBytesIsLoaded returns true if the value was loaded from the database or has been set.
func (*TypeTest) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a TypeTest object.
func (*TypeTest) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the TypeTest. The TypeTest can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"id" - query.AutoPrimaryKey "date" - time.Time, nullable "time" - time.Time, nullable "dateTime" - time.Time, nullable "creationTime" - time.Time "modifiedTime" - time.Time "testInt" - int, nullable "testUnsigned" - uint "testInt64" - int64 "testUint64" - uint64 "testFloat32" - float32, nullable "testFloat64" - float64 "testNumeric" - string "testBool" - bool "testUnlimitedString" - string "testLimitedString" - string "testLongstring" - string "testUnlimitedBytes" - []byte "testLimitedBytes" - []byte "typeLongBytes" - []byte
func (*TypeTest) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in TypeTest to modify the json before sending it here.
type TypeTestBuilder ¶
type TypeTestBuilder struct {
// contains filtered or unexported fields
}
The TypeTestBuilder uses a builder pattern to create a query on the database. Create a TypeTestBuilder by calling QueryTypeTests, which will select all the TypeTest object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A TypeTestBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryTypeTests ¶
func QueryTypeTests(ctx context.Context) *TypeTestBuilder
QueryTypeTests returns a new query builder. See TypeTestBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*TypeTestBuilder) Calculation ¶
func (b *TypeTestBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *TypeTestBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*TypeTestBuilder) Count ¶
func (b *TypeTestBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*TypeTestBuilder) Distinct ¶
func (b *TypeTestBuilder) Distinct() *TypeTestBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*TypeTestBuilder) Get ¶
func (b *TypeTestBuilder) Get() (*TypeTest, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*TypeTestBuilder) GroupBy ¶
func (b *TypeTestBuilder) GroupBy(nodes ...query.Node) *TypeTestBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*TypeTestBuilder) Having ¶
func (b *TypeTestBuilder) Having(node query.Node) *TypeTestBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*TypeTestBuilder) Limit ¶
func (b *TypeTestBuilder) Limit(maxRowCount int, offset int) *TypeTestBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*TypeTestBuilder) Load ¶
func (b *TypeTestBuilder) Load() (typeTests []*TypeTest, err error)
Load terminates the query builder, performs the query, and returns a slice of TypeTest objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TypeTestBuilder) LoadCursor ¶
func (b *TypeTestBuilder) LoadCursor() (typeTestsCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*TypeTestBuilder) LoadI ¶
func (b *TypeTestBuilder) LoadI() (typeTests []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*TypeTestBuilder) OrderBy ¶
func (b *TypeTestBuilder) OrderBy(nodes ...query.Sorter) *TypeTestBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*TypeTestBuilder) Select ¶
func (b *TypeTestBuilder) Select(nodes ...query.Node) *TypeTestBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the type_test table will be queried and loaded. If nodes contains columns from the type_test table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*TypeTestBuilder) Where ¶
func (b *TypeTestBuilder) Where(c query.Node) *TypeTestBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
type UnsupportedType ¶
type UnsupportedType struct {
// contains filtered or unexported fields
}
UnsupportedType represents an item in the unsupported_type table in the database.
func LoadUnsupportedType ¶
func LoadUnsupportedType(ctx context.Context, pk uint64, selectNodes ...query.Node) (*UnsupportedType, error)
LoadUnsupportedType returns a UnsupportedType from the database. selectNodes lets you provide nodes for selecting specific fields or additional fields from related tables. See [UnsupportedTypesBuilder.Select] for more info.
func LoadUnsupportedTypesByTypeMultFk1TypeMultiFk2 ¶
func LoadUnsupportedTypesByTypeMultFk1TypeMultiFk2(ctx context.Context, typeMultFk1 string, typeMultiFk2 string, selectNodes ...query.Node) ([]*UnsupportedType, error)
LoadUnsupportedTypesByTypeMultFk1TypeMultiFk2 queries UnsupportedType objects by the given index values. selectNodes optionally let you provide nodes for joining to other tables or selecting specific fields. See [UnsupportedTypesBuilder.Select]. If you need a more elaborate query, use QueryUnsupportedTypes() to start a query builder.
func NewUnsupportedType ¶
func NewUnsupportedType() *UnsupportedType
NewUnsupportedType creates a new UnsupportedType object and initializes it to default values.
func (*UnsupportedType) Copy ¶
func (o *UnsupportedType) Copy() (newObject *UnsupportedType)
Copy copies most fields to a new UnsupportedType object. Forward reference ids will be copied, but reverse and many-many references will not. Attached objects will not be included in the copy. Automatically generated fields will not be included in the copy. The primary key field will not be copied. You will need to manually set the primary key field before saving. Call Save() on the new object to save it into the database. Copy might panic if any fields in the database were set to a size larger than the maximum size through a process that accessed the database outside of the ORM.
func (*UnsupportedType) Get ¶
func (o *UnsupportedType) Get(key string) interface{}
Get returns the value of a field in the object based on the field's name. It will also get related objects if they are loaded. Invalid fields and objects are returned as nil. Get can be used to retrieve a value by using the Field() of a node.
func (*UnsupportedType) GetAlias ¶
func (o *UnsupportedType) GetAlias(aliasKey string) query.AliasValue
GetAlias returns the value for the Alias node aliasKey that was returned in the most recent query.
func (*UnsupportedType) Initialize ¶
func (o *UnsupportedType) Initialize()
Initialize will initialize or re-initialize a UnsupportedType database object to default values.
func (*UnsupportedType) IsDirty ¶
func (o *UnsupportedType) IsDirty() (dirty bool)
IsDirty returns true if the object has been changed since it was read from the database or created.
func (*UnsupportedType) IsNew ¶
func (o *UnsupportedType) IsNew() bool
IsNew returns true if the object will create a new record when saved.
func (*UnsupportedType) Key ¶
func (o *UnsupportedType) Key() string
Key returns a unique key for the object, among a list of similar objects.
func (*UnsupportedType) Label ¶
func (o *UnsupportedType) Label() string
Label returns a human-readable label of the object. This would be what a user would see as a description of the object if choosing from a list.
func (*UnsupportedType) MarshalBinary ¶
MarshalBinary serializes the object into a buffer that is deserializable using UnmarshalBinary. It should be used for transmitting database objects over the wire, or for temporary storage. It does not send a version number, so if the data format changes, its up to you to invalidate the old stored objects. The framework uses this to serialize the object when it is stored in a control.
func (*UnsupportedType) MarshalJSON ¶
MarshalJSON serializes the object into a JSON object. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. Another way to control the output is to call MarshalStringMap, modify the map, then encode the map.
func (*UnsupportedType) MarshalStringMap ¶
func (o *UnsupportedType) MarshalStringMap() map[string]interface{}
MarshalStringMap serializes the object into a string map of interfaces. Only valid data will be serialized, meaning, you can control what gets serialized by using Select to select only the fields you want when you query for the object. The keys are the same as the json keys.
func (*UnsupportedType) OriginalPrimaryKey ¶
func (o *UnsupportedType) OriginalPrimaryKey() uint64
OriginalPrimaryKey returns the value of the primary key that was originally loaded into the object when it was read from the database.
func (*UnsupportedType) PrimaryKey ¶
func (o *UnsupportedType) PrimaryKey() uint64
PrimaryKey returns the value of the primary key of the record.
func (*UnsupportedType) Save ¶
func (o *UnsupportedType) Save(ctx context.Context) error
Save will update or insert the object, depending on the state of the object.
If it has an auto-generated primary key, it will be updated after an insert. Database errors generally will be handled by a panic and not returned here, since those indicate a problem with a database driver or configuration.
Save will return a db.OptimisticLockError if it detects a collision when two users are attempting to change the same database record.
It will return a db.UniqueValueError if it detects a collision when an attempt is made to add a record with a unique column that is given a value that is already in the database.
Updating a record that has not changed will have no effect on the database. Updating a record that has linked records will also update any linked records that are MODIFIED, and if optimistic locking is in effect, will also check whether those records have been altered or deleted, returning an OptimisticLockError if so.
func (*UnsupportedType) SetPrimaryKey ¶
func (o *UnsupportedType) SetPrimaryKey(v uint64)
SetPrimaryKey sets the value of the primary key in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*UnsupportedType) SetTypeBinary ¶
func (o *UnsupportedType) SetTypeBinary(v []byte)
SetTypeBinary copies the value of TypeBinary, to be saved later in the database using the Save() function. Passing nil will set type_binary to an empty array.
func (*UnsupportedType) SetTypeEnumerated ¶
func (o *UnsupportedType) SetTypeEnumerated(v []byte)
SetTypeEnumerated copies the value of TypeEnumerated, to be saved later in the database using the Save() function. Passing nil will set type_enumerated to an empty array.
func (*UnsupportedType) SetTypeGeo ¶
func (o *UnsupportedType) SetTypeGeo(v []byte)
SetTypeGeo copies the value of TypeGeo, to be saved later in the database using the Save() function. Passing nil will set type_geo to an empty array.
func (*UnsupportedType) SetTypeMedium ¶
func (o *UnsupportedType) SetTypeMedium(v int)
SetTypeMedium sets the value of TypeMedium in the object, to be saved later in the database using the Save() function.
func (*UnsupportedType) SetTypeMultFk1 ¶
func (o *UnsupportedType) SetTypeMultFk1(v string)
SetTypeMultFk1 sets the value of TypeMultFk1 in the object, to be saved later in the database using the Save() function.
func (*UnsupportedType) SetTypeMultiFk2 ¶
func (o *UnsupportedType) SetTypeMultiFk2(v string)
SetTypeMultiFk2 sets the value of TypeMultiFk2 in the object, to be saved later in the database using the Save() function.
func (*UnsupportedType) SetTypePolygon ¶
func (o *UnsupportedType) SetTypePolygon(v []byte)
SetTypePolygon copies the value of TypePolygon, to be saved later in the database using the Save() function. Passing nil will set type_polygon to an empty array.
func (*UnsupportedType) SetTypeSerial ¶
func (o *UnsupportedType) SetTypeSerial(v uint64)
SetTypeSerial sets the value of TypeSerial in the object, to be saved later in the database using the Save() function. You cannot change a primary key for a record that has been written to the database. While SQL databases will allow it, NoSql databases will not. Save a copy and delete this one instead.
func (*UnsupportedType) SetTypeSet ¶
func (o *UnsupportedType) SetTypeSet(v []byte)
SetTypeSet copies the value of TypeSet, to be saved later in the database using the Save() function. Passing nil will set type_set to an empty array.
func (*UnsupportedType) SetTypeSmall ¶
func (o *UnsupportedType) SetTypeSmall(v int)
SetTypeSmall sets the value of TypeSmall in the object, to be saved later in the database using the Save() function.
func (*UnsupportedType) SetTypeTinyblob ¶
func (o *UnsupportedType) SetTypeTinyblob(v []byte)
SetTypeTinyblob copies the value of TypeTinyblob, to be saved later in the database using the Save() function. Passing nil will set type_tinyblob to an empty array.
func (*UnsupportedType) String ¶
func (o *UnsupportedType) String() string
String implements the Stringer interface and returns a description of the record, primarily for debugging.
func (*UnsupportedType) TypeBinary ¶
func (o *UnsupportedType) TypeBinary() []byte
TypeBinary returns the value of the loaded type_binary field in the database.
func (*UnsupportedType) TypeBinaryIsLoaded ¶
func (o *UnsupportedType) TypeBinaryIsLoaded() bool
TypeBinaryIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeEnumerated ¶
func (o *UnsupportedType) TypeEnumerated() []byte
TypeEnumerated returns the value of the loaded type_enumerated field in the database.
func (*UnsupportedType) TypeEnumeratedIsLoaded ¶
func (o *UnsupportedType) TypeEnumeratedIsLoaded() bool
TypeEnumeratedIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeGeo ¶
func (o *UnsupportedType) TypeGeo() []byte
TypeGeo returns the value of the loaded type_geo field in the database.
func (*UnsupportedType) TypeGeoIsLoaded ¶
func (o *UnsupportedType) TypeGeoIsLoaded() bool
TypeGeoIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeMedium ¶
func (o *UnsupportedType) TypeMedium() int
TypeMedium returns the value of the loaded type_medium field in the database.
func (*UnsupportedType) TypeMediumIsLoaded ¶
func (o *UnsupportedType) TypeMediumIsLoaded() bool
TypeMediumIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeMultFk1 ¶
func (o *UnsupportedType) TypeMultFk1() string
TypeMultFk1 returns the value of the loaded type_mult_fk1 field in the database.
func (*UnsupportedType) TypeMultFk1IsLoaded ¶
func (o *UnsupportedType) TypeMultFk1IsLoaded() bool
TypeMultFk1IsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeMultiFk2 ¶
func (o *UnsupportedType) TypeMultiFk2() string
TypeMultiFk2 returns the value of the loaded type_multi_fk2 field in the database.
func (*UnsupportedType) TypeMultiFk2IsLoaded ¶
func (o *UnsupportedType) TypeMultiFk2IsLoaded() bool
TypeMultiFk2IsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypePolygon ¶
func (o *UnsupportedType) TypePolygon() []byte
TypePolygon returns the value of the loaded type_polygon field in the database.
func (*UnsupportedType) TypePolygonIsLoaded ¶
func (o *UnsupportedType) TypePolygonIsLoaded() bool
TypePolygonIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeSerial ¶
func (o *UnsupportedType) TypeSerial() uint64
TypeSerial returns the loaded value of the type_serial field in the database.
func (*UnsupportedType) TypeSerialIsLoaded ¶
func (o *UnsupportedType) TypeSerialIsLoaded() bool
TypeSerialIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeSet ¶
func (o *UnsupportedType) TypeSet() []byte
TypeSet returns the value of the loaded type_set field in the database.
func (*UnsupportedType) TypeSetIsLoaded ¶
func (o *UnsupportedType) TypeSetIsLoaded() bool
TypeSetIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeSmall ¶
func (o *UnsupportedType) TypeSmall() int
TypeSmall returns the value of the loaded type_small field in the database.
func (*UnsupportedType) TypeSmallIsLoaded ¶
func (o *UnsupportedType) TypeSmallIsLoaded() bool
TypeSmallIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) TypeTinyblob ¶
func (o *UnsupportedType) TypeTinyblob() []byte
TypeTinyblob returns the value of the loaded type_tinyblob field in the database.
func (*UnsupportedType) TypeTinyblobIsLoaded ¶
func (o *UnsupportedType) TypeTinyblobIsLoaded() bool
TypeTinyblobIsLoaded returns true if the value was loaded from the database or has been set.
func (*UnsupportedType) UnmarshalBinary ¶
UnmarshalBinary converts a structure that was created with MarshalBinary into a UnsupportedType object.
func (*UnsupportedType) UnmarshalJSON ¶
UnmarshalJSON unmarshalls the given json data into the UnsupportedType. The UnsupportedType can be a newly created object, or one loaded from the database.
After unmarshalling, the object is not saved. You must call Save to insert it into the database or update it.
Unmarshalling of sub-objects, as in objects linked via foreign keys, is not currently supported.
The fields it expects are:
"typeSerial" - uint64 "typeSet" - []byte "typeEnumerated" - []byte "typeGeo" - []byte "typeTinyblob" - []byte "typeBinary" - []byte "typeSmall" - int "typeMedium" - int "typePolygon" - []byte "typeMultFk1" - string "typeMultiFk2" - string
func (*UnsupportedType) UnmarshalStringMap ¶
UnmarshalStringMap will load the values from the stringmap into the object.
Override this in UnsupportedType to modify the json before sending it here.
type UnsupportedTypeBuilder ¶
type UnsupportedTypeBuilder struct {
// contains filtered or unexported fields
}
The UnsupportedTypeBuilder uses a builder pattern to create a query on the database. Create a UnsupportedTypeBuilder by calling QueryUnsupportedTypes, which will select all the UnsupportedType object in the database. Then filter and arrange those objects by calling Where, Select, etc. End a query by calling either Load, LoadI, LoadCursor, Get, or Count. A UnsupportedTypeBuilder stores the context it will use to perform the query, and thus is meant to be a short-lived object. You should not save it for later use.
func QueryUnsupportedTypes ¶
func QueryUnsupportedTypes(ctx context.Context) *UnsupportedTypeBuilder
QueryUnsupportedTypes returns a new query builder. See UnsupportedTypeBuilder for doc on how to use the builder. You should pass a context that has a timeout with it to protect against a long delay from the database possibly hanging your application. You can set a ReadTimeout value on the schema to do this by default during code generation.
func (*UnsupportedTypeBuilder) Calculation ¶
func (b *UnsupportedTypeBuilder) Calculation(base query.TableNodeI, alias string, operation query.OperationNodeI) *UnsupportedTypeBuilder
Calculation adds operation as an aliased value onto base. After the query, you can read the data by passing alias to GetAlias on the returned object.
func (*UnsupportedTypeBuilder) Count ¶
func (b *UnsupportedTypeBuilder) Count() (int, error)
Count terminates a query and returns just the number of items in the result. If you have Select or Calculation columns in the query, it will count NULL results as well. To not count NULL values, use Where in the builder with a NotNull operation. To count distinct combinations of items, call Distinct() on the builder.
func (*UnsupportedTypeBuilder) Distinct ¶
func (b *UnsupportedTypeBuilder) Distinct() *UnsupportedTypeBuilder
Distinct removes duplicates from the results of the query. Adding a Select() is usually required.
func (*UnsupportedTypeBuilder) Get ¶
func (b *UnsupportedTypeBuilder) Get() (*UnsupportedType, error)
Get is a convenience method to return only the first item found in a query. The entire query is performed, so you should generally use this only if you know you are selecting on one or very few items. If an error occurs, or no results are found, a nil is returned.
func (*UnsupportedTypeBuilder) GroupBy ¶
func (b *UnsupportedTypeBuilder) GroupBy(nodes ...query.Node) *UnsupportedTypeBuilder
GroupBy controls how results are grouped when using aggregate functions with Calculation.
func (*UnsupportedTypeBuilder) Having ¶
func (b *UnsupportedTypeBuilder) Having(node query.Node) *UnsupportedTypeBuilder
Having does additional filtering on the results of the query after the query is performed.
func (*UnsupportedTypeBuilder) Limit ¶
func (b *UnsupportedTypeBuilder) Limit(maxRowCount int, offset int) *UnsupportedTypeBuilder
Limit will return a subset of the data, limited to the offset and number of rows specified. For large data sets and specific types of queries, this can be slow, because it will perform the entire query before computing the limit. You cannot limit a query that has embedded arrays.
func (*UnsupportedTypeBuilder) Load ¶
func (b *UnsupportedTypeBuilder) Load() (unsupportedTypes []*UnsupportedType, err error)
Load terminates the query builder, performs the query, and returns a slice of UnsupportedType objects. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*UnsupportedTypeBuilder) LoadCursor ¶
func (b *UnsupportedTypeBuilder) LoadCursor() (unsupportedTypesCursor, error)
LoadCursor terminates the query builder, performs the query, and returns a cursor to the query.
A query cursor is useful for dealing with large amounts of query results. However, there are some limitations to its use. When working with SQL databases, you cannot use a cursor while querying many-to-many or reverse relationships that will create an array of values.
Call Next() on the returned cursor object to step through the results. Make sure you call Close on the cursor object when you are done. You should use
defer cursor.Close()
to make sure the cursor gets closed.
func (*UnsupportedTypeBuilder) LoadI ¶
func (b *UnsupportedTypeBuilder) LoadI() (unsupportedTypes []query.OrmObj, err error)
LoadI terminates the query builder, performs the query, and returns a slice of interfaces. This can then satisfy a variety of interfaces that load arrays of objects, including KeyLabeler. If there are any errors, nil is returned and the specific error is stored in the context. If no results come back from the query, it will return a non-nil empty slice.
func (*UnsupportedTypeBuilder) OrderBy ¶
func (b *UnsupportedTypeBuilder) OrderBy(nodes ...query.Sorter) *UnsupportedTypeBuilder
OrderBy specifies how the resulting data should be sorted. By default, the given nodes are sorted in ascending order. Add Descending() to the node to specify that it should be sorted in descending order.
func (*UnsupportedTypeBuilder) Select ¶
func (b *UnsupportedTypeBuilder) Select(nodes ...query.Node) *UnsupportedTypeBuilder
Select specifies what specific columns will be loaded with data. By default, all the columns of the unsupported_type table will be queried and loaded. If nodes contains columns from the unsupported_type table, that will limit the columns queried and loaded to only those columns. If related tables are specified, then all the columns from those tables are queried, selected and joined to the result. If columns in related tables are specified, then only those columns will be queried and loaded. Depending on the query, additional columns may automatically be added to the query. In particular, primary key columns will be added in most situations. The exception to this would be in distinct queries, group by queries, or subqueries.
func (*UnsupportedTypeBuilder) Where ¶
func (b *UnsupportedTypeBuilder) Where(c query.Node) *UnsupportedTypeBuilder
Where adds a condition to filter what gets selected. Calling Where multiple times will AND the conditions together.
Source Files
¶
- alt_leaf_un.go
- alt_leaf_un_base.go
- alt_root_un.go
- alt_root_un_base.go
- auto_gen.go
- auto_gen_base.go
- config.go
- db.go
- double_index.go
- double_index_base.go
- leaf.go
- leaf_base.go
- leaf_l.go
- leaf_l_base.go
- leaf_n.go
- leaf_n_base.go
- leaf_nl.go
- leaf_nl_base.go
- leaf_u.go
- leaf_u_base.go
- leaf_ul.go
- leaf_ul_base.go
- leaf_un.go
- leaf_un_base.go
- leaf_unl.go
- leaf_unl_base.go
- multi_parent.go
- multi_parent_base.go
- root.go
- root_base.go
- root_l.go
- root_l_base.go
- root_n.go
- root_n_base.go
- root_nl.go
- root_nl_base.go
- root_u.go
- root_u_base.go
- root_ul.go
- root_ul_base.go
- root_un.go
- root_un_base.go
- root_unl.go
- root_unl_base.go
- timeout_test_.go
- timeout_test__base.go
- two_key.go
- two_key_base.go
- type_test_.go
- type_test__base.go
- unsupported_type.go
- unsupported_type_base.go