Documentation ¶
Index ¶
Constants ¶
View Source
const ( SQLTag = "sql" SQLSummaryTag = "sqlSummary" )
View Source
const CodecTag = "codec"
CodecTag codec tag
View Source
const DocumentationTag = "doc"
View Source
const HandlerTag = "handler"
HandlerTag Handler tag
View Source
const LinkOnTag = "on"
View Source
const ParameterTag = "parameter"
View Source
const PredicateTag = "predicate"
PredicateTag Predicate tag
View Source
const ValueTag = "value"
ValueTag represents default value tag
View Source
const (
ViewTag = "view"
)
Variables ¶
This section is empty.
Functions ¶
func ExcludeStateTags ¶
ExcludeStateTags exclude state tags
Types ¶
type Codec ¶
type Handler ¶
type LinkOn ¶
type LinkOn []string // [relfieldX:][ns.]relcolumnX[(includeFlag)]=[reffieldX:][ns.]refcolumnX [,[relfieldY:][ns.]relcolumnY]
LinkOn represents relation join tag
func (LinkOn) Append ¶
func (l LinkOn) Append(opts ...LinkOption) LinkOn
type LinkOption ¶
type LinkOption func(o *linkOption)
func WithRefLink ¶
func WithRefLink(field, column string) LinkOption
func WithRelLink ¶
func WithRelLink(field, column string, include *bool) LinkOption
type Parameter ¶
type Parameter struct { Name string `tag:"name,omitempty"` Kind string `tag:"kind,omitempty"` //parameter location kind In string `tag:"in,omitempty"` //parameter location name When string `tag:"when,omitempty"` //condition to evaluate Scope string `tag:"scope,omitempty"` //parameter scope ErrorCode int `tag:"errorCode,omitempty"` DataType string `tag:"dataType,omitempty"` //parameter input type With string `tag:"with,omitempty"` //optional auxiliary type name holding parameters Required bool `tag:"required,omitempty"` }
type Predicate ¶
type Tag ¶
type Tag struct { View *View SQL ViewSQL SummarySQL ViewSQLSummary Parameter *Parameter LinkOn LinkOn Predicates []*Predicate Codec *Codec Handler *Handler TypeName string Documentation string Value *string Format *format.Tag // contains filtered or unexported fields }
func ParseStateTags ¶
ParseStateTags parse state related tags
func ParseViewTags ¶
ParseViewTags parse view related tags
func (*Tag) EnsurePredicate ¶
type View ¶
type View struct { Name string Table string Parameters []string //parameter references Connector string Limit *int Match string Batch int PartitionerType string PartitionedConcurrency int }
View represent basic view tag
type ViewSQL ¶
func NewViewSQL ¶
type ViewSQLSummary ¶
type ViewSQLSummary ViewSQL
func NewViewSQLSummary ¶
func NewViewSQLSummary(sql, uri string) ViewSQLSummary
func (ViewSQLSummary) Tag ¶
func (v ViewSQLSummary) Tag() *tags.Tag
Click to show internal directories.
Click to hide internal directories.