Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeNameString = "string" TypeNameBytes = "bytes" TypeNameInt = "int" TypeNameFloat = "float" TypeNameBool = "bool" TypeNameDateTime = "datetime" )
general ccl type names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldDefinition ¶
type FieldDefinition struct { // OwnedBy is a reference to the model that owns the field. OwnedBy *ModelDefinition // Name is the name of the field. Name string // Type is the type of the field. Type string // ExtraOperators is a string that contains extra operators for the field. ExtraOperators string }
FieldDefinition is a struct that represents a field definition.
func (*FieldDefinition) IsArray ¶
func (f *FieldDefinition) IsArray() bool
type ModelDefinition ¶
type ModelDefinition struct { // ModelId is the unique identifier of the model. ModelId int64 // Name is the name of the model. Name string // Fields is an array of field definitions. Fields []*FieldDefinition }
ModelDefinition is a struct that represents a model definition.
func (*ModelDefinition) DoesAliasMatch ¶
func (m *ModelDefinition) DoesAliasMatch(targetAlias string) bool
func (*ModelDefinition) GetFieldByName ¶
func (m *ModelDefinition) GetFieldByName(name string) *FieldDefinition
func (*ModelDefinition) String ¶
func (m *ModelDefinition) String() string
type SourceCodeDefinition ¶
type SourceCodeDefinition struct { // Models is an array of model definitions. Models []*ModelDefinition // contains filtered or unexported fields }
SourceCodeDefinition is a struct that represents a source code definition and all the information about a cll source file. This struct is NOT thread-safe.
func (*SourceCodeDefinition) GetModelByName ¶
func (d *SourceCodeDefinition) GetModelByName(name string) *ModelDefinition
GetModelByName returns the model definition by the given name.
func (*SourceCodeDefinition) GetNextModelId ¶
func (d *SourceCodeDefinition) GetNextModelId() int64
GetNextModelId returns the next model ID.
func (*SourceCodeDefinition) IsCustomType ¶
func (d *SourceCodeDefinition) IsCustomType(typeName string) bool
Click to show internal directories.
Click to hide internal directories.