gen

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 11 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)

func GenDBFixtures added in v0.9.0

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

Types

type CreateFixtureColInfo added in v0.9.0

type CreateFixtureColInfo struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Nullable bool   `json:"nullable"`
}

type CreateFixtureDDL added in v0.9.0

type CreateFixtureDDL struct {
	Postgres []string `json:"postgres"`
	Sqlite3  []string `json:"sqlite3"`
}

type CreateFixtureData added in v0.9.0

type CreateFixtureData struct {
	DDL       map[string][]string      `json:"ddl"`
	Sequences []CreateFixtureSequence  `json:"sequences"`
	Tables    []CreateFixtureTableInfo `json:"tables"`
}

type CreateFixtureSequence added in v0.9.0

type CreateFixtureSequence struct {
	Name   string `json:"name"`
	Table  string `json:"table"`
	Column string `json:"column"`
}

type CreateFixtureTableInfo added in v0.9.0

type CreateFixtureTableInfo struct {
	Name    string                 `json:"name"`
	Columns []CreateFixtureColInfo `json:"columns"`
}

type DDLData

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

type DDLDataTable

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

type DDLDataTableSequence added in v0.9.0

type DDLDataTableSequence struct {
	Name      string
	TableName string
	ColName   string
}

type DDLGenericData added in v0.9.0

type DDLGenericData struct {
	Version   uint
	Sequences []DDLDataTableSequence
	Tables    []DDLGenericDataTableInfo
	Data      map[sql.Type]DDLData
}

type DDLGenericDataColInfo added in v0.9.0

type DDLGenericDataColInfo struct {
	Name     string
	Type     string
	JSON     bool
	Nullable bool
}

type DDLGenericDataTableInfo added in v0.9.0

type DDLGenericDataTableInfo struct {
	Name    string
	Columns []DDLGenericDataColInfo
}

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