Documentation
¶
Index ¶
- Constants
- Variables
- func FormatQuery(sqlText string, args ...interface{}) (string, int, []interface{})
- type AnyType
- type Column
- type Connection
- func (c *Connection) BeginTx(opts driver.TxOptions) (driver.Tx, error)
- func (c *Connection) ClassMethod(class, method string, result interface{}, args ...interface{}) (err error)
- func (c *Connection) ClassMethodVoid(class, method string, args ...interface{}) (err error)
- func (c *Connection) Commit() (err error)
- func (c *Connection) DirectQuery(sqlText string, args ...interface{}) (*ResultSet, error)
- func (c *Connection) DirectUpdate(sqlText string, args ...interface{}) (*Result, error)
- func (c *Connection) Disconnect()
- func (c *Connection) Exec(sqlText string, args ...interface{}) (res *Result, err error)
- func (c *Connection) GlobalGet(global string, result interface{}, subs ...interface{}) (err error)
- func (c *Connection) GlobalIsDefined(global string, subs ...interface{}) (bool, bool)
- func (c *Connection) GlobalKill(global string, subs ...interface{}) (err error)
- func (c *Connection) GlobalNext(global string, ind *string, subs ...interface{}) (hasNext bool, err error)
- func (c *Connection) GlobalPrev(global string, ind *string, subs ...interface{}) (hasNext bool, err error)
- func (c *Connection) GlobalSet(global string, value interface{}, subs ...interface{}) (err error)
- func (c *Connection) IsOptionFastInsert() bool
- func (c *Connection) IsOptionFastSelect() bool
- func (c *Connection) Method(obj iris.Oref, method string, result interface{}, args ...interface{}) (err error)
- func (c *Connection) MethodVoid(obj, method string, args ...interface{}) (err error)
- func (c *Connection) Prepare(query string) (*Stmt, error)
- func (c *Connection) PropertyGet(obj iris.Oref, property string, result interface{}) (err error)
- func (c *Connection) Query(sqlText string, args ...interface{}) (rs *ResultSet, err error)
- func (c *Connection) Rollback() (err error)
- func (c *Connection) ServerVersion() (result string, err error)
- type FeatureOption
- type Message
- func (m *Message) AddRaw(value interface{})
- func (m *Message) Dump(count uint32) []byte
- func (m *Message) Get(value interface{}) error
- func (m *Message) GetAny() AnyType
- func (m *Message) GetRaw(value interface{}) error
- func (m *Message) GetStatus() uint16
- func (m *Message) Set(value interface{}) error
- func (m *Message) SetSQLText(sqlText string) error
- type MessageHeader
- type MessageType
- type Result
- type ResultSet
- type Rows
- type SQLError
- type SQLTYPE
- type StatementFeature
- type Stmt
- type Value
Constants ¶
View Source
const VERSION_PROTOCOL uint16 = 69
Variables ¶
View Source
var (
ErrCouldNotDetectUsername = errors.New("intersystems: Could not detect default username. Please provide one explicitly")
)
Functions ¶
func FormatQuery ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(addr string, namespace, login, password string) (connection Connection, err error)
func (*Connection) ClassMethod ¶
func (c *Connection) ClassMethod(class, method string, result interface{}, args ...interface{}) (err error)
func (*Connection) ClassMethodVoid ¶
func (c *Connection) ClassMethodVoid(class, method string, args ...interface{}) (err error)
func (*Connection) Commit ¶
func (c *Connection) Commit() (err error)
func (*Connection) DirectQuery ¶
func (c *Connection) DirectQuery(sqlText string, args ...interface{}) (*ResultSet, error)
func (*Connection) DirectUpdate ¶
func (c *Connection) DirectUpdate(sqlText string, args ...interface{}) (*Result, error)
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect()
func (*Connection) Exec ¶
func (c *Connection) Exec(sqlText string, args ...interface{}) (res *Result, err error)
func (*Connection) GlobalGet ¶
func (c *Connection) GlobalGet(global string, result interface{}, subs ...interface{}) (err error)
func (*Connection) GlobalIsDefined ¶
func (c *Connection) GlobalIsDefined(global string, subs ...interface{}) (bool, bool)
func (*Connection) GlobalKill ¶
func (c *Connection) GlobalKill(global string, subs ...interface{}) (err error)
func (*Connection) GlobalNext ¶
func (c *Connection) GlobalNext(global string, ind *string, subs ...interface{}) (hasNext bool, err error)
func (*Connection) GlobalPrev ¶
func (c *Connection) GlobalPrev(global string, ind *string, subs ...interface{}) (hasNext bool, err error)
func (*Connection) GlobalSet ¶
func (c *Connection) GlobalSet(global string, value interface{}, subs ...interface{}) (err error)
func (*Connection) IsOptionFastInsert ¶
func (c *Connection) IsOptionFastInsert() bool
func (*Connection) IsOptionFastSelect ¶
func (c *Connection) IsOptionFastSelect() bool
func (*Connection) Method ¶
func (c *Connection) Method(obj iris.Oref, method string, result interface{}, args ...interface{}) (err error)
func (*Connection) MethodVoid ¶
func (c *Connection) MethodVoid(obj, method string, args ...interface{}) (err error)
func (*Connection) PropertyGet ¶
func (c *Connection) PropertyGet(obj iris.Oref, property string, result interface{}) (err error)
func (*Connection) Query ¶
func (c *Connection) Query(sqlText string, args ...interface{}) (rs *ResultSet, err error)
func (*Connection) Rollback ¶
func (c *Connection) Rollback() (err error)
func (*Connection) ServerVersion ¶
func (c *Connection) ServerVersion() (result string, err error)
type FeatureOption ¶
type FeatureOption uint
const ( OptionNone FeatureOption = 0 OptionFastSelect FeatureOption = 1 OptionFastInsert FeatureOption = 2 OptionFastSelectAndInsert FeatureOption = 3 OptionDurableTransactions FeatureOption = 4 OptionNotNullable FeatureOption = 8 OptionRedirectOutput FeatureOption = 32 )
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func NewMessage(messageType MessageType) Message
func (*Message) SetSQLText ¶
type MessageHeader ¶
type MessageHeader struct {
// contains filtered or unexported fields
}
func NewMessageHeader ¶
func NewMessageHeader(messageType MessageType) MessageHeader
func (MessageHeader) GetLength ¶
func (mh MessageHeader) GetLength() uint32
func (*MessageHeader) GetStatus ¶
func (mh *MessageHeader) GetStatus() uint16
func (*MessageHeader) SetCount ¶
func (mh *MessageHeader) SetCount(cnt uint32)
func (*MessageHeader) SetLength ¶
func (mh *MessageHeader) SetLength(length uint32)
func (*MessageHeader) SetStatementId ¶
func (mh *MessageHeader) SetStatementId(statementId uint32)
type MessageType ¶
type MessageType string
const ( CONNECT MessageType = "\x43\x4e" HANDSHAKE MessageType = "\x48\x53" DISCONNECT MessageType = "\x44\x43" GLOBAL_GET MessageType = "\x41\xc2" GLOBAL_SET MessageType = "\x42\xc2" GLOBAL_KILL MessageType = "\x43\xc2" GLOBAL_ORDER MessageType = "\x45\xc2" GLOBAL_DATA MessageType = "\x49\xc2" CLASSMETHOD_VALUE MessageType = "\x4b\xc2" CLASSMETHOD_VOID MessageType = "\x4c\xc2" METHOD_VALUE MessageType = "\x5b\xc2" METHOD_VOID MessageType = "\x5c\xc2" PROPERTY_GET MessageType = "\x5d\xc2" PROPERTY_SET MessageType = "\x5e\xc2" DIRECT_QUERY MessageType = "DQ" PREPARED_QUERY MessageType = "PQ" DIRECT_UPDATE MessageType = "DU" PREPARED_UPDATE MessageType = "PU" PREPARE MessageType = "PP" GET_AUTO_GENERATED_KEYS MessageType = "GG" COMMIT MessageType = "TC" ROLLBACK MessageType = "TR" MULTIPLE_RESULT_SETS_FETCH_DATA MessageType = "MD" GET_MORE_RESULTS MessageType = "MR" FETCH_DATA MessageType = "FD" GET_SERVER_ERROR MessageType = "OE" )
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (Result) LastInsertId ¶
func (Result) RowsAffected ¶
type SQLTYPE ¶
type SQLTYPE int16
const ( GUID SQLTYPE = -11 WLONGVARCHAR SQLTYPE = -10 WVARCHAR SQLTYPE = -9 WCHAR SQLTYPE = -8 BIT SQLTYPE = -7 TINYINT SQLTYPE = -6 BIGINT SQLTYPE = -5 LONGVARBINARY SQLTYPE = -4 VARBINARY SQLTYPE = -3 BINARY SQLTYPE = -2 LONGVARCHAR SQLTYPE = -1 CHAR SQLTYPE = 1 NUMERIC SQLTYPE = 2 DECIMAL SQLTYPE = 3 INTEGER SQLTYPE = 4 SMALLINT SQLTYPE = 5 FLOAT SQLTYPE = 6 REAL SQLTYPE = 7 DOUBLE SQLTYPE = 8 DATE SQLTYPE = 9 TIME SQLTYPE = 10 TIMESTAMP SQLTYPE = 11 VARCHAR SQLTYPE = 12 TYPE_DATE SQLTYPE = 91 TYPE_TIME SQLTYPE = 92 TYPE_TIMESTAMP SQLTYPE = 93 DATE_HOROLOG SQLTYPE = 1091 TIME_HOROLOG SQLTYPE = 1092 TIMESTAMP_POSIX SQLTYPE = 1093 )
type StatementFeature ¶
type StatementFeature struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.