columns

package
v0.0.0-...-f6175e8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableCatalogCol           gnorm.StringField        = "TABLE_CATALOG"
	TableSchemaCol            gnorm.StringField        = "TABLE_SCHEMA"
	TableNameCol              gnorm.StringField        = "TABLE_NAME"
	ColumnNameCol             gnorm.StringField        = "COLUMN_NAME"
	OrdinalPositionCol        gnorm.Int64Field         = "ORDINAL_POSITION"
	ColumnDefaultCol          gnorm.SqlNullStringField = "COLUMN_DEFAULT"
	IsNullableCol             gnorm.StringField        = "IS_NULLABLE"
	DataTypeCol               gnorm.StringField        = "DATA_TYPE"
	CharacterMaximumLengthCol gnorm.SqlNullInt64Field  = "CHARACTER_MAXIMUM_LENGTH"
	CharacterOctetLengthCol   gnorm.SqlNullInt64Field  = "CHARACTER_OCTET_LENGTH"
	NumericPrecisionCol       gnorm.SqlNullInt64Field  = "NUMERIC_PRECISION"
	NumericScaleCol           gnorm.SqlNullInt64Field  = "NUMERIC_SCALE"
	DatetimePrecisionCol      gnorm.SqlNullInt64Field  = "DATETIME_PRECISION"
	CharacterSetNameCol       gnorm.SqlNullStringField = "CHARACTER_SET_NAME"
	CollationNameCol          gnorm.SqlNullStringField = "COLLATION_NAME"
	ColumnTypeCol             gnorm.StringField        = "COLUMN_TYPE"
	ColumnKeyCol              gnorm.StringField        = "COLUMN_KEY"
	ExtraCol                  gnorm.StringField        = "EXTRA"
	PrivilegesCol             gnorm.StringField        = "PRIVILEGES"
	ColumnCommentCol          gnorm.StringField        = "COLUMN_COMMENT"
	GenerationExpressionCol   gnorm.StringField        = "GENERATION_EXPRESSION"
)

Field values for every column in Columns.

Functions

This section is empty.

Types

type Row

type Row struct {
	TableCatalog           string         // TABLE_CATALOG
	TableSchema            string         // TABLE_SCHEMA
	TableName              string         // TABLE_NAME
	ColumnName             string         // COLUMN_NAME
	OrdinalPosition        int64          // ORDINAL_POSITION
	ColumnDefault          sql.NullString // COLUMN_DEFAULT
	IsNullable             string         // IS_NULLABLE
	DataType               string         // DATA_TYPE
	CharacterMaximumLength sql.NullInt64  // CHARACTER_MAXIMUM_LENGTH
	CharacterOctetLength   sql.NullInt64  // CHARACTER_OCTET_LENGTH
	NumericPrecision       sql.NullInt64  // NUMERIC_PRECISION
	NumericScale           sql.NullInt64  // NUMERIC_SCALE
	DatetimePrecision      sql.NullInt64  // DATETIME_PRECISION
	CharacterSetName       sql.NullString // CHARACTER_SET_NAME
	CollationName          sql.NullString // COLLATION_NAME
	ColumnType             string         // COLUMN_TYPE
	ColumnKey              string         // COLUMN_KEY
	Extra                  string         // EXTRA
	Privileges             string         // PRIVILEGES
	ColumnComment          string         // COLUMN_COMMENT
	GenerationExpression   string         // GENERATION_EXPRESSION
}

Row represents a row from 'COLUMNS'.

func Query

func Query(db gnorm.DB, where gnorm.WhereClause) ([]*Row, error)

Query retrieves rows from 'COLUMNS' as a slice of Row.

Jump to

Keyboard shortcuts

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