Versions in this module Expand all Collapse all v0 v0.8.1 May 23, 2023 Changes in this version + const OpEqual + const OpGT + const OpGTE + const OpIsNull + const OpIsTrue + const OpLT + const OpLTE + var DefaultDialect = QueryDialect + func Init(typ string, addr string, options graph.Options) error + func New(typ string, addr string, options graph.Options) (graph.QuadStore, error) + func Register(name string, f Registration) + type BoolVal bool + func (v BoolVal) SQLValue() interface{} + type Builder struct + func NewBuilder(d QueryDialect) *Builder + func (b *Builder) EscapeField(s string) string + func (b *Builder) Placeholder() string + type CmpOp string + type Expr interface + SQL func(b *Builder) string + type Field struct + Alias string + Name string + Raw bool + Table string + func (f Field) NameOrAlias() string + func (f Field) SQL(b *Builder) string + type FieldName struct + Name string + Table string + func (f FieldName) SQL(b *Builder) string + type FloatVal float64 + func (v FloatVal) SQLValue() interface{} + type IntVal int64 + func (v IntVal) SQLValue() interface{} + type Iterator struct + func (it *Iterator) Iterate() iterator.Scanner + func (it *Iterator) Lookup() iterator.Index + func (it *Iterator) Optimize(ctx context.Context) (iterator.Shape, bool) + func (it *Iterator) Stats(ctx context.Context) (iterator.Costs, error) + func (it *Iterator) String() string + func (it *Iterator) SubIterators() []iterator.Shape + type NodeHash struct + func HashOf(s quad.Value) NodeHash + func (h *NodeHash) Scan(src interface{}) error + func (h NodeHash) SQLValue() interface{} + type NullTime struct + Time time.Time + Valid bool + func (nt *NullTime) Scan(value interface{}) error + func (nt NullTime) Value() (driver.Value, error) + type Optimizer struct + func NewOptimizer() *Optimizer + func (opt *Optimizer) NoOffsetWithoutLimit() + func (opt *Optimizer) OptimizeShape(ctx context.Context, s shape.Shape) (shape.Shape, bool) + func (opt *Optimizer) SetRegexpOp(op CmpOp) + type Placeholder struct + func (Placeholder) SQL(b *Builder) string + type QuadHashes struct + type QuadStore struct + func (qs *QuadStore) ApplyDeltas(in []graph.Delta, opts graph.IgnoreOpts) error + func (qs *QuadStore) Close() error + func (qs *QuadStore) NameOf(v graph.Ref) (quad.Value, error) + func (qs *QuadStore) NewQuadWriter() (quad.WriteCloser, error) + func (qs *QuadStore) NodesAllIterator() iterator.Shape + func (qs *QuadStore) OptimizeShape(ctx context.Context, s shape.Shape) (shape.Shape, bool) + func (qs *QuadStore) Quad(val graph.Ref) (quad.Quad, error) + func (qs *QuadStore) QuadDirection(in graph.Ref, d quad.Direction) (graph.Ref, error) + func (qs *QuadStore) QuadIterator(d quad.Direction, val graph.Ref) iterator.Shape + func (qs *QuadStore) QuadIteratorSize(ctx context.Context, d quad.Direction, val graph.Ref) (refs.Size, error) + func (qs *QuadStore) QuadsAllIterator() iterator.Shape + func (qs *QuadStore) Query(ctx context.Context, s Shape) (*sql.Rows, error) + func (qs *QuadStore) QueryRow(ctx context.Context, s Shape) *sql.Row + func (qs *QuadStore) Stats(ctx context.Context, exact bool) (graph.Stats, error) + func (qs *QuadStore) ValueOf(s quad.Value) (graph.Ref, error) + type QueryDialect struct + FieldQuote func(string) string + Placeholder func(int) string + RegexpOp CmpOp + type Registration struct + BytesType string + ConditionalIndexes bool + Driver string + Error func(error) error + Estimated func(table string) string + FillFactor bool + HashType string + HorizonType string + NoForeignKeys bool + NoOffsetWithoutLimit bool + NoSchemaChangesInTx bool + NodesTableExtra string + RunTx func(tx *sql.Tx, nodes []graphlog.NodeUpdate, quads []graphlog.QuadUpdate, ...) error + TimeType string + TxRetry func(tx *sql.Tx, stmts func() error) error + type Select struct + Fields []Field + From []Source + Limit int64 + Offset int64 + Params []Value + Where []Where + func AllNodes() Select + func AllQuads(alias string) Select + func Nodes(where []Where, params []Value) Select + func SelectValue(v quad.Value, op CmpOp) *Select + func (s *Select) AppendParam(o Value) Expr + func (s *Select) WhereEq(tbl, field string, v Value) + func (s Select) Args() []Value + func (s Select) BuildIterator(qs graph.QuadStore) iterator.Shape + func (s Select) Clone() Select + func (s Select) Columns() []string + func (s Select) Optimize(ctx context.Context, r shape.Optimizer) (shape.Shape, bool) + func (s Select) SQL(b *Builder) string + type Shape interface + Args func() []Value + Columns func() []string + SQL func(b *Builder) string + type Source interface + Args func() []Value + SQL func(b *Builder) string + type StringVal string + func (v StringVal) SQLValue() interface{} + type Subquery struct + Alias string + Query Select + func (s Subquery) Args() []Value + func (s Subquery) SQL(b *Builder) string + type Table struct + Alias string + Name string + func (f Table) Args() []Value + func (f Table) NameSQL() string + func (f Table) SQL(b *Builder) string + type TimeVal time.Time + func (v TimeVal) SQLValue() interface{} + type Value interface + SQLValue func() interface{} + type ValueType int + func NodeValues(h NodeHash, v quad.Value) (ValueType, []interface{}, error) + func (t ValueType) Columns() []string + type Where struct + Field string + Op CmpOp + Table string + Value Expr + func (w Where) SQL(b *Builder) string