create

package
v0.0.0-...-145a3cf Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STableType = iota + 1
	CommonTableType
)
View Source
const (
	TimestampType = "TIMESTAMP"
	IntType       = "INT"
	BigIntType    = "BIGINT"
	FloatType     = "FLOAT"
	DoubleType    = "DOUBLE"
	BinaryType    = "BINARY"
	SmallIntType  = "SMALLINT"
	TinyIntType   = "TINYINT"
	BoolType      = "BOOL"
	NCharType     = "NCHAR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name       string
	ColumnType string
	Length     uint64
}

type CreateTable

type CreateTable struct {
	// contains filtered or unexported fields
}

func NewCreateTableClause

func NewCreateTableClause(tables []*Table) CreateTable

NewCreateTableClause Create table clause

func (CreateTable) AddTables

func (c CreateTable) AddTables(tables ...*Table) CreateTable

AddTables Add tables to clause

func (CreateTable) Build

func (c CreateTable) Build(builder clause.Builder)

func (CreateTable) MergeClause

func (c CreateTable) MergeClause(clause *clause.Clause)

MergeClause merge CREATE TABLE by clauses

func (CreateTable) Name

func (CreateTable) Name() string

type Table

type Table struct {
	TableType   int
	Table       string
	IfNotExists bool
	STable      string
	Tags        map[string]interface{}
	Column      []*Column
	TagColumn   []*Column
}

func NewSTable

func NewSTable(name string, ifNotExists bool, column []*Column, tagColumn []*Column) *Table

NewSTable Create new sTable

func NewTable

func NewTable(name string, ifNotExist bool, column []*Column, Stable string, tags map[string]interface{}) *Table

NewTable Create new common table

Jump to

Keyboard shortcuts

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