Documentation ¶
Overview ¶
connextra defines extra functions which are not part of the sql/driver interface Document queroes and graph queries(not supported yet) will call these functions
Index ¶
- type ArgSpec
- type ClientError
- type Connector
- type PolyphenyConn
- func (conn *PolyphenyConn) Begin() (driver.Tx, error)
- func (conn *PolyphenyConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (conn *PolyphenyConn) Close() error
- func (conn *PolyphenyConn) Exec(query string, args []driver.Value) (driver.Result, error)
- func (conn *PolyphenyConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
- func (conn *PolyphenyConn) IsValid() bool
- func (conn *PolyphenyConn) Ping(ctx context.Context) error
- func (conn *PolyphenyConn) Prepare(query string) (driver.Stmt, error)
- func (conn *PolyphenyConn) Query(query string, args []driver.Value) (driver.Rows, error)
- func (conn *PolyphenyConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- func (conn *PolyphenyConn) QueryMongoContext(ctx context.Context, query string) (*[]map[any]any, error)
- type PolyphenyDriver
- type PolyphenyResult
- type PolyphenyRows
- type PolyphenyTranaction
- type PreparedStatement
- func (stmt *PreparedStatement) Close() error
- func (stmt *PreparedStatement) Exec(args []driver.Value) (driver.Result, error)
- func (stmt *PreparedStatement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
- func (stmt *PreparedStatement) NumInput() int
- func (stmt *PreparedStatement) Query(args []driver.Value) (driver.Rows, error)
- func (stmt *PreparedStatement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientError ¶
type ClientError struct {
// contains filtered or unexported fields
}
func (*ClientError) Error ¶
func (e *ClientError) Error() string
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector implements the driver.Connector interface
type PolyphenyConn ¶
type PolyphenyConn struct {
// contains filtered or unexported fields
}
PolyphenyConn implements driver.Conn
func (*PolyphenyConn) Begin ¶
func (conn *PolyphenyConn) Begin() (driver.Tx, error)
Begin starts a new transaction TODO: add support to ConnBeginTx Deprecated
func (*PolyphenyConn) Close ¶
func (conn *PolyphenyConn) Close() error
Close will close the network connection to Polypheny server TODO: add support to timeout
func (*PolyphenyConn) Exec ¶
Exec executes a query that doesn't return data TODO: add fetch size, namespace and args support. TODO: for args support, can we first prepare it and then exec? Deprecated
func (*PolyphenyConn) ExecContext ¶
func (conn *PolyphenyConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
ExecContext executes a query that doesn't return data under Context
TODO add fetch size, namespace and args support. TODO for args support, can we first prepare it and then exec?
func (*PolyphenyConn) IsValid ¶
func (conn *PolyphenyConn) IsValid() bool
IsValid implements Validator interface
func (*PolyphenyConn) Ping ¶
func (conn *PolyphenyConn) Ping(ctx context.Context) error
Ping implmenets Pinger
func (*PolyphenyConn) Prepare ¶
func (conn *PolyphenyConn) Prepare(query string) (driver.Stmt, error)
Prepare a statement
func (*PolyphenyConn) Query ¶
Exec executes a query that doesn't return data TODO: add fetch size, namespace and args support. TODO: for args support, can we first prepare it and then exec? Deprecated
func (*PolyphenyConn) QueryContext ¶
func (conn *PolyphenyConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
QueryContext executes a query that returns data under Context
TODO add fetch size, namespace and args support. TODO for args support, can we first prepare it and then exec?
func (*PolyphenyConn) QueryMongoContext ¶
type PolyphenyDriver ¶
type PolyphenyDriver struct{}
PolyphenyDriver implements driver.Driver and DriverContext interface
func (PolyphenyDriver) Open ¶
func (d PolyphenyDriver) Open(name string) (driver.Conn, error)
Open will return a PolyphenyConn which implements driver.Conn and represents a Connection to Polypheny server The name, also called DSN, has the following format: addr:port,user:password
func (PolyphenyDriver) OpenConnector ¶
func (d PolyphenyDriver) OpenConnector(name string) (driver.Connector, error)
OpenConnector will return a Connector
type PolyphenyResult ¶
type PolyphenyResult struct {
// contains filtered or unexported fields
}
PolyphenyResult implements driver.Result and represents the results of queries that don't return data
func (*PolyphenyResult) LastInsertId ¶
func (r *PolyphenyResult) LastInsertId() (int64, error)
LastInsertId returns the ID of the last inserted row TODO: does Polypheny support this at present?
func (*PolyphenyResult) RowsAffected ¶
func (r *PolyphenyResult) RowsAffected() (int64, error)
RowsAffected returns the number of affected rows of a query
type PolyphenyRows ¶
type PolyphenyRows struct {
// contains filtered or unexported fields
}
PolyphenyRows implements driver.Rows and represents the results of queries that return data
func (*PolyphenyRows) Close ¶
func (r *PolyphenyRows) Close() error
Close will close the Rows iterator
func (*PolyphenyRows) Columns ¶
func (r *PolyphenyRows) Columns() []string
Columns returns the names of columns of a query
type PolyphenyTranaction ¶
type PolyphenyTranaction struct {
// contains filtered or unexported fields
}
func (*PolyphenyTranaction) Commit ¶
func (tx *PolyphenyTranaction) Commit() error
func (*PolyphenyTranaction) Rollback ¶
func (tx *PolyphenyTranaction) Rollback() error
type PreparedStatement ¶
type PreparedStatement struct {
// contains filtered or unexported fields
}
PreparedStatement implments Stmt, StmtExecContext and StmtQueryContext Deprecated functions, such as Exec and Query, are also implemented for compatibility, but they are deprecated.
func (*PreparedStatement) Close ¶
func (stmt *PreparedStatement) Close() error
Close closes the statement
func (*PreparedStatement) Exec ¶
Exec executes a query that doesn't return data TODO: add support to FetchSize Deprecated
func (*PreparedStatement) ExecContext ¶
func (stmt *PreparedStatement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
ExecContext executes a query that doesn't return data under Context
TODO add fetch size, namespace and args support. TODO for args support, can we first prepare it and then exec?
func (*PreparedStatement) NumInput ¶
func (stmt *PreparedStatement) NumInput() int
NumInput returns the number of parameters
func (*PreparedStatement) Query ¶
Query executes a query that returns data TODO: add support to FetchSize Deprecated
func (*PreparedStatement) QueryContext ¶
func (stmt *PreparedStatement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
QueryContext executes a query that returns data under Context
TODO add fetch size, namespace and args support. TODO for args support, can we first prepare it and then exec?