Documentation ¶
Overview ¶
Package dbsql implements the go driver to Databricks SQL
Index ¶
- Variables
- func NewConnector(options ...connOption) (driver.Connector, error)
- func NewRows(connID string, corrId string, client cli_service.TCLIService, ...) driver.Rows
- func WithAccessToken(token string) connOption
- func WithHTTPPath(path string) connOption
- func WithInitialNamespace(catalog, schema string) connOption
- func WithMaxRows(n int) connOption
- func WithPort(port int) connOption
- func WithServerHostname(host string) connOption
- func WithSessionParams(params map[string]string) connOption
- func WithTimeout(n time.Duration) connOption
- func WithUserAgentEntry(entry string) connOption
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = "databricks: not implemented"
var ErrParametersNotSupported = "databricks: query parameters are not supported"
var ErrTransactionsNotSupported = "databricks: transactions are not supported"
Functions ¶
func NewConnector ¶
NewConnector creates a connection that can be used with sql.OpenDB(). This is an easier way to set up the DB instead of having to construct a DSN string.
func NewRows ¶ added in v0.2.1
func NewRows(connID string, corrId string, client cli_service.TCLIService, opHandle *cli_service.TOperationHandle, pageSize int64, location *time.Location, directResults *cli_service.TSparkDirectResults) driver.Rows
func WithAccessToken ¶ added in v0.2.0
func WithAccessToken(token string) connOption
WithAccessToken sets up the Personal Access Token. Mandatory for now.
func WithHTTPPath ¶ added in v0.2.0
func WithHTTPPath(path string) connOption
WithHTTPPath sets up the endpoint to the warehouse. Mandatory.
func WithInitialNamespace ¶ added in v0.2.0
func WithInitialNamespace(catalog, schema string) connOption
Sets the initial catalog name and schema name in the session. Use <select * from foo> instead of <select * from catalog.schema.foo>
func WithMaxRows ¶ added in v0.2.0
func WithMaxRows(n int) connOption
WithMaxRows sets up the max rows fetched per request. Default is 10000
func WithPort ¶ added in v0.2.0
func WithPort(port int) connOption
WithPort sets up the server port. Mandatory.
func WithServerHostname ¶ added in v0.2.0
func WithServerHostname(host string) connOption
WithServerHostname sets up the server hostname. Mandatory.
func WithSessionParams ¶ added in v0.2.0
Sessions params will be set upon opening the session by calling SET function. If using connection pool, session params can avoid successive calls of "SET ..."
func WithTimeout ¶ added in v0.2.0
WithTimeout adds timeout for the server query execution. Default is no timeout.
func WithUserAgentEntry ¶ added in v0.2.0
func WithUserAgentEntry(entry string) connOption
Used to identify partners. Set as a string with format <isv-name+product-name>.
Types ¶
This section is empty.