model

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: BSD-3-Clause Imports: 10 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, onlyPKs bool) string

func (*Model) FuncArgsWithPrefix added in v0.3.6

func (m *Model) FuncArgsWithPrefix(prefix string, pk PrimaryKey, onlyPKs bool) string

type PrimaryKey

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

func (*PrimaryKey) FuncName added in v0.3.6

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

func (*PrimaryKey) Keys

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

func (*PrimaryKey) String added in v0.3.6

func (pk *PrimaryKey) String(keyPrefix string, onlyPKs bool, lowerCamel bool) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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