Documentation ¶
Index ¶
- func BaseTable(object Base) (string, error)
- func HashObject(object Base) (uint64, error)
- func PreInsertion(object Base) error
- func SetId(object Base, newIdValue interface{}) error
- type Base
- type BaseIdentifier
- type CompositeKey
- type CustomTabler
- type DatabaseFuncIDGenerator
- type DatabaseIDGenerator
- type DatabaseManagedID
- type IDColumner
- type IDGenerator
- type LiteralStatement
- type PostInserter
- type PreInserter
- type Relationship
- type Relationshipable
- type Saveable
- type TraditionalID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashObject ¶
func PreInsertion ¶
Types ¶
type BaseIdentifier ¶ added in v0.1.2
func GetId ¶ added in v0.1.2
func GetId(object Base) []BaseIdentifier
func InitializeId ¶ added in v0.1.2
func InitializeId(object Base) ([]BaseIdentifier, error)
type CompositeKey ¶ added in v0.1.2
type CompositeKey interface {
CompositeKey() []string
}
type CustomTabler ¶
type CustomTabler interface {
TableName() string
}
type DatabaseFuncIDGenerator ¶
type DatabaseFuncIDGenerator interface {
DatabaseIDGenerationFunc() LiteralStatement
}
type DatabaseIDGenerator ¶
type DatabaseIDGenerator interface {
DatabaseGeneratedID()
}
type DatabaseManagedID ¶
type DatabaseManagedID struct{}
func (DatabaseManagedID) DatabaseGeneratedID ¶
func (DatabaseManagedID) DatabaseGeneratedID()
type IDColumner ¶
type IDColumner interface {
IDColumn() string
}
type IDGenerator ¶
type IDGenerator interface {
NewID() interface{}
}
type LiteralStatement ¶
type LiteralStatement string
LiteralStatement is a string that will be directly inserted into a statement. Use great caution when using this as it will be vunerable to injection if not used properly.
type PostInserter ¶
type PostInserter interface {
PostInsertActions() error
}
type PreInserter ¶
type PreInserter interface {
PreInsertActions() error
}
type Relationship ¶ added in v0.1.2
type Relationship struct {
// contains filtered or unexported fields
}
Relationship is a representation of how two objects join together.
func MustRelationship ¶ added in v0.1.2
func MustRelationship( self Base, selfColumn string, target Base, targetColumn string, ) Relationship
func NewRelationship ¶ added in v0.1.2
func (Relationship) Columns ¶ added in v0.1.2
func (self Relationship) Columns() (string, string)
func (Relationship) Invert ¶ added in v0.1.2
func (self Relationship) Invert() *Relationship
Invert takes the relationship and swaps the self with the target. This essentially has the effect of changing:
foo.bar=baz.fizz
Into:
baz.fizz=foo.bar
func (Relationship) Tables ¶ added in v0.1.2
func (self Relationship) Tables() (string, string)
type Relationshipable ¶ added in v0.1.2
type Relationshipable interface {
Relationships() []Relationship
}
Relationshipable is a type that has at least on relationship.
type TraditionalID ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.