Documentation ¶
Index ¶
- Constants
- Variables
- func EscapeArg(arg driver.NamedValue) (string, error)
- func NewConnector(opts *Options) driver.Connector
- type Conn
- func (c *Conn) Begin() (driver.Tx, error)
- func (c *Conn) CheckNamedValue(val *driver.NamedValue) error
- func (c *Conn) Close() error
- func (c *Conn) ExecContext(ctx context.Context, q string, args []driver.NamedValue) (driver.Result, error)
- func (c *Conn) OpenSession(ctx context.Context) (*hive.Session, error)
- func (c *Conn) Ping(ctx context.Context) error
- func (c *Conn) Prepare(query string) (driver.Stmt, error)
- func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)
- func (c *Conn) QueryContext(ctx context.Context, q string, args []driver.NamedValue) (driver.Rows, error)
- func (c *Conn) ResetSession(ctx context.Context) error
- type Driver
- type Options
- type Rows
- type Stmt
- func (s *Stmt) CheckNamedValue(val *driver.NamedValue) error
- func (s *Stmt) Close() error
- func (s *Stmt) Exec(args []driver.Value) (driver.Result, error)
- func (s *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (s *Stmt) NumInput() int
- func (s *Stmt) Query(args []driver.Value) (driver.Rows, error)
- func (s *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
Constants ¶
const (
TimeFmt = "2006-01-02T15:04:05.999-07:00"
)
Variables ¶
var ( // DefaultOptions for the driver DefaultOptions = Options{Port: "443", MaxRows: 10000, LogOut: ioutil.Discard} )
var ( // ErrNotSupported means this operation is not supported by the driver ErrNotSupported = errors.New("databricks: not supported") )
Functions ¶
func NewConnector ¶
NewConnector creates connector with specified options
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Connection
func (*Conn) CheckNamedValue ¶
func (c *Conn) CheckNamedValue(val *driver.NamedValue) error
CheckNamedValue is called before passing arguments to the driver and is called in place of any ColumnConverter. CheckNamedValue must do type validation and conversion as appropriate for the driver.
func (*Conn) ExecContext ¶
func (c *Conn) ExecContext(ctx context.Context, q string, args []driver.NamedValue) (driver.Result, error)
ExecContext executes a query that doesn't return rows
func (*Conn) OpenSession ¶
OpenSession ensure opened session
func (*Conn) PrepareContext ¶
PrepareContext returns prepared statement
type Driver ¶
type Driver struct{}
type Options ¶
type Options struct { Host string Port string Token string HTTPPath string MaxRows int64 Timeout int LogOut io.Writer }
Options for driver connection
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows is an iterator over an executed query's results.
func (*Rows) ColumnTypeDatabaseTypeName ¶
ColumnTypeDatabaseTypeName returns column's database type name
func (*Rows) ColumnTypeScanType ¶
ColumnTypeScanType returns column's native type
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
Stmt is statement
func (*Stmt) CheckNamedValue ¶
func (s *Stmt) CheckNamedValue(val *driver.NamedValue) error
CheckNamedValue is called before passing arguments to the driver and is called in place of any ColumnConverter. CheckNamedValue must do type validation and conversion as appropriate for the driver.
func (*Stmt) ExecContext ¶
ExecContext executes a query that doesn't return rows
func (*Stmt) QueryContext ¶
QueryContext executes a query that may return rows