Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ModeDefault is a default mode. // Modes allows to express context in what column/property is used in generated Go code. // Main purpose of it is to define clear contract in what contexts each column/property can be generated. ModeDefault = iota // ModeMandatory is used when property is mandatory. // It could be the case for insert statements when property corresponding column is not nullable. ModeMandatory // ModeOptional is mode used when property is optional in given context or in general. // Example: // Insert statement of optional property. // Partial update statement of mandatory property. ModeOptional // ModeCriteria indicates that property is used in context of querying. // For example during FindIter generation. ModeCriteria )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltinType ¶
BuiltinType is simple alias for types.BasicKind.
func (BuiltinType) Fingerprint ¶
func (bt BuiltinType) Fingerprint() string
Fingerprint implements pqt Type interface.
func (BuiltinType) String ¶
func (bt BuiltinType) String() string
String implements pqt Type interface.
type CustomType ¶
type CustomType struct {
// contains filtered or unexported fields
}
CustomType allows to create custom types from already existing types.
func TypeCustom ¶
func TypeCustom(m, o, c interface{}) CustomType
TypeCustom allocates new CustomType using given arguments for each context: mandatory, optional and criteria.
func (CustomType) Fingerprint ¶
func (ct CustomType) Fingerprint() string
Fingerprint implements Type interface.
func (CustomType) String ¶
func (ct CustomType) String() string
String implements Stringer interface.
func (CustomType) TypeOf ¶ added in v0.11.0
func (ct CustomType) TypeOf(m int32) reflect.Type
TypeOf returns Go type of underlying pqt Type for given mode.
func (CustomType) ValueOf ¶ added in v0.11.0
func (ct CustomType) ValueOf(m int32) interface{}
ValueOf returns type for given mode.
Click to show internal directories.
Click to hide internal directories.