fb

package module
v0.0.0-...-496f834 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

README

go-fb

Firebird package for Go. Does not currently conform to database/sql/driver interfaces.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertValue

func ConvertValue(dest, src interface{}) (err error)

func Drop

func Drop(parms string) (err error)

func MapFromConnectionString

func MapFromConnectionString(parms string) (map[string]string, error)

Types

type Column

type Column struct {
	Name         string
	Domain       string
	SqlType      string
	SqlSubtype   NullableInt16
	Length       int16 // DisplaySize
	Precision    NullableInt16
	Scale        int16
	Default      NullableString
	Nullable     NullableBool
	TypeCode     int
	InternalSize int
}

type Connection

type Connection struct {
	Location *time.Location
	// contains filtered or unexported fields
}

func Connect

func Connect(parms string) (conn *Connection, err error)

func Create

func Create(parms string) (conn *Connection, err error)

func (*Connection) Close

func (conn *Connection) Close() (err error)

func (*Connection) Columns

func (conn *Connection) Columns(tableName string) (columns []*Column, err error)

func (*Connection) Commit

func (conn *Connection) Commit() (err error)

func (*Connection) Drop

func (conn *Connection) Drop() (err error)

func (*Connection) Execute

func (conn *Connection) Execute(sql string, args ...interface{}) (cursor *Cursor, err error)

func (*Connection) ExecuteScript

func (conn *Connection) ExecuteScript(sql string) (err error)

func (*Connection) GeneratorNames

func (conn *Connection) GeneratorNames() (names []string, err error)

func (*Connection) IndexColumns

func (conn *Connection) IndexColumns(indexName string) (names []string, err error)

func (*Connection) Indexes

func (conn *Connection) Indexes() (indexes []*Index, err error)

func (*Connection) NextSequenceValue

func (conn *Connection) NextSequenceValue(name string) (value int64, err error)

func (*Connection) PrimaryKey

func (conn *Connection) PrimaryKey(tableName string) (key []string, err error)

func (*Connection) ProcedureNames

func (conn *Connection) ProcedureNames() (names []string, err error)

func (*Connection) QueryRow

func (conn *Connection) QueryRow(sql string, args ...interface{}) (row Row, err error)

func (*Connection) QueryRowMap

func (conn *Connection) QueryRowMap(sql string, args ...interface{}) (row map[string]interface{}, err error)

func (*Connection) QueryRowMaps

func (conn *Connection) QueryRowMaps(sql string, args ...interface{}) (rows []map[string]interface{}, err error)

func (*Connection) QueryRows

func (conn *Connection) QueryRows(sql string, args ...interface{}) (rows []Row, err error)

func (*Connection) RoleNames

func (conn *Connection) RoleNames() (names []string, err error)

func (*Connection) Rollback

func (conn *Connection) Rollback() (err error)

func (*Connection) RowsAffected

func (conn *Connection) RowsAffected() int

func (*Connection) TableNames

func (conn *Connection) TableNames() (names []string, err error)

func (*Connection) TransactionStart

func (conn *Connection) TransactionStart(options string) error

func (*Connection) TransactionStarted

func (conn *Connection) TransactionStarted() bool

func (*Connection) TriggerNames

func (conn *Connection) TriggerNames() (names []string, err error)

func (*Connection) ViewNames

func (conn *Connection) ViewNames() (names []string, err error)

type Cursor

type Cursor struct {
	Columns    []*Column
	ColumnsMap map[string]*Column
	// contains filtered or unexported fields
}

func (*Cursor) Close

func (cursor *Cursor) Close() (err error)

func (*Cursor) Err

func (cursor *Cursor) Err() error

func (*Cursor) Next

func (cursor *Cursor) Next() bool

func (*Cursor) Row

func (cursor *Cursor) Row() Row

func (*Cursor) RowMap

func (cursor *Cursor) RowMap() map[string]interface{}

func (*Cursor) Scan

func (cursor *Cursor) Scan(dest ...interface{}) error

type Database

type Database struct {
	Database       string
	Username       string
	Password       string
	Role           string
	Charset        string
	LowercaseNames bool
	PageSize       int
	TimeZone       string
}

func New

func New(parms string) (db *Database, err error)

func (*Database) Connect

func (db *Database) Connect() (*Connection, error)

func (*Database) Create

func (db *Database) Create() (*Connection, error)

func (*Database) CreateStatement

func (db *Database) CreateStatement() string

func (*Database) Drop

func (db *Database) Drop() (err error)

type Error

type Error struct {
	Code    int
	Message string
}

func (Error) Error

func (this Error) Error() string

type Index

type Index struct {
	Name       string
	TableName  string
	Unique     NullableBool
	Descending NullableBool
	Columns    []string
}

type Interfacer

type Interfacer interface {
	Interface() interface{}
}

type NullableBool

type NullableBool struct {
	Value bool
	Null  bool
}

func (*NullableBool) Interface

func (n *NullableBool) Interface() interface{}

func (*NullableBool) Scan

func (n *NullableBool) Scan(value interface{}) error

type NullableBytes

type NullableBytes struct {
	Value []byte
	Null  bool
}

func (*NullableBytes) Interface

func (n *NullableBytes) Interface() interface{}

func (*NullableBytes) Scan

func (n *NullableBytes) Scan(value interface{}) error

type NullableFloat32

type NullableFloat32 struct {
	Value float32
	Null  bool
}

func (*NullableFloat32) Interface

func (n *NullableFloat32) Interface() interface{}

func (*NullableFloat32) Scan

func (n *NullableFloat32) Scan(value interface{}) error

type NullableFloat64

type NullableFloat64 struct {
	Value float64
	Null  bool
}

func (*NullableFloat64) Interface

func (n *NullableFloat64) Interface() interface{}

func (*NullableFloat64) Scan

func (n *NullableFloat64) Scan(value interface{}) error

type NullableInt16

type NullableInt16 struct {
	Value int16
	Null  bool
}

func (*NullableInt16) Interface

func (n *NullableInt16) Interface() interface{}

func (*NullableInt16) Scan

func (n *NullableInt16) Scan(value interface{}) error

type NullableInt32

type NullableInt32 struct {
	Value int32
	Null  bool
}

func (*NullableInt32) Interface

func (n *NullableInt32) Interface() interface{}

func (*NullableInt32) Scan

func (n *NullableInt32) Scan(value interface{}) error

type NullableInt64

type NullableInt64 struct {
	Value int64
	Null  bool
}

func (*NullableInt64) Interface

func (n *NullableInt64) Interface() interface{}

func (*NullableInt64) Scan

func (n *NullableInt64) Scan(value interface{}) error

type NullableString

type NullableString struct {
	Value string
	Null  bool
}

func (*NullableString) Interface

func (n *NullableString) Interface() interface{}

func (*NullableString) Scan

func (n *NullableString) Scan(value interface{}) error

type NullableTime

type NullableTime struct {
	Value time.Time
	Null  bool
}

func (*NullableTime) Interface

func (n *NullableTime) Interface() interface{}

func (*NullableTime) Scan

func (n *NullableTime) Scan(value interface{}) error

type Row

type Row []interface{}

func (Row) Scan

func (row Row) Scan(dest ...interface{}) error

type Scanner

type Scanner interface {
	Scan(src interface{}) error
}

Jump to

Keyboard shortcuts

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