types

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexType = iota + 1
	UniqueType
)

索引类型

View Source
const (
	UNKNOW_TYPE = iota
	TEXT_TYPE
	BLOB_TYPE
	TIME_TYPE
	NUMERIC_TYPE
	ARRAY_TYPE
)
View Source
const (
	Bit       = "BIT"
	TinyInt   = "TINYINT"
	SmallInt  = "SMALLINT"
	MediumInt = "MEDIUMINT"
	Int       = dbutil.Int
	Integer   = "INTEGER"
	BigInt    = dbutil.BigInt

	Enum = "ENUM"
	Set  = "SET"

	Char             = "CHAR"
	Varchar          = dbutil.Varchar
	NChar            = "NCHAR"
	NVarchar         = "NVARCHAR"
	TinyText         = "TINYTEXT"
	Text             = "TEXT"
	NText            = "NTEXT"
	Clob             = "CLOB"
	MediumText       = "MEDIUMTEXT"
	LongText         = "LONGTEXT"
	Uuid             = "UUID"
	UniqueIdentifier = "UNIQUEIDENTIFIER"
	SysName          = "SYSNAME"

	Date          = dbutil.Date
	DateTime      = dbutil.DateTime
	SmallDateTime = "SMALLDATETIME"
	Time          = dbutil.Time
	TimeStamp     = dbutil.TimeStamp
	TimeStampz    = dbutil.TimeStampz
	Year          = "YEAR"

	Decimal    = "DECIMAL"
	Numeric    = "NUMERIC"
	Money      = "MONEY"
	SmallMoney = "SMALLMONEY"

	Real   = "REAL"
	Float  = "FLOAT"
	Double = "DOUBLE"

	Binary     = "BINARY"
	VarBinary  = "VARBINARY"
	TinyBlob   = "TINYBLOB"
	Blob       = "BLOB"
	MediumBlob = "MEDIUMBLOB"
	LongBlob   = "LONGBLOB"
	Bytea      = "BYTEA"

	Bool    = "BOOL"
	Boolean = "BOOLEAN"

	Serial    = "SERIAL"
	BigSerial = "BIGSERIAL"

	Json  = "JSON"
	Jsonb = "JSONB"

	XML   = "XML"
	Array = "ARRAY"
)

Variables

View Source
var (
	BlobType = reflect.TypeOf((*dbutil.BlobReadWriter)(nil)).Elem()
)

Functions

This section is empty.

Types

type SQLType

type SQLType struct {
	Name    string
	Length  int
	Length2 int
}

func Type2SQLType

func Type2SQLType(t reflect.Type) (st *SQLType)

func (*SQLType) IsBlob

func (s *SQLType) IsBlob() bool

func (*SQLType) IsText

func (s *SQLType) IsText() bool

func (*SQLType) IsTime

func (s *SQLType) IsTime() bool

func (*SQLType) IsType

func (s *SQLType) IsType(st int) bool

Jump to

Keyboard shortcuts

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