Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BinaryType ¶
func (*BinaryType) Kind ¶
func (*BinaryType) Kind() string
func (*BinaryType) ProtobufKind ¶
func (*BinaryType) ProtobufKind() string
type BitType ¶
func (*BitType) ProtobufKind ¶
type EnumType ¶
func (*EnumType) ProtobufKind ¶
type Field ¶
type Field struct {
Name string `json:"name,omitempty"`
Type Type `json:"type,omitempty"`
Nullable bool `json:"nullable,omitempty"`
Optional bool `json:"optional,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
Tag string `json:"tag,omitempty"`
Comment string `json:"comment,omitempty"`
Alias string `json:"alias,omitempty"`
Sortable bool `json:"sortable,omitempty"`
Filterable bool `json:"filterable,omitempty"`
ForeignKey bool `json:"foreignKey,omitempty"`
PrimaryKey bool `json:"primaryKey,omitempty"`
Index bool `json:"index,omitempty"`
Unique bool `json:"unique,omitempty"`
AutoIncrement bool `json:"autoIncrement,omitempty"`
OnUpdate bool `json:"onUpdate,omitempty"`
Remote bool `json:"remote,omitempty"`
Rel *Relation `json:"rel,omitempty"`
Ops []Op `json:"ops,omitempty"`
Table *Table `json:"table,omitempty"`
Attrs []*Attribute `json:"attrs,omitempty"`
}
Field represents a Field definition.
func (*Field) RelBelongsTo ¶
RelBelongsTo returns true if the relation is belongsto
func (*Field) RelHasMany ¶
RelMany returns true if the relation is many
func (*Field) RelManyToMany ¶
RelManyToMany returns true if the relation is many to many
type FloatType ¶
func (*FloatType) ProtobufKind ¶
type IntegerType ¶
func (*IntegerType) Kind ¶
func (i *IntegerType) Kind() string
func (*IntegerType) ProtobufKind ¶
func (i *IntegerType) ProtobufKind() string
type ObjectType ¶
func (*ObjectType) Kind ¶
func (o *ObjectType) Kind() string
func (*ObjectType) ProtobufKind ¶
func (o *ObjectType) ProtobufKind() string
type Relation ¶
type Relation struct {
Type RelType `json:"type,omitempty"`
Field *Field `json:"field,omitempty"`
RefTable *Table `json:"ref_table,omitempty"`
RefField *Field `json:"ref_field,omitempty"`
JoinTable *JoinTable `json:"join_table,omitempty"`
Inverse bool `json:"inverse,omitempty"`
Attrs []*Attribute `json:"attrs,omitempty"`
}
Relation represents a Relation definition.
type Schema ¶
Schema represents an schema definition.
func (*Schema) RemoveTable ¶
RemoveTable removes the table with the given name.
type SpatialType ¶
type SpatialType struct {
Name string
}
func (*SpatialType) Kind ¶
func (s *SpatialType) Kind() string
func (*SpatialType) ProtobufKind ¶
func (s *SpatialType) ProtobufKind() string
type StringType ¶
func (*StringType) Kind ¶
func (*StringType) Kind() string
func (*StringType) ProtobufKind ¶
func (*StringType) ProtobufKind() string
type Table ¶
type Table struct {
Name string
ID *Field
JoinTable bool
Schema *Schema
// contains filtered or unexported fields
}
Table represents a table definition.
func (*Table) FilterFields ¶
FilterFields returns the fields that is filterable.
func (*Table) HasFilterField ¶
HasFilterField returns true if any field is filterable
func (*Table) RemoveField ¶
RemoveField removes the field with the given name.
type TimeType ¶
func (*TimeType) ProtobufKind ¶
Click to show internal directories.
Click to hide internal directories.