model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillModel

func FillModel(m *protogen.Message)

FillModel fills the in global loadedModels with parsed data

func GetModels

func GetModels() map[string]*Model

GetModels

func ResetModels

func ResetModels()

ResetModels reset the internal data

Types

type Model

type Model struct {
	Type       string
	Name       string
	Table      PrimaryKey
	Views      []PrimaryKey
	ViewParams []string
	FieldNames []string
	FieldsCql  map[string]string
	FieldsGo   map[string]string
}

func (*Model) FuncArgs added in v0.2.7

func (m *Model) FuncArgs(pk PrimaryKey) string

func (*Model) FuncArgsPKs added in v0.2.7

func (m *Model) FuncArgsPKs(pk PrimaryKey) string

type PrimaryKey

type PrimaryKey struct {
	PKs    []string
	CKs    []string
	Orders []string
}

func (*PrimaryKey) Keys

func (pk *PrimaryKey) Keys() []string

func (*PrimaryKey) Name added in v0.2.7

func (pk *PrimaryKey) Name(prefix string) string

func (*PrimaryKey) StringKeys added in v0.2.7

func (pk *PrimaryKey) StringKeys(keyPrefix string) string

func (*PrimaryKey) StringPKs added in v0.2.7

func (pk *PrimaryKey) StringPKs() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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