chstuff

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Meta2Field

func Meta2Field(meta FieldMeta) (field generator.Field)

Meta2Field translates clickhouse field metainfo into generator Field object

Types

type FieldMeta

type FieldMeta struct {
	Name           string
	Type           string
	RawType        string
	EnumData       map[string]int
	FixedStringLen int
	Decimal        struct {
		Bits      int // разрядность в битах для данного Decimal
		Precision int // количество цифр в записи числа
		Scale     int // количество цифр в дробной части
	}
	Subtype *FieldMeta
}

FieldMeta field description

func RetrieveTableMeta

func RetrieveTableMeta(conn *sql.DB, table string) (res []FieldMeta, err error)

RetrieveTableMeta retrieves clickhouse table metainformation

Jump to

Keyboard shortcuts

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