Documentation ¶
Index ¶
- Variables
- 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 ¶
This section is empty.
Variables ¶
var ( // DefaultOptions for impala driver DefaultOptions = Options{BatchSize: 1024, BufferSize: 4096, Port: "21050", LogOut: ioutil.Discard} )
var ( // ErrNotSupported means this operation is not supported by impala driver ErrNotSupported = errors.New("impala: not supported") )
Functions ¶
func NewConnector ¶ added in v1.1.1
NewConnector creates connector with specified options
Types ¶
type Conn ¶ added in v1.1.1
type Conn struct {
// contains filtered or unexported fields
}
Conn to impala. It is not used concurrently by multiple goroutines.
func (*Conn) CheckNamedValue ¶ added in v1.1.1
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 ¶ added in v1.1.1
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 ¶ added in v1.1.1
OpenSession ensure opened session
func (*Conn) PrepareContext ¶ added in v1.1.1
PrepareContext returns prepared statement
type Driver ¶ added in v1.1.1
type Driver struct{}
Driver to impala
type Options ¶
type Options struct { Host string Port string Username string Password string UseLDAP bool UseTLS bool CACertPath string BufferSize int BatchSize int MemoryLimit string QueryTimeout int LogOut io.Writer }
Options for impala driver connection
type Rows ¶ added in v1.1.1
type Rows struct {
// contains filtered or unexported fields
}
Rows is an iterator over an executed query's results.
func (*Rows) ColumnTypeDatabaseTypeName ¶ added in v1.1.1
ColumnTypeDatabaseTypeName returns column's database type name
func (*Rows) ColumnTypeScanType ¶ added in v1.1.1
ColumnTypeScanType returns column's native type
type Stmt ¶ added in v1.1.1
type Stmt struct {
// contains filtered or unexported fields
}
Stmt is statement
func (*Stmt) CheckNamedValue ¶ added in v1.1.1
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 ¶ added in v1.1.1
ExecContext executes a query that doesn't return rows
func (*Stmt) QueryContext ¶ added in v1.1.1
QueryContext executes a query that may return rows