Documentation ¶
Overview ¶
ansi package is keywords, datatyp, schema of ansi sql
Index ¶
- Constants
- type DbColumn
- type DbFunction
- type DbParameter
- type DbTable
- type DbType
- func (t DbType) HasLength() bool
- func (t DbType) HasPrecisionAndScale() bool
- func (t DbType) IsBoolean() bool
- func (t DbType) IsDateTime() bool
- func (t DbType) IsFloat() bool
- func (t DbType) IsInteger() bool
- func (t DbType) IsNumeric() bool
- func (t DbType) IsString() bool
- func (t DbType) String() string
- type Dir
- type Schemaer
Constants ¶
View Source
const ( Split = "." StatementSplit = ";" WildcardAll = "*" WildcardAny = "%" WildcardOne = "_" Blank = " " Comma = "," LineBreak = "\n" Select = "SELECT" Top = "TOP" Distinct = "DISTINCT" From = "FROM" Where = "WHERE" GroupBy = "GROUP BY" Having = "HAVING" OrderBy = "ORDER BY" Asc = "ASC" Desc = "DESC" Limit = "LIMIT" Insert = "INSERT" InsertInto = "INSERT INTO" Values = "VALUES" Update = "UPDATE" Set = "SET" Delete = "DELETE" Output = "OUTPUT" Using = "USING" Join = "JOIN" As = "AS" On = "ON" CrossJoin = "CROSS JOIN" FullJoin = "FULL JOIN" InnerJoin = "INNER JOIN" OuterJoin = "OUTER JOIN" LeftJoin = "LEFT JOIN" RightJoin = "RIGHT JOIN" And = "AND" Or = "OR" OpenParentheses = "(" CloseParentheses = ")" Null = "NULL" IsNull = "IS NULL" IsNotNull = "IS NOT NULL" Is = "IS" IsNot = "IS NOT" LessThan = "<" LessOrEquals = "<=" GreaterThan = ">" GreaterOrEquals = ">=" Equals = "=" NotEquals = "<>" Between = "BETWEEN" Like = "LIKE" NotLike = "NOT LIKE" In = "IN" NotIn = "NOT IN" All = "ALL" Some = "SOME" Any = "ANY" Exists = "EXISTS" NotExists = "NOT EXISTS" Count = "COUNT" Sum = "SUM" Avg = "AVG" Min = "MIN" Max = "MAX" BeginTran = "BEGIN TRAN" Commit = "COMMIT" Rollback = "ROLLBACK" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbColumn ¶
type DbColumn struct { // Name is column name Name string // Position is position in table Position int // DbType is data type of this column DbType DbType // NativeType is native data type NativeType string // Precision Precision int // Scale Scale int // Size Size int // IsNullable IsNullable bool // IsAutoIncrement IsAutoIncrement bool // IsReadOnly IsReadOnly bool // IsPrimaryKey IsPrimaryKey bool }
DbColumn is schema of column
type DbFunction ¶
type DbFunction struct { // Name is name of procedure Name string // Catalog Catalog string // Schema Schema string // Parameters is parameters of this procedure Parameters []DbParameter }
DbFunction is schema of procedure / function
func NewFunction ¶
func NewFunction() *DbFunction
func (*DbFunction) String ¶
func (f *DbFunction) String() string
type DbParameter ¶
type DbParameter struct { // Name Name string // Position is position in procedure Position int // DbType is data type of parameter DbType DbType // NativeType is native data type NativeType string // Dir is parameter direction Dir Dir // Precision Precision int // Scale Scale int // Size Size int }
DbParameter is schema of procedure parameter
type DbTable ¶
type DbTable struct { // Name is table name Name string // Catalog is catalog name Catalog string // Schema is schema name Schema string // Type is table,view,... Type string // Columns is columns of this table Columns []DbColumn }
DbTable is schema of table
type DbType ¶
type DbType int
DbType is data type of sql engine
func (DbType) HasPrecisionAndScale ¶
HasPrecisionAndScale return true if t is Float,Numeric
func (DbType) IsDateTime ¶
IsDateTime return true if t is Date,DateTime
Click to show internal directories.
Click to hide internal directories.