Documentation ¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'xodb'.
Package models contains the types for schema 'xodb'.
Package models contains the types for schema 'xodb'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema ”.
Package models contains the types for schema ”.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Variables
- type Column
- func MsTableColumns(db XODB, schema string, table string) ([]*Column, error)
- func MyTableColumns(db XODB, schema string, table string) ([]*Column, error)
- func OrTableColumns(db XODB, schema string, table string) ([]*Column, error)
- func PgTableColumns(db XODB, schema string, table string, sys bool) ([]*Column, error)
- type Enum
- type EnumValue
- type ForeignKey
- func MsTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
- func MyTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
- func OrTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
- func PgTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
- func SqTableForeignKeys(db XODB, table string) ([]*ForeignKey, error)
- type Index
- func MsTableIndexes(db XODB, schema string, table string) ([]*Index, error)
- func MyTableIndexes(db XODB, schema string, table string) ([]*Index, error)
- func OrTableIndexes(db XODB, schema string, table string) ([]*Index, error)
- func PgTableIndexes(db XODB, schema string, table string) ([]*Index, error)
- func SqTableIndexes(db XODB, table string) ([]*Index, error)
- type IndexColumn
- func MsIndexColumns(db XODB, schema string, table string, index string) ([]*IndexColumn, error)
- func MyIndexColumns(db XODB, schema string, table string, index string) ([]*IndexColumn, error)
- func OrIndexColumns(db XODB, schema string, table string, index string) ([]*IndexColumn, error)
- func PgIndexColumns(db XODB, schema string, index string) ([]*IndexColumn, error)
- func SqIndexColumns(db XODB, index string) ([]*IndexColumn, error)
- type MsIdentity
- type MyAutoIncrement
- type MyEnumValue
- type PgColOrder
- type Proc
- type ProcParam
- type ScannerValuer
- type Sequence
- type Slice
- type SqAutoIncrement
- type SqColumn
- type StringSlice
- type Table
- func MsTables(db XODB, schema string, relkind string) ([]*Table, error)
- func MyTables(db XODB, schema string, relkind string) ([]*Table, error)
- func OrTables(db XODB, schema string, relkind string) ([]*Table, error)
- func PgTables(db XODB, schema string, relkind string) ([]*Table, error)
- func SqTables(db XODB, relkind string) ([]*Table, error)
- type XODB
Constants ¶
This section is empty.
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { FieldOrdinal int // field_ordinal ColumnName string // column_name DataType string // data_type NotNull bool // not_null DefaultValue sql.NullString // default_value IsPrimaryKey bool // is_primary_key ColumnComment string // column_comment IsEnum bool // is_enum }
Column represents column info.
func MsTableColumns ¶
MsTableColumns runs a custom query, returning results as Column.
func MyTableColumns ¶
MyTableColumns runs a custom query, returning results as Column.
func OrTableColumns ¶
OrTableColumns runs a custom query, returning results as Column.
type Enum ¶
type Enum struct {
EnumName string // enum_name
}
Enum represents a enum.
type ForeignKey ¶
type ForeignKey struct { ForeignKeyName string // foreign_key_name ColumnName string // column_name RefIndexName string // ref_index_name RefTableName string // ref_table_name RefColumnName string // ref_column_name KeyID int // key_id SeqNo int // seq_no OnUpdate string // on_update OnDelete string // on_delete Match string // match }
ForeignKey represents a foreign key.
func MsTableForeignKeys ¶
func MsTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
MsTableForeignKeys runs a custom query, returning results as ForeignKey.
func MyTableForeignKeys ¶
func MyTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
MyTableForeignKeys runs a custom query, returning results as ForeignKey.
func OrTableForeignKeys ¶
func OrTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
OrTableForeignKeys runs a custom query, returning results as ForeignKey.
func PgTableForeignKeys ¶
func PgTableForeignKeys(db XODB, schema string, table string) ([]*ForeignKey, error)
PgTableForeignKeys runs a custom query, returning results as ForeignKey.
func SqTableForeignKeys ¶
func SqTableForeignKeys(db XODB, table string) ([]*ForeignKey, error)
SqTableForeignKeys runs a custom query, returning results as ForeignKey.
type Index ¶
type Index struct { IndexName string // index_name IsUnique bool // is_unique IsPrimary bool // is_primary SeqNo int // seq_no Origin string // origin IsPartial bool // is_partial }
Index represents an index.
func MsTableIndexes ¶
MsTableIndexes runs a custom query, returning results as Index.
func MyTableIndexes ¶
MyTableIndexes runs a custom query, returning results as Index.
func OrTableIndexes ¶
OrTableIndexes runs a custom query, returning results as Index.
func PgTableIndexes ¶
PgTableIndexes runs a custom query, returning results as Index.
type IndexColumn ¶
IndexColumn represents index column info.
func MsIndexColumns ¶
MsIndexColumns runs a custom query, returning results as IndexColumn.
func MyIndexColumns ¶
MyIndexColumns runs a custom query, returning results as IndexColumn.
func OrIndexColumns ¶
OrIndexColumns runs a custom query, returning results as IndexColumn.
func PgIndexColumns ¶
func PgIndexColumns(db XODB, schema string, index string) ([]*IndexColumn, error)
PgIndexColumns runs a custom query, returning results as IndexColumn.
func SqIndexColumns ¶
func SqIndexColumns(db XODB, index string) ([]*IndexColumn, error)
SqIndexColumns runs a custom query, returning results as IndexColumn.
type MsIdentity ¶
type MsIdentity struct {
TableName string // table_name
}
MsIdentity represents a row from '[custom ms_identity]'.
func MsIdentities ¶
func MsIdentities(db XODB, schema string) ([]*MsIdentity, error)
MsIdentities runs a custom query, returning results as MsIdentity.
type MyAutoIncrement ¶
type MyAutoIncrement struct {
TableName string // table_name
}
MyAutoIncrement represents a row from '[custom my_auto_increment]'.
func MyAutoIncrements ¶
func MyAutoIncrements(db XODB, schema string) ([]*MyAutoIncrement, error)
MyAutoIncrements runs a custom query, returning results as MyAutoIncrement.
type MyEnumValue ¶
type MyEnumValue struct {
EnumValues string // enum_values
}
MyEnumValue represents a row from '[custom my_enum_value]'.
func MyEnumValues ¶
func MyEnumValues(db XODB, schema string, enum string) (*MyEnumValue, error)
MyEnumValues runs a custom query, returning results as MyEnumValue.
type PgColOrder ¶
type PgColOrder struct {
Ord string // ord
}
PgColOrder represents index column order.
func PgGetColOrder ¶
func PgGetColOrder(db XODB, schema string, index string) (*PgColOrder, error)
PgGetColOrder runs a custom query, returning results as PgColOrder.
type Proc ¶
Proc represents a stored procedure.
type ProcParam ¶
type ProcParam struct {
ParamType string // param_type
}
ProcParam represents a stored procedure param.
func MyProcParams ¶
MyProcParams runs a custom query, returning results as ProcParam.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type Sequence ¶
type Sequence struct {
TableName string // table_name
}
Sequence represents a row from '[custom sequence]'.
type SqAutoIncrement ¶
SqAutoIncrement represents a row from '[custom sq_auto_increment]'.
func SqAutoIncrements ¶
func SqAutoIncrements(db XODB) ([]*SqAutoIncrement, error)
SqAutoIncrements runs a custom query, returning results as SqAutoIncrement.
type SqColumn ¶
type SqColumn struct { FieldOrdinal int // field_ordinal ColumnName string // column_name DataType string // data_type NotNull bool // not_null DefaultValue sql.NullString // default_value PkColIndex int // pk_col_index }
SqColumn represents a row from '[custom sq_column]'.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type Table ¶
type Table struct { Type string // type TableName string // table_name TableComment string // table_comment ManualPk bool // manual_pk }
Table represents table info.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.