Documentation ¶
Index ¶
- func ToResult(result *types.SqlQueriesResponse) (driver.Result, error)
- func ToRow(result *types.SqlQueriesResponse, con *Connection) (driver.Rows, error)
- type Connection
- func (c *Connection) Begin() (driver.Tx, error)
- func (c *Connection) Close() error
- func (c *Connection) Connect() error
- func (c *Connection) Exec(query string, args []driver.Value) (driver.Result, error)
- func (c *Connection) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (c *Connection) Login(ctx context.Context) error
- func (c *Connection) Prepare(query string) (driver.Stmt, error)
- func (c *Connection) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)
- func (c *Connection) Query(query string, args []driver.Value) (driver.Rows, error)
- func (c *Connection) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- func (c *Connection) Send(ctx context.Context, request, response interface{}) error
- func (c *Connection) SimpleExec(ctx context.Context, query string) (*types.SqlQueriesResponse, error)
- type ImportStatement
- type QueryResults
- func (results *QueryResults) Close() error
- func (results *QueryResults) ColumnTypeDatabaseTypeName(index int) string
- func (results *QueryResults) ColumnTypeLength(index int) (length int64, ok bool)
- func (results *QueryResults) ColumnTypeNullable(index int) (nullable, ok bool)
- func (results *QueryResults) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool)
- func (results *QueryResults) ColumnTypeScanType(index int) reflect.Type
- func (results *QueryResults) Columns() []string
- func (results *QueryResults) Next(dest []driver.Value) error
- type RowCount
- type Statement
- func (s *Statement) Close() error
- func (s *Statement) Exec(args []driver.Value) (driver.Result, error)
- func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (s *Statement) NumInput() int
- func (s *Statement) Query(args []driver.Value) (driver.Rows, error)
- func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToRow ¶
func ToRow(result *types.SqlQueriesResponse, con *Connection) (driver.Rows, error)
Types ¶
type Connection ¶
type Connection struct { Config *config.Config Ctx context.Context IsClosed bool // contains filtered or unexported fields }
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) Connect ¶
func (c *Connection) Connect() error
func (*Connection) ExecContext ¶
func (c *Connection) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
func (*Connection) PrepareContext ¶
func (*Connection) QueryContext ¶
func (c *Connection) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
func (*Connection) Send ¶
func (c *Connection) Send(ctx context.Context, request, response interface{}) error
func (*Connection) SimpleExec ¶
func (c *Connection) SimpleExec(ctx context.Context, query string) (*types.SqlQueriesResponse, error)
type ImportStatement ¶
type ImportStatement struct {
// contains filtered or unexported fields
}
func NewImportStatement ¶
func NewImportStatement(query string, host string, port int) (*ImportStatement, error)
func (*ImportStatement) Close ¶
func (i *ImportStatement) Close()
func (*ImportStatement) GetUpdatedQuery ¶
func (i *ImportStatement) GetUpdatedQuery() string
func (*ImportStatement) UploadFiles ¶
func (i *ImportStatement) UploadFiles(ctx context.Context) error
type QueryResults ¶
type QueryResults struct { sync.Mutex // guards following // contains filtered or unexported fields }
func (*QueryResults) Close ¶
func (results *QueryResults) Close() error
func (*QueryResults) ColumnTypeDatabaseTypeName ¶
func (results *QueryResults) ColumnTypeDatabaseTypeName(index int) string
func (*QueryResults) ColumnTypeLength ¶
func (results *QueryResults) ColumnTypeLength(index int) (length int64, ok bool)
func (*QueryResults) ColumnTypeNullable ¶
func (results *QueryResults) ColumnTypeNullable(index int) (nullable, ok bool)
func (*QueryResults) ColumnTypePrecisionScale ¶
func (results *QueryResults) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool)
func (*QueryResults) ColumnTypeScanType ¶
func (results *QueryResults) ColumnTypeScanType(index int) reflect.Type
func (*QueryResults) Columns ¶
func (results *QueryResults) Columns() []string
type RowCount ¶
type RowCount struct {
// contains filtered or unexported fields
}
func (*RowCount) LastInsertId ¶
func (*RowCount) RowsAffected ¶
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func NewStatement ¶
func NewStatement(connection *Connection, response *types.CreatePreparedStatementResponse) *Statement
func (*Statement) ExecContext ¶
func (*Statement) QueryContext ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(connection *Connection) *Transaction
func (*Transaction) Commit ¶
func (t *Transaction) Commit() error
func (*Transaction) Rollback ¶
func (t *Transaction) Rollback() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.