Documentation
¶
Index ¶
- func NoError(option driverOption) driverOptionWithError
- func ParseDSNString(dsn string) (*types.FireboltSettings, error)
- func SplitStatements(sql string) ([]string, error)
- func WithAccountID(accountID string) driverOption
- func WithAccountName(accountName string) driverOptionWithError
- func WithClientParams(accountID string, token string, userAgent string) driverOption
- func WithDatabaseAndEngineName(databaseName, engineName string) driverOptionWithError
- func WithDatabaseName(databaseName string) driverOption
- func WithEngineUrl(engineUrl string) driverOption
- func WithToken(token string) driverOption
- func WithUserAgent(userAgent string) driverOption
- type FireboltConnector
- type FireboltDriver
- type FireboltResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDSNString ¶
func ParseDSNString(dsn string) (*types.FireboltSettings, error)
ParseDSNString parses a dsn in a format: firebolt://username:password@db_name[/engine_name][?account_name=organization] returns a settings object where all parsed values are populated returns an error if required fields couldn't be parsed or if after parsing some characters were left unparsed
func SplitStatements ¶ added in v0.0.6
SplitStatements split multiple statements into a list of statements
func WithAccountID ¶ added in v1.6.1
func WithAccountID(accountID string) driverOption
WithAccountID defines account ID for the driver
func WithAccountName ¶ added in v1.8.0
func WithAccountName(accountName string) driverOptionWithError
WithAccountName defines account name for the driver
func WithClientParams ¶ added in v1.1.0
WithClientParams defines client parameters for the driver
func WithDatabaseAndEngineName ¶ added in v1.8.0
func WithDatabaseAndEngineName(databaseName, engineName string) driverOptionWithError
WithDatabaseAndEngineName defines database name and engine name for the driver
func WithDatabaseName ¶ added in v1.1.0
func WithDatabaseName(databaseName string) driverOption
WithDatabaseName defines database name for the driver
func WithEngineUrl ¶ added in v1.1.0
func WithEngineUrl(engineUrl string) driverOption
WithEngineUrl defines engine url for the driver
func WithToken ¶ added in v1.6.1
func WithToken(token string) driverOption
WithToken defines token for the driver
func WithUserAgent ¶ added in v1.6.1
func WithUserAgent(userAgent string) driverOption
WithUserAgent defines user agent for the driver
Types ¶
type FireboltConnector ¶ added in v1.1.0
type FireboltConnector struct {
// contains filtered or unexported fields
}
FireboltConnector is an intermediate type between a Connection and a Driver which stores session data
func FireboltConnectorWithOptions ¶ added in v1.1.0
func FireboltConnectorWithOptions(opts ...driverOption) *FireboltConnector
FireboltConnectorWithOptions builds a custom connector
func FireboltConnectorWithOptionsWithErrors ¶ added in v1.8.0
func FireboltConnectorWithOptionsWithErrors(opts ...driverOptionWithError) (*FireboltConnector, error)
FireboltConnectorWithOptionsWithErrors builds a custom connector with error handling
func (*FireboltConnector) Driver ¶ added in v1.1.0
func (c *FireboltConnector) Driver() driver.Driver
Driver returns the underlying driver of the Connector
type FireboltDriver ¶
type FireboltDriver struct {
// contains filtered or unexported fields
}
func (*FireboltDriver) Open ¶
func (d *FireboltDriver) Open(dsn string) (driver.Conn, error)
Open parses the dsn string, and if correct tries to establish a connection
func (*FireboltDriver) OpenConnector ¶ added in v1.1.0
func (d *FireboltDriver) OpenConnector(dsn string) (driver.Connector, error)
type FireboltResult ¶
type FireboltResult struct {
}
func (FireboltResult) LastInsertId ¶
func (r FireboltResult) LastInsertId() (int64, error)
LastInsertId returns last inserted ID, not supported by firebolt
func (FireboltResult) RowsAffected ¶
func (r FireboltResult) RowsAffected() (int64, error)
RowsAffected returns a number of affected rows, not supported by firebolt