Documentation
¶
Index ¶
- type Column
- type Conn
- func (c *Conn) GenLink(table string, cols []Column, pkey []PKey) (sqld, sqlc string)
- func (c *Conn) GenTableIndexSQL(tableName string) (sqld, sqlc string)
- func (c *Conn) GenTables(table string, cols []Column, pkey []PKey) (sqld, sqlc string)
- func (c *Conn) GenUpdate(table string, cols []Column, pkey []PKey) (sqld, sqlc string)
- func (c *Conn) GetColumnDetail(t string, timeout int) ([]Column, error)
- func (c *Conn) GetForeignTableSchema(table string, timeout int) (sqld, sqlc string)
- func (c *Conn) GetIndexSchema(schema, index string) (Index, error)
- func (c *Conn) GetIndexes(schema string, timeout int) ([]IndexList, error)
- func (c *Conn) GetPKey(table string, timeout int) ([]PKey, error)
- func (c *Conn) GetRoutineSchema(schema, routine string) (Routine, error)
- func (c *Conn) GetRoutines(schema string, timeout int) ([]RoutineList, error)
- func (c *Conn) GetTableIndexSchema(table string) ([]Index, error)
- func (c *Conn) GetTableSchema(table string, timeout int) (sqld, sqlc, sqldi, sqlci string)
- func (c *Conn) GetTables(schemaName, ttype string, timeout int) ([]Table, error)
- func (c *Conn) GetUpdateTableSchema(table string, timeout int) (sqld, sqlc string)
- func (c *Conn) GetView(d Database, schema string, view View, dbg bool)
- func (c *Conn) GetViewSchema(schema, view string) (View, error)
- func (c *Conn) GetViews(schema string, timeout int) ([]ViewList, error)
- type Database
- type Index
- type IndexList
- type PKey
- type Routine
- type RoutineList
- type Schema
- type Table
- type View
- type ViewList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { ColumnName string `db:"COLUMN_NAME"` IsNullable string `db:"IS_NULLABLE"` ColumnDefault string `db:"COLUMN_DEFAULT"` DataType string `db:"DATA_TYPE"` }
Column struct
type Column struct { Column string `db:"CL"` ColumnName string `db:"CN"` DataType string `db:"DT"` }
type Conn ¶
Conn struct
func (*Conn) GenTableIndexSQL ¶
GenTableIndexSQL generate table index sql
func (*Conn) GetColumnDetail ¶
func (*Conn) GetForeignTableSchema ¶
GetForeignTableSchema gets table definition
func (*Conn) GetIndexSchema ¶
GetIndexeschema returns Indexes and definition
func (*Conn) GetIndexes ¶
GetIndexes returns list of Indexes and definitions
func (*Conn) GetRoutineSchema ¶
GetRoutineSchema returns routine and definition
func (*Conn) GetRoutines ¶
func (c *Conn) GetRoutines(schema string, timeout int) ([]RoutineList, error)
GetRoutines returns list of routines and definitions
func (*Conn) GetTableIndexSchema ¶
GetIndexeschema returns Indexes and definition
func (*Conn) GetTableSchema ¶
GetTableSchema gets table definition
func (*Conn) GetUpdateTableSchema ¶
GetUpdateTableSchema gets table definition
func (*Conn) GetViewSchema ¶
GetViewSchema returns views and definition
type Database ¶
type Database struct { Name string `json:"name,omitempty"` Hostname string `json:"hostname,omitempty"` Port int `json:"port,omitempty"` Driver string `json:"driver,omitempty"` Database string `json:"database,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` URI string `json:"uri,omitempty"` *sqlx.DB }
Database struct contains sql pointer
func (*Database) ExecProcedure ¶
ExecProcedure executes stored procedure
func (*Database) GetRoutine ¶
GetRoutine gets procedure definition
func (*Database) GetSchemas ¶
GetSchemas returns schema list
func (*Database) GetTableIndexSchema ¶
type Index ¶
type Index struct { Schema string `db:"schemaname"` Table string `db:"tablename"` Name string `db:"indexname"` Columns string `db:"indexcolumns"` Definition string `db:"indexdef"` }
Index list of Indexes
type Routine ¶
type Routine struct { Name string `db:"ROUTINE_NAME"` Type string `db:"ROUTINE_TYPE"` Definition string `db:"ROUTINE_DEFINITION"` DataType string `db:"DATA_TYPE"` ExternalLanguage string `db:"EXTERNAL_LANGUAGE"` }
Routine list of routines (procedures, functions)
type RoutineList ¶
type RoutineList struct {
Name string `db:"ROUTINE_NAME"`
}