Documentation
¶
Index ¶
- func Ref(f FieldType) ref
- func Slice(f FieldType) slice
- type Association
- type Elementer
- type Field
- type FieldOptions
- type FieldType
- type FieldValueType
- type Schema
- func (s *Schema) AddFields(fields ...Field)
- func (s *Schema) AssociationFields() []Field
- func (s *Schema) ColumnFields() []Field
- func (s *Schema) Columns() []string
- func (s *Schema) FieldNames() []string
- func (s *Schema) IgnoredFields() []Field
- func (s *Schema) ImmutableColumns() []string
- func (s *Schema) ImmutablePlaceholders() []string
- func (s *Schema) MutableColumns() []string
- func (s *Schema) MutableFieldKeys() []string
- func (s *Schema) MutableFields() []Field
- func (s *Schema) MutablePlaceholders() []string
- func (s *Schema) PrimaryKey() string
- func (s *Schema) SetClause() []string
- func (s *Schema) Type() SchemaType
- type SchemaCollection
- type SchemaFactory
- type SchemaTemplate
- type SchemaType
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Association ¶
type Field ¶
type Field struct { Name string Type FieldType Tag string Options FieldOptions }
func (Field) ColumnName ¶
func (Field) IsAssociation ¶
func (Field) IsImmutable ¶
type FieldOptions ¶
type FieldOptions struct { Immutable bool PrimaryKey bool Ignore bool // ignore fields for insert and update like fields of association. Association *Association Validators []Validator }
type FieldValueType ¶
type FieldValueType string
const ( String FieldValueType = "string" Int FieldValueType = "int" Bool FieldValueType = "bool" Byte FieldValueType = "byte" Time FieldValueType = "time.Time" UUID FieldValueType = "uuid.UUID" )
func (FieldValueType) String ¶
func (f FieldValueType) String() string
type Schema ¶
func (*Schema) AssociationFields ¶
func (*Schema) ColumnFields ¶
func (*Schema) FieldNames ¶
func (*Schema) IgnoredFields ¶
func (*Schema) ImmutableColumns ¶
func (*Schema) ImmutablePlaceholders ¶
func (*Schema) MutableColumns ¶
func (*Schema) MutableFieldKeys ¶
func (*Schema) MutableFields ¶
func (*Schema) MutablePlaceholders ¶
func (*Schema) PrimaryKey ¶
func (*Schema) Type ¶
func (s *Schema) Type() SchemaType
type SchemaCollection ¶
func (SchemaCollection) Filename ¶
func (s SchemaCollection) Filename() string
func (SchemaCollection) Gen ¶
func (s SchemaCollection) Gen() error
func (SchemaCollection) PackageURL ¶
func (s SchemaCollection) PackageURL() string
func (SchemaCollection) Render ¶
func (s SchemaCollection) Render() (string, error)
type SchemaFactory ¶
func (SchemaFactory) NewSchema ¶
func (d SchemaFactory) NewSchema(fields []Field) *Schema
type SchemaTemplate ¶
type SchemaTemplate struct { URL string Package string Schema Schema // contains filtered or unexported fields }
func (SchemaTemplate) Filename ¶
func (s SchemaTemplate) Filename() string
func (SchemaTemplate) Render ¶
func (s SchemaTemplate) Render() (string, error)
type SchemaType ¶
type SchemaType struct {
// contains filtered or unexported fields
}
func (SchemaType) String ¶
func (s SchemaType) String() string
Click to show internal directories.
Click to hide internal directories.