Documentation ¶
Index ¶
- Variables
- func SetLogger(logger Logger) error
- type Attributes
- type AuthCommand
- type AuthResponse
- type BaseResponse
- type ClosePreparedStatementCommand
- type CloseResultSetCommand
- type Command
- type CreatePreparedStatementCommand
- type CreatePreparedStatementResponse
- type DSNConfig
- func (c *DSNConfig) Autocommit(enabled bool) *DSNConfig
- func (c *DSNConfig) CertificateFingerprint(fingerprint string) *DSNConfig
- func (c *DSNConfig) ClientName(name string) *DSNConfig
- func (c *DSNConfig) ClientVersion(version string) *DSNConfig
- func (c *DSNConfig) Compression(enabled bool) *DSNConfig
- func (c *DSNConfig) Encryption(enabled bool) *DSNConfig
- func (c *DSNConfig) FetchSize(size int) *DSNConfig
- func (c *DSNConfig) Host(host string) *DSNConfig
- func (c *DSNConfig) Port(port int) *DSNConfig
- func (c *DSNConfig) String() string
- func (c *DSNConfig) ValidateServerCertificate(validate bool) *DSNConfig
- type DriverErr
- type ExasolDriver
- type Exception
- type ExecutePreparedStatementCommand
- type FetchCommand
- type Logger
- type LoginCommand
- type ParameterData
- type PublicKeyResponse
- type SQLCommand
- type SQLQueriesResponse
- type SQLQueryColumn
- type SQLQueryColumnType
- type SQLQueryResponseResultSet
- type SQLQueryResponseResultSetData
- type SQLQueryResponseRowCount
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidConn = newDriverErr(exaerror.New("E-EGOD-1").Message("invalid connection")) ErrClosed = newDriverErr(exaerror.New("E-EGOD-2").Message("connection was closed")) ErrMalformedData = newDriverErr(exaerror.New("E-EGOD-3").Message("malformed result")) ErrAutocommitEnabled = newDriverErr(exaerror.New("E-EGOD-4").Message("begin not working when autocommit is enabled")) ErrInvalidValuesCount = newDriverErr(exaerror.New("E-EGOD-5").Message("invalid value count for prepared status")) ErrNoLastInsertID = newDriverErr(exaerror.New("E-EGOD-6").Message("no LastInsertId available")) ErrNamedValuesNotSupported = newDriverErr(exaerror.New("E-EGOD-7").Message("named parameters not supported")) ErrLoggerNil = newDriverErr(exaerror.New("E-EGOD-8").Message("logger is nil")) ErrMissingServerCertificate = newDriverErr(exaerror.New("E-EGOD-9"). Message("server did not return certificates")) )
Various errors the driver might return. Can change between driver versions.
Functions ¶
Types ¶
type Attributes ¶
type Attributes struct { Autocommit *bool `json:"autocommit,omitempty"` CompressionEnabled *bool `json:"compressionEnabled,omitempty"` CurrentSchema string `json:"currentSchema,omitempty"` DateFormat string `json:"dateFormat,omitempty"` DateLanguage string `json:"dateLanguage,omitempty"` DatetimeFormat string `json:"datetimeFormat,omitempty"` DefaultLikeEscapeCharacter string `json:"defaultLikeEscapeCharacter,omitempty"` FeedbackInterval int `json:"feedbackInterval,omitempty"` NumericCharacters string `json:"numericCharacters,omitempty"` OpenTransaction *bool `json:"openTransaction,omitempty"` QueryTimeout int `json:"queryTimeout,omitempty"` SnapshotTransactionsEnabled *bool `json:"snapshotTransactionsEnabled,omitempty"` TimestampUtcEnabled *bool `json:"timestampUtcEnabled,omitempty"` Timezone string `json:"timezone,omitempty"` TimeZoneBehavior string `json:"timeZoneBehavior,omitempty"` ResultSetMaxRows int `json:"resultSetMaxRows,omitempty"` }
type AuthCommand ¶
type AuthCommand struct { Username string `json:"username"` Password string `json:"password"` UseCompression bool `json:"useCompression"` SessionID int `json:"sessionId,omitempty"` ClientName string `json:"clientName,omitempty"` DriverName string `json:"driverName,omitempty"` ClientOs string `json:"clientOs,omitempty"` ClientOsUsername string `json:"clientOsUsername,omitempty"` ClientLanguage string `json:"clientLanguage,omitempty"` ClientVersion string `json:"clientVersion,omitempty"` ClientRuntime string `json:"clientRuntime,omitempty"` Attributes Attributes `json:"attributes,omitempty"` }
type AuthResponse ¶
type AuthResponse struct { SessionID int `json:"sessionId"` ProtocolVersion int `json:"protocolVersion"` ReleaseVersion string `json:"releaseVersion"` DatabaseName string `json:"databaseName"` ProductName string `json:"productName"` MaxDataMessageSize int `json:"maxDataMessageSize"` MaxIdentifierLength int `json:"maxIdentifierLength"` MaxVarcharLength int `json:"maxVarcharLength"` IdentifierQuoteString string `json:"identifierQuoteString"` TimeZone string `json:"timeZone"` TimeZoneBehavior string `json:"timeZoneBehavior"` }
type BaseResponse ¶
type BaseResponse struct { Status string `json:"status"` ResponseData json.RawMessage `json:"responseData"` Exception *Exception `json:"exception"` }
type ClosePreparedStatementCommand ¶
type ClosePreparedStatementCommand struct { Command StatementHandle int `json:"statementHandle"` Attributes Attributes `json:"attributes,omitempty"` }
type CloseResultSetCommand ¶
type CloseResultSetCommand struct { Command ResultSetHandles []int `json:"resultSetHandles"` Attributes Attributes `json:"attributes,omitempty"` }
type CreatePreparedStatementCommand ¶
type CreatePreparedStatementCommand struct { Command SQLText string `json:"sqlText"` Attributes Attributes `json:"attributes,omitempty"` }
type CreatePreparedStatementResponse ¶
type CreatePreparedStatementResponse struct { StatementHandle int `json:"statementHandle"` ParameterData ParameterData `json:"parameterData,omitempty"` }
type DSNConfig ¶
type DSNConfig struct {
// contains filtered or unexported fields
}
func (*DSNConfig) Autocommit ¶
func (*DSNConfig) CertificateFingerprint ¶ added in v0.2.0
func (*DSNConfig) ClientName ¶
func (*DSNConfig) ClientVersion ¶
func (*DSNConfig) Compression ¶
func (*DSNConfig) Encryption ¶
func (*DSNConfig) ValidateServerCertificate ¶ added in v0.2.0
type ExasolDriver ¶
type ExasolDriver struct{}
func (ExasolDriver) OpenConnector ¶
func (e ExasolDriver) OpenConnector(dsn string) (driver.Connector, error)
type ExecutePreparedStatementCommand ¶
type ExecutePreparedStatementCommand struct { Command StatementHandle int `json:"statementHandle"` NumColumns int `json:"numColumns,omitempty"` NumRows int `json:"numRows"` Columns []SQLQueryColumn `json:"columns,omitempty"` Data [][]interface{} `json:"data"` Attributes Attributes `json:"attributes,omitempty"` }
type FetchCommand ¶
type Logger ¶
type Logger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) }
Logger is used to log critical error messages.
type LoginCommand ¶
type LoginCommand struct { Command ProtocolVersion int `json:"protocolVersion"` Attributes Attributes `json:"attributes,omitempty"` }
type ParameterData ¶
type ParameterData struct { NumColumns int `json:"numColumns"` Columns []SQLQueryColumn `json:"columns"` SQLQueriesResponse }
type PublicKeyResponse ¶
type SQLCommand ¶
type SQLCommand struct { Command SQLText string `json:"sqlText"` Attributes Attributes `json:"attributes,omitempty"` }
type SQLQueriesResponse ¶
type SQLQueriesResponse struct { NumResults int `json:"numResults"` Results []json.RawMessage `json:"results"` }
type SQLQueryColumn ¶
type SQLQueryColumn struct { Name string `json:"name"` DataType SQLQueryColumnType `json:"dataType"` }
type SQLQueryColumnType ¶
type SQLQueryColumnType struct { Type string `json:"type"` Precision *int64 `json:"precision,omitempty"` Scale *int64 `json:"scale,omitempty"` Size *int64 `json:"size,omitempty"` CharacterSet *string `json:"characterSet,omitempty"` WithLocalTimeZone *bool `json:"withLocalTimeZone,omitempty"` Fraction *int `json:"fraction,omitempty"` SRID *int `json:"srid,omitempty"` }
type SQLQueryResponseResultSet ¶
type SQLQueryResponseResultSet struct { ResultType string `json:"resultType"` ResultSet SQLQueryResponseResultSetData `json:"resultSet"` }
type SQLQueryResponseResultSetData ¶
type SQLQueryResponseResultSetData struct { ResultSetHandle int `json:"resultSetHandle"` NumColumns int `json:"numColumns,omitempty"` NumRows int `json:"numRows"` NumRowsInMessage int `json:"numRowsInMessage"` Columns []SQLQueryColumn `json:"columns,omitempty"` Data [][]interface{} `json:"data"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.