sql

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2017 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const QuadStoreType = "sql"

Variables

This section is empty.

Functions

func RegisterFlavor added in v0.6.1

func RegisterFlavor(f Flavor)

Types

type AllIterator

type AllIterator struct {
	// contains filtered or unexported fields
}

func NewAllIterator

func NewAllIterator(qs *QuadStore, table string) *AllIterator

func (*AllIterator) Clone

func (it *AllIterator) Clone() graph.Iterator

func (*AllIterator) Close

func (it *AllIterator) Close() error

func (*AllIterator) Contains

func (it *AllIterator) Contains(v graph.Value) bool

func (*AllIterator) Describe

func (it *AllIterator) Describe() graph.Description

func (*AllIterator) Err

func (it *AllIterator) Err() error

func (*AllIterator) Next

func (it *AllIterator) Next() bool

func (*AllIterator) NextPath

func (it *AllIterator) NextPath() bool

func (*AllIterator) Optimize

func (it *AllIterator) Optimize() (graph.Iterator, bool)

func (*AllIterator) Reset

func (it *AllIterator) Reset()

func (*AllIterator) Result

func (it *AllIterator) Result() graph.Value

func (*AllIterator) Size

func (it *AllIterator) Size() (int64, bool)

func (*AllIterator) Sorted

func (it *AllIterator) Sorted() bool

func (*AllIterator) Stats

func (it *AllIterator) Stats() graph.IteratorStats

func (*AllIterator) SubIterators

func (it *AllIterator) SubIterators() []graph.Iterator

func (*AllIterator) TagResults

func (it *AllIterator) TagResults(dst map[string]graph.Value)

func (*AllIterator) Tagger

func (it *AllIterator) Tagger() *graph.Tagger

func (*AllIterator) Type

func (it *AllIterator) Type() graph.Type

func (*AllIterator) UID

func (it *AllIterator) UID() uint64

type AmbiguousCommitError added in v0.6.1

type AmbiguousCommitError struct {
	// contains filtered or unexported fields
}

AmbiguousCommitError represents an error that left a transaction in an ambiguous state: unclear if it committed or not.

type Flavor added in v0.6.1

type Flavor struct {
	Name        string
	Driver      string
	NodesTable  string
	QuadsTable  string
	FieldQuote  rune
	Placeholder func(int) string
	Indexes     func(graph.Options) []string
	Error       func(error) error
	Estimated   func(table string) string
	RunTx       func(tx *sql.Tx, in []graph.Delta, opts graph.IgnoreOpts) error
}

type NodeHash added in v0.6.0

type NodeHash [quad.HashSize]byte

func (NodeHash) IsNode added in v0.6.0

func (NodeHash) IsNode() bool

func (*NodeHash) Scan added in v0.6.0

func (h *NodeHash) Scan(src interface{}) error

func (NodeHash) String added in v0.6.0

func (h NodeHash) String() string

func (NodeHash) Valid added in v0.6.0

func (h NodeHash) Valid() bool

type NullTime added in v0.6.1

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime represents a time.Time that may be null. NullTime implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.

func (*NullTime) Scan added in v0.6.1

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value added in v0.6.1

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type QuadHashes added in v0.6.0

type QuadHashes [4]NodeHash

func (QuadHashes) Get added in v0.6.0

func (q QuadHashes) Get(d quad.Direction) NodeHash

func (QuadHashes) IsNode added in v0.6.0

func (QuadHashes) IsNode() bool

type QuadStore

type QuadStore struct {
	// contains filtered or unexported fields
}

func (*QuadStore) ApplyDeltas

func (qs *QuadStore) ApplyDeltas(in []graph.Delta, opts graph.IgnoreOpts) error

func (*QuadStore) Close

func (qs *QuadStore) Close() error

func (*QuadStore) FixedIterator

func (qs *QuadStore) FixedIterator() graph.FixedIterator

func (*QuadStore) Horizon

func (qs *QuadStore) Horizon() graph.PrimaryKey

func (*QuadStore) NameOf

func (qs *QuadStore) NameOf(v graph.Value) quad.Value

func (*QuadStore) NodesAllIterator

func (qs *QuadStore) NodesAllIterator() graph.Iterator

func (*QuadStore) OptimizeIterator

func (qs *QuadStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool)

func (*QuadStore) Quad

func (qs *QuadStore) Quad(val graph.Value) quad.Quad

func (*QuadStore) QuadDirection

func (qs *QuadStore) QuadDirection(in graph.Value, d quad.Direction) graph.Value

func (*QuadStore) QuadIterator

func (qs *QuadStore) QuadIterator(d quad.Direction, val graph.Value) graph.Iterator

func (*QuadStore) QuadsAllIterator

func (qs *QuadStore) QuadsAllIterator() graph.Iterator

func (*QuadStore) Size

func (qs *QuadStore) Size() int64

func (*QuadStore) Type

func (qs *QuadStore) Type() string

func (*QuadStore) ValueOf

func (qs *QuadStore) ValueOf(s quad.Value) graph.Value

type SQLIterator

type SQLIterator struct {
	// contains filtered or unexported fields
}

func NewSQLIterator

func NewSQLIterator(qs *QuadStore, sql sqlIterator) *SQLIterator

func NewSQLLinkIterator

func NewSQLLinkIterator(qs *QuadStore, d quad.Direction, v quad.Value) *SQLIterator

func (*SQLIterator) Clone

func (it *SQLIterator) Clone() graph.Iterator

func (*SQLIterator) Close

func (it *SQLIterator) Close() error

func (*SQLIterator) Contains

func (it *SQLIterator) Contains(v graph.Value) bool

func (*SQLIterator) Describe

func (it *SQLIterator) Describe() graph.Description

func (*SQLIterator) Err

func (it *SQLIterator) Err() error

func (*SQLIterator) Next

func (it *SQLIterator) Next() bool

func (*SQLIterator) NextPath

func (it *SQLIterator) NextPath() bool

func (*SQLIterator) Optimize

func (it *SQLIterator) Optimize() (graph.Iterator, bool)

func (*SQLIterator) Reset

func (it *SQLIterator) Reset()

func (*SQLIterator) Result

func (it *SQLIterator) Result() graph.Value

func (*SQLIterator) Size

func (it *SQLIterator) Size() (int64, bool)

func (*SQLIterator) Sorted

func (it *SQLIterator) Sorted() bool

func (*SQLIterator) Stats

func (it *SQLIterator) Stats() graph.IteratorStats

func (*SQLIterator) SubIterators

func (it *SQLIterator) SubIterators() []graph.Iterator

func (*SQLIterator) TagResults

func (it *SQLIterator) TagResults(dst map[string]graph.Value)

func (*SQLIterator) Tagger

func (it *SQLIterator) Tagger() *graph.Tagger

func (*SQLIterator) Type

func (it *SQLIterator) Type() graph.Type

func (*SQLIterator) UID

func (it *SQLIterator) UID() uint64

type SQLLinkIterator

type SQLLinkIterator struct {
	// contains filtered or unexported fields
}

func (*SQLLinkIterator) Describe

func (l *SQLLinkIterator) Describe() string

func (*SQLLinkIterator) Result

func (l *SQLLinkIterator) Result() graph.Value

func (*SQLLinkIterator) Size

func (l *SQLLinkIterator) Size(qs *QuadStore) (int64, bool)

func (*SQLLinkIterator) Tagger

func (l *SQLLinkIterator) Tagger() *graph.Tagger

func (*SQLLinkIterator) Type

func (l *SQLLinkIterator) Type() sqlQueryType

type SQLNodeIntersection

type SQLNodeIntersection struct {
	// contains filtered or unexported fields
}

func (*SQLNodeIntersection) Describe

func (n *SQLNodeIntersection) Describe() string

func (*SQLNodeIntersection) Result

func (n *SQLNodeIntersection) Result() graph.Value

func (*SQLNodeIntersection) Size

func (n *SQLNodeIntersection) Size(qs *QuadStore) (int64, bool)

func (*SQLNodeIntersection) Tagger

func (n *SQLNodeIntersection) Tagger() *graph.Tagger

func (*SQLNodeIntersection) Type

func (n *SQLNodeIntersection) Type() sqlQueryType

type SQLNodeIterator

type SQLNodeIterator struct {
	// contains filtered or unexported fields
}

func (*SQLNodeIterator) Describe

func (n *SQLNodeIterator) Describe() string

func (*SQLNodeIterator) Result

func (n *SQLNodeIterator) Result() graph.Value

func (*SQLNodeIterator) Size

func (n *SQLNodeIterator) Size(qs *QuadStore) (int64, bool)

func (*SQLNodeIterator) Tagger

func (n *SQLNodeIterator) Tagger() *graph.Tagger

func (*SQLNodeIterator) Type

func (n *SQLNodeIterator) Type() sqlQueryType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL