Documentation ¶
Index ¶
- Variables
- type Conn
- func (c *Conn) Begin() (driver.Tx, error)
- func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (c *Conn) Close() error
- func (c *Conn) Exec(query string, args []driver.Value) (driver.Result, error)
- func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, 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) Query(query string, args []driver.Value) (driver.Rows, error)
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
- func (c *Conn) SQLiteConn() *sqlite3.SQLiteConn
- type Driver
Constants ¶
This section is empty.
Variables ¶
View Source
var QueryDialect = cayleysql.QueryDialect{ RegexpOp: "REGEXP", FieldQuote: pq.QuoteIdentifier, Placeholder: func(n int) string { return fmt.Sprintf("$%d", n) }, }
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) ExecContext ¶
func (*Conn) PrepareContext ¶
func (*Conn) QueryContext ¶
func (*Conn) SQLiteConn ¶
func (c *Conn) SQLiteConn() *sqlite3.SQLiteConn
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements the driver.Conn interface by wrapping a SQLite3 driver with connections that use databases stored in Swarm.
func (*Driver) Commit ¶
Commit commits the SQLite graph database with the given name by storing it in Swarm and returning the resulting Swarm hash.
func (*Driver) GraphRegistration ¶
func (d *Driver) GraphRegistration() cayleysql.Registration
GraphRegistration returns a Cayley SQL registration which allows Cayley to use Swarm backed SQLite databases.
TODO: Update OpIsTrue to handle the fact that SQLite does not have
a built-in 'true' literal
TODO: Add a SQLite regex extension so that the REGEXP operator works
TODO: Update cayley so that it supports creating indexes in the
CREATE TABLE statement (currently we are just not creating the indexes by setting NoForeignKeys)
Click to show internal directories.
Click to hide internal directories.