Documentation ¶
Index ¶
- func AddField(table string, f Field) string
- func AlterField(table string, f Field) string
- func CreateTable(name string, fields ...Field) string
- func DeleteRow(table string, where map[Field]any) string
- func DropField(table, field string) string
- func DropTable(name string) string
- func InsertRow(table string, values map[Field]any) string
- func InsertRows(table string, fields []Field, rows [][]any) (string, error)
- func QuoteString(s string) (sql string)
- func UpdateRow(table string, values map[Field]any, where map[Field]any) string
- type Connection
- type Field
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlterField ¶
func CreateTable ¶
CreateTable creates a table
func InsertRows ¶
InsertRows inserts several rows, the order and length of the fields and each row must match
func QuoteString ¶ added in v0.0.6
Types ¶
type Connection ¶
func NewConnection ¶
func NewConnection(dsn, passwd string) *Connection
NewConnection creates a new ODBC connection
type Type ¶ added in v0.0.3
type Type string
var ( Type_COUNTER Type = "COUNTER" Type_BYTE Type = "BYTE" Type_SMALLINT Type = "SMALLINT" Type_INTEGER Type = "INTEGER" Type_REAL Type = "REAL" Type_FLOAT Type = "FLOAT" // Type_DECIMAL(18,5) FieldType = "DECIMAL(18,5)" Type_MONEY Type = "MONEY" Type_VARCHAR Type = "VARCHAR" Type_MEMO Type = "MEMO" Type_DATETIME Type = "DATETIME" Type_BIT Type = "BIT" Type_IMAGE Type = "IMAGE" Type_UNIQUEIDENTIFIER Type = "UNIQUEIDENTIFIER" )
Click to show internal directories.
Click to hide internal directories.