Documentation ¶
Index ¶
- Constants
- type ActionStatement
- type EntityStatement
- type Expression
- type ExpressionStatement
- type ExpressionType
- type Identifier
- type InfixExpression
- type Node
- type Operator
- type PrefixExpression
- type RelationStatement
- type RelationTypeStatement
- type RelationTypeStatements
- type Schema
- func (sch *Schema) GetRelationReferenceIfExist(name string) ([]RelationTypeStatement, bool)
- func (sch *Schema) IsEntityReferenceExist(name string) bool
- func (sch *Schema) IsRelationReferenceExist(name string) bool
- func (sch *Schema) SetEntityReferences(r map[string]struct{})
- func (sch *Schema) SetRelationReferences(r map[string][]RelationTypeStatement)
- func (sch *Schema) ValidateReferences() error
- type Statement
Constants ¶
View Source
const ( IDENTIFIER ExpressionType = "identifier" PREFIX ExpressionType = "prefix" INFLIX ExpressionType = "inflix" AND Operator = "and" OR Operator = "or" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionStatement ¶
type ActionStatement struct { Token token.Token // token.ACTION Name token.Token // token.IDENT ExpressionStatement Statement }
ActionStatement -
func (*ActionStatement) TokenLiteral ¶
func (ls *ActionStatement) TokenLiteral() string
TokenLiteral -
type EntityStatement ¶
type EntityStatement struct { Token token.Token // token.ENTITY Name token.Token // token.IDENT RelationStatements []Statement ActionStatements []Statement Option token.Token // token.OPTION }
EntityStatement -
func (*EntityStatement) TokenLiteral ¶
func (ls *EntityStatement) TokenLiteral() string
TokenLiteral -
type Expression ¶
type Expression interface { Node IsInfix() bool GetType() ExpressionType GetValue() string // contains filtered or unexported methods }
Expression -
type ExpressionStatement ¶
type ExpressionStatement struct {
Expression Expression
}
ExpressionStatement struct
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
TokenLiteral function on ExpressionStatement
type ExpressionType ¶
type ExpressionType string
type Identifier ¶
Identifier -
type InfixExpression ¶
type InfixExpression struct { Token token.Token // The operator token, e.g. and, or Left Expression Operator Operator Right Expression }
InfixExpression -
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
TokenLiteral -
type PrefixExpression ¶
PrefixExpression -
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
TokenLiteral -
type RelationStatement ¶
type RelationStatement struct { Token token.Token // token.RELATION Name token.Token // token.IDENT RelationTypes []Statement Option token.Token // token.OPTION }
RelationStatement -
func (*RelationStatement) TokenLiteral ¶
func (ls *RelationStatement) TokenLiteral() string
TokenLiteral -
type RelationTypeStatement ¶
type RelationTypeStatement struct { Sign token.Token // token.sign Token token.Token // token.IDENT }
RelationTypeStatement -
func (*RelationTypeStatement) IsEntityReference ¶
func (ls *RelationTypeStatement) IsEntityReference() bool
IsEntityReference -
func (*RelationTypeStatement) TokenLiteral ¶
func (ls *RelationTypeStatement) TokenLiteral() string
TokenLiteral -
type RelationTypeStatements ¶
type RelationTypeStatements []RelationTypeStatement
RelationTypeStatements -
func (RelationTypeStatements) GetEntityReference ¶
func (st RelationTypeStatements) GetEntityReference() string
GetEntityReference -
type Schema ¶
type Schema struct { Statements []Statement // contains filtered or unexported fields }
Schema -
func (*Schema) GetRelationReferenceIfExist ¶
func (sch *Schema) GetRelationReferenceIfExist(name string) ([]RelationTypeStatement, bool)
GetRelationReferenceIfExist -
func (*Schema) IsEntityReferenceExist ¶
IsEntityReferenceExist -
func (*Schema) IsRelationReferenceExist ¶
IsRelationReferenceExist -
func (*Schema) SetEntityReferences ¶
SetEntityReferences -
func (*Schema) SetRelationReferences ¶
func (sch *Schema) SetRelationReferences(r map[string][]RelationTypeStatement)
SetRelationReferences -
func (*Schema) ValidateReferences ¶
ValidateReferences -
Click to show internal directories.
Click to hide internal directories.