Documentation
¶
Overview ¶
this file contains the set of query operators generated by the query planner
Index ¶
- Constants
- type DB
- func (db *DB) Abbreviate(uri turtle.URI) string
- func (db *DB) Close()
- func (db *DB) DumpEntity(ent *Entity)
- func (db *DB) GetEntity(uri turtle.URI) (*Entity, error)
- func (db *DB) GetEntityFromHash(hash Key) (*Entity, error)
- func (db *DB) GetEntityFromHashTx(graphtx *leveldb.Transaction, hash Key) (*Entity, error)
- func (db *DB) GetEntityIndexFromHash(hash Key) (*EntityExtendedIndex, error)
- func (db *DB) GetEntityIndexFromHashTx(extendtx *leveldb.Transaction, hash Key) (*EntityExtendedIndex, error)
- func (db *DB) GetEntityTx(graphtx *leveldb.Transaction, uri turtle.URI) (*Entity, error)
- func (db *DB) GetHash(entity turtle.URI) (Key, error)
- func (db *DB) GetURI(hash Key) (turtle.URI, error)
- func (db *DB) LoadDataset(dataset turtle.DataSet) error
- func (db *DB) MustGetEntityFromHash(hash Key) *Entity
- func (db *DB) MustGetEntityIndexFromHash(hash Key) *EntityExtendedIndex
- func (db *DB) MustGetHash(entity turtle.URI) Key
- func (db *DB) MustGetURI(hash Key) turtle.URI
- func (db *DB) MustGetURIStringHash(hash string) turtle.URI
- func (db *DB) QueryToClassDOT(querystring io.Reader) (string, error)
- func (db *DB) QueryToDOT(querystring io.Reader) (string, error)
- func (db *DB) RunQuery(q query.Query) QueryResult
- type Entity
- func (e *Entity) AddInEdge(predicate, endpoint Key) bool
- func (e *Entity) AddOutEdge(predicate, endpoint Key) bool
- func (z *Entity) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Entity) EncodeMsg(en *msgp.Writer) (err error)
- func (e *Entity) Less(than btree.Item, ctx interface{}) bool
- func (z *Entity) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Entity) Msgsize() (s int)
- func (z *Entity) UnmarshalMsg(bts []byte) (o []byte, err error)
- type EntityExtendedIndex
- func (e *EntityExtendedIndex) AddInPlusEdge(predicate, endpoint Key) bool
- func (e *EntityExtendedIndex) AddOutPlusEdge(predicate, endpoint Key) bool
- func (z *EntityExtendedIndex) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *EntityExtendedIndex) EncodeMsg(en *msgp.Writer) (err error)
- func (z *EntityExtendedIndex) MarshalMsg(b []byte) (o []byte, err error)
- func (z *EntityExtendedIndex) Msgsize() (s int)
- func (z *EntityExtendedIndex) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Key
- func (z *Key) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Key) EncodeMsg(en *msgp.Writer) (err error)
- func (k *Key) FromSlice(src []byte)
- func (k Key) Less(than btree.Item, ctx interface{}) bool
- func (z *Key) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Key) Msgsize() (s int)
- func (k Key) String() string
- func (z *Key) UnmarshalMsg(bts []byte) (o []byte, err error)
- type LinkResultMap
- type NamespaceIndex
- func (z *NamespaceIndex) DecodeMsg(dc *msgp.Reader) (err error)
- func (z NamespaceIndex) EncodeMsg(en *msgp.Writer) (err error)
- func (z NamespaceIndex) MarshalMsg(b []byte) (o []byte, err error)
- func (z NamespaceIndex) Msgsize() (s int)
- func (z *NamespaceIndex) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PredIndex
- type PredicateEntity
- func (e *PredicateEntity) AddSubjectObject(subject, object Key)
- func (z *PredicateEntity) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *PredicateEntity) EncodeMsg(en *msgp.Writer) (err error)
- func (z *PredicateEntity) MarshalMsg(b []byte) (o []byte, err error)
- func (z *PredicateEntity) Msgsize() (s int)
- func (z *PredicateEntity) UnmarshalMsg(bts []byte) (o []byte, err error)
- type QueryResult
- func (z *QueryResult) DecodeMsg(dc *msgp.Reader) (err error)
- func (qr QueryResult) Dump()
- func (qr QueryResult) DumpToCSV(usePrefixes bool, db *DB, w io.Writer) error
- func (z *QueryResult) EncodeMsg(en *msgp.Writer) (err error)
- func (z *QueryResult) MarshalMsg(b []byte) (o []byte, err error)
- func (z *QueryResult) Msgsize() (s int)
- func (z *QueryResult) UnmarshalMsg(bts []byte) (o []byte, err error)
- type RelshipIndex
- type ResultMap
- type ResultRow
Constants ¶
const ( RESOLVED = "RESOLVED" UNRESOLVED = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) DumpEntity ¶
func (*DB) GetEntityFromHashTx ¶
func (*DB) GetEntityIndexFromHash ¶ added in v0.4.1
func (db *DB) GetEntityIndexFromHash(hash Key) (*EntityExtendedIndex, error)
func (*DB) GetEntityIndexFromHashTx ¶ added in v0.4.1
func (db *DB) GetEntityIndexFromHashTx(extendtx *leveldb.Transaction, hash Key) (*EntityExtendedIndex, error)
func (*DB) GetEntityTx ¶
func (*DB) MustGetEntityFromHash ¶
func (*DB) MustGetEntityIndexFromHash ¶ added in v0.4.1
func (db *DB) MustGetEntityIndexFromHash(hash Key) *EntityExtendedIndex
func (*DB) QueryToClassDOT ¶ added in v0.3.3
executes a query and returns a DOT string of the classes involved
func (*DB) QueryToDOT ¶
takes a query and returns a DOT representation to visualize the construction of the query
type Entity ¶
type Entity struct { PK Key `msg:"p"` // note: we have to use string keys to get msgp to work InEdges map[string][]Key `msg:"i"` OutEdges map[string][]Key `msg:"o"` }
func (*Entity) AddOutEdge ¶
returns true if we added an endpoint; false if it was already there
func (*Entity) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type EntityExtendedIndex ¶ added in v0.4.1
type EntityExtendedIndex struct { PK Key `msg:"p"` InPlusEdges map[string][]Key `msg:"i+"` OutPlusEdges map[string][]Key `msg:"o+"` }
func NewEntityExtendedIndex ¶ added in v0.4.1
func NewEntityExtendedIndex() *EntityExtendedIndex
func (*EntityExtendedIndex) AddInPlusEdge ¶ added in v0.4.1
func (e *EntityExtendedIndex) AddInPlusEdge(predicate, endpoint Key) bool
returns true if we added an endpoint; false if it was already there
func (*EntityExtendedIndex) AddOutPlusEdge ¶ added in v0.4.1
func (e *EntityExtendedIndex) AddOutPlusEdge(predicate, endpoint Key) bool
returns true if we added an endpoint; false if it was already there
func (*EntityExtendedIndex) DecodeMsg ¶ added in v0.4.1
func (z *EntityExtendedIndex) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*EntityExtendedIndex) EncodeMsg ¶ added in v0.4.1
func (z *EntityExtendedIndex) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*EntityExtendedIndex) MarshalMsg ¶ added in v0.4.1
func (z *EntityExtendedIndex) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*EntityExtendedIndex) Msgsize ¶ added in v0.4.1
func (z *EntityExtendedIndex) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*EntityExtendedIndex) UnmarshalMsg ¶ added in v0.4.1
func (z *EntityExtendedIndex) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Key ¶ added in v0.3.2
type Key [4]byte
func (*Key) MarshalMsg ¶ added in v0.3.2
MarshalMsg implements msgp.Marshaler
type LinkResultMap ¶
func (LinkResultMap) MarshalJSON ¶ added in v0.4.0
func (m LinkResultMap) MarshalJSON() ([]byte, error)
type NamespaceIndex ¶
func (*NamespaceIndex) DecodeMsg ¶
func (z *NamespaceIndex) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (NamespaceIndex) EncodeMsg ¶
func (z NamespaceIndex) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (NamespaceIndex) MarshalMsg ¶
func (z NamespaceIndex) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (NamespaceIndex) Msgsize ¶
func (z NamespaceIndex) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*NamespaceIndex) UnmarshalMsg ¶
func (z *NamespaceIndex) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PredIndex ¶
type PredIndex map[string]*PredicateEntity
func (PredIndex) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type PredicateEntity ¶
type PredicateEntity struct { PK Key `msg:"p"` // note: we have to use string keys to get msgp to work Subjects map[string]map[string]uint32 `msg:"s"` Objects map[string]map[string]uint32 `msg:"o"` }
func NewPredicateEntity ¶
func NewPredicateEntity() *PredicateEntity
func (*PredicateEntity) AddSubjectObject ¶
func (e *PredicateEntity) AddSubjectObject(subject, object Key)
func (*PredicateEntity) DecodeMsg ¶
func (z *PredicateEntity) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PredicateEntity) EncodeMsg ¶
func (z *PredicateEntity) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*PredicateEntity) MarshalMsg ¶
func (z *PredicateEntity) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PredicateEntity) Msgsize ¶
func (z *PredicateEntity) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PredicateEntity) UnmarshalMsg ¶
func (z *PredicateEntity) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type QueryResult ¶
type QueryResult struct { Rows []ResultMap Links []LinkResultMap `msg:"-"` Count int Elapsed time.Duration `msg:"-"` // contains filtered or unexported fields }
func (*QueryResult) DecodeMsg ¶ added in v0.4.1
func (z *QueryResult) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (QueryResult) Dump ¶
func (qr QueryResult) Dump()
func (*QueryResult) EncodeMsg ¶ added in v0.4.1
func (z *QueryResult) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*QueryResult) MarshalMsg ¶ added in v0.4.1
func (z *QueryResult) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*QueryResult) Msgsize ¶ added in v0.4.1
func (z *QueryResult) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*QueryResult) UnmarshalMsg ¶ added in v0.4.1
func (z *QueryResult) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type RelshipIndex ¶
func (*RelshipIndex) DecodeMsg ¶
func (z *RelshipIndex) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (RelshipIndex) EncodeMsg ¶
func (z RelshipIndex) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (RelshipIndex) MarshalMsg ¶
func (z RelshipIndex) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (RelshipIndex) Msgsize ¶
func (z RelshipIndex) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*RelshipIndex) UnmarshalMsg ¶
func (z *RelshipIndex) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ResultMap ¶
func (ResultMap) MarshalMsg ¶ added in v0.4.1
MarshalMsg implements msgp.Marshaler