gen

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDB

func GenDB(version uint, objectsInfo []sqlg.ObjectInfo, typesImport string, additionalImports []string)

Types

type DDLData

type DDLData struct {
	Version   uint
	DBType    string
	TableDefs []DDLDataTable
	IndexDefs []string
}

type DDLDataIndexes

type DDLDataIndexes struct {
	DDL string
}

type DDLDataTable

type DDLDataTable struct {
	Table          string
	ColumnDefs     []string
	ConstraintDefs []string
}

type DMLData

type DMLData struct {
	DBType            string
	TableDefs         []DMLDataTable
	RawInsertSuffix   string
	TypesImport       string
	AdditionalImports []string
	HasJSON           bool
}

type DMLDataTable

type DMLDataTable struct {
	Table                string
	LowerTable           string
	ObjectName           string
	LowerObjectName      string
	LowerCamelObjectName string
	InsertColumns        []string
	FuncPrefix           string
	InsertFuncParams     []string
	UpdateFuncParams     []string
	InsertVarNames       []string
	UpdateVarNames       []string
	InsertValues         []string
	UpdateSets           []string
	RawFuncParams        []string
	RawInsertColumns     []string
	RawInsertValues      []string
	RawInsertVarNames    []string
	JSONValues           []DMLDataTableJSON
}

type DMLDataTableJSON

type DMLDataTableJSON struct {
	VarName   string
	Field     string
	FullField string
}

type DMLDataTableMapField

type DMLDataTableMapField struct {
	ColName   string
	Field     string
	FieldType string
	JSON      bool
}

type DMLDataTableSequence

type DMLDataTableSequence struct {
	Name    string
	ColName string
	Field   string
}

type DMLGenericData

type DMLGenericData struct {
	TableDefs         []DMLGenericDataTable
	TypesImport       string
	AdditionalImports []string
	HasJSON           bool
	HasSequences      bool
}

type DMLGenericDataTable

type DMLGenericDataTable struct {
	Table                string
	ObjectName           string
	LowerObjectName      string
	LowerCamelObjectName string
	SelectColumns        []string
	ScanFields           []string
	MapFields            []DMLDataTableMapField
	FuncPrefix           string
	JSONValues           []DMLDataTableJSON
	Sequences            []DMLDataTableSequence
}

type MethodsData

type MethodsData struct {
	Version   uint
	Sequences []string
}

Jump to

Keyboard shortcuts

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