Documentation
¶
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) (result driver.Result, err 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) PrepareContext(ctx context.Context, 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) (rows driver.Rows, err error)
- func (conn *PolyphenyConn) QueryMongoContext(ctx context.Context, query string) (rows *[]map[any]any, err error)
- func (conn *PolyphenyConn) SearchEntities(ctx context.Context, namespace string, pattern *string) (*prism.EntitiesResponse, error)
- type PolyphenyDriver
- type PolyphenyResult
- type PolyphenyRows
- type PolyphenyTransaction
- 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) (result driver.Result, err 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) (rows driver.Rows, err 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 driver.Connector.
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 transaction.
func (*PolyphenyConn) BeginTx ¶
BeginTx starts a transaction with the server's default isolation level.
func (*PolyphenyConn) Close ¶
func (conn *PolyphenyConn) Close() error
Close disconnects from the server and releases the network connection.
func (*PolyphenyConn) ExecContext ¶
func (conn *PolyphenyConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (result driver.Result, err error)
ExecContext executes a SQL statement with positional arguments.
func (*PolyphenyConn) IsValid ¶
func (conn *PolyphenyConn) IsValid() bool
IsValid reports whether the connection can be reused by database/sql.
func (*PolyphenyConn) Ping ¶
func (conn *PolyphenyConn) Ping(ctx context.Context) error
Ping checks that the server responds on this connection.
func (*PolyphenyConn) Prepare ¶
func (conn *PolyphenyConn) Prepare(query string) (driver.Stmt, error)
Prepare prepares a SQL statement on the server.
func (*PolyphenyConn) PrepareContext ¶
PrepareContext prepares a SQL statement with positional parameters.
func (*PolyphenyConn) QueryContext ¶
func (conn *PolyphenyConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (rows driver.Rows, err error)
QueryContext executes a SQL query with positional arguments.
func (*PolyphenyConn) QueryMongoContext ¶
func (conn *PolyphenyConn) QueryMongoContext(ctx context.Context, query string) (rows *[]map[any]any, err error)
QueryMongoContext executes an MQL query and returns all documents in its result. Document keys are strings. Nested documents are maps with string keys, and lists are slices of values.
func (*PolyphenyConn) SearchEntities ¶
func (conn *PolyphenyConn) SearchEntities(ctx context.Context, namespace string, pattern *string) (*prism.EntitiesResponse, error)
SearchEntities returns metadata about the entities in namespace. A nil pattern requests all entities. Document collection metadata requires a server that implements the Prism 2.2 document metadata fields.
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 PolyphenyTransaction ¶
type PolyphenyTransaction struct {
// contains filtered or unexported fields
}
PolyphenyTransaction implements driver.Tx.
func (*PolyphenyTransaction) Commit ¶
func (tx *PolyphenyTransaction) Commit() error
Commit commits the transaction and restores auto-commit.
func (*PolyphenyTransaction) Rollback ¶
func (tx *PolyphenyTransaction) Rollback() error
Rollback rolls back the transaction and restores auto-commit.
type PreparedStatement ¶
type PreparedStatement struct {
// contains filtered or unexported fields
}
PreparedStatement implements driver.Stmt and its context-aware extensions.
func (*PreparedStatement) Close ¶
func (stmt *PreparedStatement) Close() error
Close releases the prepared statement on the server.
func (*PreparedStatement) ExecContext ¶
func (stmt *PreparedStatement) ExecContext(ctx context.Context, args []driver.NamedValue) (result driver.Result, err error)
ExecContext executes a prepared statement with the supplied parameters.
func (*PreparedStatement) NumInput ¶
func (stmt *PreparedStatement) NumInput() int
NumInput returns the number of positional parameters.
func (*PreparedStatement) QueryContext ¶
func (stmt *PreparedStatement) QueryContext(ctx context.Context, args []driver.NamedValue) (rows driver.Rows, err error)
QueryContext executes a prepared query with the supplied parameters.