Documentation ¶
Index ¶
- Variables
- type ConditionArg
- type Create
- type Delete
- type Field
- type Get
- type ModelField
- type ModelStruct
- func (s *ModelStruct) CreateStructName() string
- func (s *ModelStruct) InsertableDynamicFields() (fields []*ModelField)
- func (s *ModelStruct) InsertableOptionalFields() (fields []*ModelField)
- func (s *ModelStruct) InsertableRequiredFields() (fields []*ModelField)
- func (s *ModelStruct) InsertableStaticFields() (fields []*ModelField)
- func (s *ModelStruct) UpdatableFields() (fields []*ModelField)
- func (s *ModelStruct) UpdateStructName() string
- type Options
- type RawCreate
- type Renderer
- type Struct
- type Tag
- type UnderlyingType
- type Update
- type Var
- func ArgFromField(field *ir.Field) *Var
- func GetRowFromIR(ir_read *ir.Read) *Var
- func MakeContinuationVar(ir_read *ir.Read) *Var
- func MakeResultVar(selectables []ir.Selectable) *Var
- func StructVar(name string, typ string, vars []*Var) *Var
- func VarFromField(field *ir.Field) *Var
- func VarFromModel(model *ir.Model) *Var
- func VarFromSelectable(selectable ir.Selectable, full_name bool) (v *Var)
- func VarsFromFields(fields []*ir.Field) (vars []*Var)
- func VarsFromSelectables(selectables []ir.Selectable) (vars []*Var)
- func (v *Var) AddrOf() string
- func (v *Var) Arg() string
- func (v *Var) Copy() *Var
- func (v *Var) Declare() string
- func (v *Var) Flatten() (flattened []*Var)
- func (v *Var) Init() string
- func (v *Var) InitNew() string
- func (v *Var) IsStruct() bool
- func (v *Var) Param() string
- func (v *Var) SliceOf() string
- func (v *Var) Value() string
- func (v *Var) Zero() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errors.NewClass("golang")
Functions ¶
This section is empty.
Types ¶
type ConditionArg ¶
type ConditionArg struct { Var *Var IsCondition bool Condition int Underlying UnderlyingType }
func ConditionArgsFromWheres ¶
func ConditionArgsFromWheres(wheres []*ir.Where) (out []ConditionArg)
type Create ¶
type Delete ¶
type Delete struct { Args []ConditionArg Info sqlembedgo.Info Suffix string Result *Var }
type Get ¶
type Get struct { Args []ConditionArg Info sqlembedgo.Info Suffix string Row *Var FirstInfo sqlembedgo.Info Continuation *Var SupportsTupleComparison bool }
type ModelField ¶
type ModelField struct { Name string ModelName string Type string Underlying UnderlyingType CtorValue string MutateFn string Column string Nullable bool Default string Insertable bool AutoInsert bool Updatable bool AutoUpdate bool TakeAddr bool }
func ModelFieldFromIR ¶
func ModelFieldFromIR(field *ir.Field) *ModelField
func ModelFieldsFromIR ¶
func ModelFieldsFromIR(fields []*ir.Field) (out []*ModelField)
func (*ModelField) ArgType ¶
func (f *ModelField) ArgType() string
func (*ModelField) InsertableDynamic ¶
func (f *ModelField) InsertableDynamic() bool
func (*ModelField) InsertableOptional ¶
func (f *ModelField) InsertableOptional() bool
func (*ModelField) InsertableRequired ¶
func (f *ModelField) InsertableRequired() bool
func (*ModelField) InsertableStatic ¶
func (f *ModelField) InsertableStatic() bool
func (*ModelField) StructName ¶
func (f *ModelField) StructName() string
type ModelStruct ¶
type ModelStruct struct { Name string Table string Fields []*ModelField }
Struct is used for generating go structures
func ModelStructFromIR ¶
func ModelStructFromIR(model *ir.Model) *ModelStruct
func ModelStructsFromIR ¶
func ModelStructsFromIR(models []*ir.Model) (out []*ModelStruct)
func (*ModelStruct) CreateStructName ¶
func (s *ModelStruct) CreateStructName() string
func (*ModelStruct) InsertableDynamicFields ¶
func (s *ModelStruct) InsertableDynamicFields() (fields []*ModelField)
func (*ModelStruct) InsertableOptionalFields ¶
func (s *ModelStruct) InsertableOptionalFields() (fields []*ModelField)
func (*ModelStruct) InsertableRequiredFields ¶
func (s *ModelStruct) InsertableRequiredFields() (fields []*ModelField)
func (*ModelStruct) InsertableStaticFields ¶
func (s *ModelStruct) InsertableStaticFields() (fields []*ModelField)
func (*ModelStruct) UpdatableFields ¶
func (s *ModelStruct) UpdatableFields() (fields []*ModelField)
func (*ModelStruct) UpdateStructName ¶
func (s *ModelStruct) UpdateStructName() string
type RawCreate ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func (*Renderer) LoadTemplate ¶
type UnderlyingType ¶
type Update ¶
type Update struct { Args []ConditionArg Info sqlembedgo.Info Suffix string Struct *ModelStruct Return *Var AutoFields []*Var NeedsNow bool }
type Var ¶
type Var struct { Name string Type string Underlying UnderlyingType ZeroVal string InitVal string Fields []*Var }
func ArgFromField ¶
func GetRowFromIR ¶
func MakeContinuationVar ¶
func MakeResultVar ¶
func MakeResultVar(selectables []ir.Selectable) *Var
func VarFromField ¶
func VarFromModel ¶
func VarFromSelectable ¶
func VarFromSelectable(selectable ir.Selectable, full_name bool) (v *Var)
func VarsFromFields ¶
func VarsFromSelectables ¶
func VarsFromSelectables(selectables []ir.Selectable) (vars []*Var)
Click to show internal directories.
Click to hide internal directories.