Documentation ¶
Index ¶
- type Directive
- type Entities
- type Entity
- func (e Entity) DatabaseFieldName() string
- func (e Entity) GormDirectiveValue() string
- func (e Entity) GqlType(suffix string) string
- func (e Entity) GqlTypeName() string
- func (e Entity) GqlTypeObj() *Object
- func (e Entity) GqlTypePrimaryDataType() string
- func (e Entity) HasGormDirective() bool
- func (e *Entity) HasInputTypeDirective() bool
- func (e *Entity) HasInputTypeTagsDirective() bool
- func (e Entity) HasMany2ManyDirective() bool
- func (e Entity) HasNoMutationDirective() bool
- func (e Entity) Ignore() bool
- func (e *Entity) InputTypeDirective() []string
- func (e *Entity) InputTypeDirectiveGql() string
- func (e *Entity) InputTypeTagsDirective() []string
- func (e *Entity) IsArray() bool
- func (e *Entity) IsArrayElementRequired() bool
- func (e *Entity) IsEnum() bool
- func (e *Entity) IsIndex() bool
- func (e *Entity) IsPrimary() bool
- func (e *Entity) IsPrimitive() bool
- func (e *Entity) IsScalar() bool
- func (e Entity) IsUnion() bool
- func (e Entity) Many2ManyDirectiveTable() string
- func (e Entity) Name() string
- func (e *Entity) OrderAble() bool
- func (e *Entity) Required() bool
- func (e Entity) RequiredChar() string
- func (e *Entity) WhereAble() bool
- type Object
- func (o Object) ForeignNameKeyName(fieldName string) string
- func (o Object) GetOrder() int64
- func (o Object) HasSqlDirective() bool
- func (o Object) InputEntities() Entities
- func (o Object) InputFilterEntities() []Entity
- func (o Object) InputTypeDirective() []string
- func (o Object) InputTypeDirectiveGql() string
- func (o Object) Many2ManyRefEntities() map[string]Entity
- func (o Object) Name() string
- func (o Object) OrderAbleEntities() []Entity
- func (o Object) PatchEntities() Entities
- func (o Object) PrimaryKeyField() *Entity
- func (o Object) PrimaryKeys() []Entity
- func (o Object) SQLDirective() *SQLDirective
- func (o Object) SQLDirectiveValues(queryOrMutation QueryMutation, name string) []string
- func (o Object) WhereAbleEntities() []Entity
- type QueryMutation
- type SQLDirective
- type SQLDirectiveHandler
- type SQLDirectiveMutation
- type SQLDirectiveQuery
- type SqlBuilderHelper
- type SqlBuilderList
- type SqlCreateExtension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directive ¶
type Directive string
const ( DirectiveSQL Directive = "SQL" DirectiveSQLPrimary Directive = "SQL_PRIMARY" DirectiveSQLIndex Directive = "SQL_INDEX" DirectiveSQLGorm Directive = "SQL_GORM" DirectiveNoMutation Directive = "SQL_SKIP_MUTATION" DirectiveSQLInputTypeTags Directive = "SQL_INPUTTYPE_TAGS" DirectiveSQLInputTypeDirective Directive = "SQL_INPUTTYPE_DIRECTIVE" DirectiveSQLArgumentQuery = "query" DirectiveSQLArgumentMutation = "mutation" DirectiveSQLArgumentOrder = "order" )
func (Directive) InternalName ¶ added in v0.2.0
type Entity ¶
type Entity struct { BuiltIn bool Raw *ast.FieldDefinition RawObject *ast.Definition TypeObject *Object }
func (Entity) DatabaseFieldName ¶ added in v0.0.9
func (Entity) GormDirectiveValue ¶
func (Entity) GqlTypeName ¶
func (Entity) GqlTypeObj ¶
func (Entity) GqlTypePrimaryDataType ¶
func (Entity) HasGormDirective ¶
func (*Entity) HasInputTypeDirective ¶ added in v0.2.0
func (*Entity) HasInputTypeTagsDirective ¶ added in v0.2.0
func (Entity) HasMany2ManyDirective ¶
func (Entity) HasNoMutationDirective ¶ added in v0.0.26
func (*Entity) InputTypeDirective ¶ added in v0.2.0
func (*Entity) InputTypeDirectiveGql ¶ added in v0.2.0
returns the Directive string to extends to template
func (*Entity) InputTypeTagsDirective ¶ added in v0.2.0
func (*Entity) IsArrayElementRequired ¶
func (*Entity) IsPrimitive ¶ added in v0.0.10
func (Entity) Many2ManyDirectiveTable ¶
func (Entity) RequiredChar ¶
type Object ¶
type Object struct { Entities Entities Raw *ast.Definition }
func NewObject ¶
func NewObject(raw *ast.Definition) Object
func (Object) ForeignNameKeyName ¶
func (Object) HasSqlDirective ¶
func (Object) InputEntities ¶ added in v0.0.10
func (Object) InputFilterEntities ¶ added in v0.0.17
func (Object) InputTypeDirective ¶ added in v0.2.0
func (Object) InputTypeDirectiveGql ¶ added in v0.2.0
returns the Directive string to extends to template
func (Object) Many2ManyRefEntities ¶
func (Object) OrderAbleEntities ¶
func (Object) PatchEntities ¶ added in v0.0.10
func (Object) PrimaryKeyField ¶
func (Object) PrimaryKeys ¶
func (Object) SQLDirective ¶
func (o Object) SQLDirective() *SQLDirective
func (Object) SQLDirectiveValues ¶
func (o Object) SQLDirectiveValues(queryOrMutation QueryMutation, name string) []string
func (Object) WhereAbleEntities ¶
type QueryMutation ¶
type QueryMutation = string
const ( Query QueryMutation = "query" Mutation QueryMutation = "mutation" )
type SQLDirective ¶
type SQLDirective struct { Query SQLDirectiveQuery Mutation SQLDirectiveMutation Order int64 }
func (*SQLDirective) HasMutation ¶
func (sd *SQLDirective) HasMutation() bool
func (*SQLDirective) HasQueries ¶
func (sd *SQLDirective) HasQueries() bool
type SQLDirectiveHandler ¶
type SQLDirectiveHandler struct {
DirectiveExt []string
}
type SQLDirectiveMutation ¶
type SQLDirectiveMutation struct { SQLDirectiveHandler Add SqlCreateExtension Update SqlCreateExtension Delete SqlCreateExtension }
func (*SQLDirectiveMutation) GetDirectiveExt ¶
func (s *SQLDirectiveMutation) GetDirectiveExt(name string) []string
type SQLDirectiveQuery ¶
type SQLDirectiveQuery struct { SQLDirectiveHandler Get SqlCreateExtension Query SqlCreateExtension }
func (*SQLDirectiveQuery) GetDirectiveExt ¶
func (s *SQLDirectiveQuery) GetDirectiveExt(name string) []string
type SqlBuilderHelper ¶
type SqlBuilderHelper struct {
List SqlBuilderList
}
func NewSqlBuilderHelper ¶
func NewSqlBuilderHelper() SqlBuilderHelper
type SqlBuilderList ¶
func (SqlBuilderList) Enums ¶ added in v0.1.4
func (sbh SqlBuilderList) Enums() map[string]Object
func (SqlBuilderList) Objects ¶
func (sbh SqlBuilderList) Objects() map[string]Object
func (SqlBuilderList) PrimaryEntityOfObject ¶
func (sbh SqlBuilderList) PrimaryEntityOfObject(objectName string) *Entity
type SqlCreateExtension ¶
Click to show internal directories.
Click to hide internal directories.