model

package
Version: v0.0.0-...-b45a7ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FieldTypes = map[string]func(message json.RawMessage) field.Field{}

Functions

func CompoundFieldToPersistenceRepresentation

func CompoundFieldToPersistenceRepresentation(field domainModel.PersistenceCompoundField) sql.FieldSpec

func FieldToPersistenceRepresentation

func FieldToPersistenceRepresentation(f field.Field) sql.FieldSpec

func UnmarshalField

func UnmarshalField(raw_field json.RawMessage) field.Field

Types

type Model

type Model struct {
	Name string

	Fields ModelFieldsMap
}

func UnmarshalModel

func UnmarshalModel(b []byte) *Model

func (Model) ProduceSQLDriver

func (m Model) ProduceSQLDriver(dialect dialect.Dialect) (*ModelSQLDriver, error)

type ModelFieldsMap

type ModelFieldsMap map[string]field.Field

type ModelSQLDriver

type ModelSQLDriver struct {
	Name string

	Fields map[string]sql.FieldDriver
}

type ModelSchema

type ModelSchema struct {
	ModelSpecifications map[string]*Model
}

func (*ModelSchema) RegisterModel

func (schema *ModelSchema) RegisterModel(model *Model) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL