collection_of_attributes

package
v0.0.0-...-3473e7d Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Table       string
	ValueOf     reflect.Value
	StructField reflect.StructField
	Options     options.OptionsOps
}

func NewAttribute

func NewAttribute(table string, valueOf reflect.Value, field reflect.StructField, extraOptions ...interface{}) Attribute

func (*Attribute) AddrInterface

func (a *Attribute) AddrInterface() interface{}

func (*Attribute) DefaultValue

func (a *Attribute) DefaultValue() (string, bool)

func (*Attribute) GarTag

func (a *Attribute) GarTag() string

func (*Attribute) Interface

func (a *Attribute) Interface() (interface{}, error)

func (*Attribute) JSONTag

func (a *Attribute) JSONTag() string

func (*Attribute) RelTagPresent

func (a *Attribute) RelTagPresent() bool

func (*Attribute) SetValueWithReflection

func (a *Attribute) SetValueWithReflection(someValue interface{})

func (*Attribute) TryToParseDefaultValueAndSetDefault

func (a *Attribute) TryToParseDefaultValueAndSetDefault() error

type CollectionOfAttributes

type CollectionOfAttributes struct {
	Table                  string
	TableChild             []TablePkFk
	CollectionOfAttributes []Attribute
	// contains filtered or unexported fields
}

func NewCollectionOfAttributes

func NewCollectionOfAttributes(object interface{}, extraOptions ...interface{}) CollectionOfAttributes

func (*CollectionOfAttributes) AttributeByName

func (a *CollectionOfAttributes) AttributeByName(attributeName string) (bool, Attribute)

func (*CollectionOfAttributes) AttributeFromColumnName

func (a *CollectionOfAttributes) AttributeFromColumnName(columnName string) (pointerToAttribute interface{})

func (*CollectionOfAttributes) AttributeValueFromColumnName

func (a *CollectionOfAttributes) AttributeValueFromColumnName(columnName string) (attributeValue interface{})

func (*CollectionOfAttributes) AttributeValuesAsArray

func (a *CollectionOfAttributes) AttributeValuesAsArray() (sliceOfValues []interface{})

func (*CollectionOfAttributes) AttributeValuesAsSlice

func (a *CollectionOfAttributes) AttributeValuesAsSlice() (pointerList []interface{})

func (*CollectionOfAttributes) AttributesAsColumnNamesForDelete

func (a *CollectionOfAttributes) AttributesAsColumnNamesForDelete() (columns []string)

func (*CollectionOfAttributes) AttributesAsColumnNamesForInsert

func (a *CollectionOfAttributes) AttributesAsColumnNamesForInsert() (columns []string)

func (*CollectionOfAttributes) AttributesAsColumnNamesForSelect

func (a *CollectionOfAttributes) AttributesAsColumnNamesForSelect() (columns []string)

func (*CollectionOfAttributes) AttributesAsColumnNamesForUpdate

func (a *CollectionOfAttributes) AttributesAsColumnNamesForUpdate() (columns []string)

func (*CollectionOfAttributes) CollectAttributesWithDefaultValues

func (a *CollectionOfAttributes) CollectAttributesWithDefaultValues() (attributes []Attribute)

func (*CollectionOfAttributes) Conditions

func (a *CollectionOfAttributes) Conditions(values ...interface{}) (conditions []string)

Remove this in the future

func (*CollectionOfAttributes) FilterByColumnName

func (a *CollectionOfAttributes) FilterByColumnName(baseName string) (pointerToAttribute interface{})

func (*CollectionOfAttributes) FilterForInner

func (a *CollectionOfAttributes) FilterForInner(baseName string) (pointerToAttribute interface{})

func (*CollectionOfAttributes) FilterNormal

func (a *CollectionOfAttributes) FilterNormal(baseName string) (pointerToAttribute interface{})

func (*CollectionOfAttributes) InnerJoinPresent

func (a *CollectionOfAttributes) InnerJoinPresent() bool

func (*CollectionOfAttributes) InspectAndCollectAttributes

func (a *CollectionOfAttributes) InspectAndCollectAttributes(object interface{}, extraOptions ...interface{})

func (*CollectionOfAttributes) PointersToAttributes

func (a *CollectionOfAttributes) PointersToAttributes() (pointerList []interface{})

func (*CollectionOfAttributes) PointersToAttributesFromColumnNames

func (a *CollectionOfAttributes) PointersToAttributesFromColumnNames(columnNames ...string) (pointerList []interface{})

func (*CollectionOfAttributes) RealColName

func (a *CollectionOfAttributes) RealColName(colName string) (string, error)

func (*CollectionOfAttributes) SetDefaultValues

func (a *CollectionOfAttributes) SetDefaultValues() error

type TablePkFk

type TablePkFk struct {
	TableParent string
	TableChild  string
	Pk          []string
	Fk          []string
}

func NewTablePkFk

func NewTablePkFk(tableParent, tableChild string, field reflect.StructField) TablePkFk

Jump to

Keyboard shortcuts

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