Documentation ¶
Overview ¶
this file contains the set of query operators generated by the query planner
Index ¶
- Constants
- Variables
- type DB
- 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 HodDB
- func (hod *HodDB) Close()
- func (hod *HodDB) Databases() []string
- func (hod *HodDB) QueryToClassDOT(q string) (string, error)
- func (hod *HodDB) QueryToDOT(q string) (string, error)
- func (hod *HodDB) RunQuery(q *sparql.Query) (QueryResult, error)
- func (hod *HodDB) RunQueryString(querystring string) (result QueryResult, err error)
- func (hod *HodDB) Search(q string, n int) ([]string, 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 (k Key) LessThan(other Key) 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) bool
- 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 *HodDB, 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 Relation
- type RelshipIndex
- type ResultMap
- type ResultRow
- type Row
Constants ¶
const ( RESOLVED = "RESOLVED" UNRESOLVED = "" )
const ( RDF_NAMESPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns" OWL_NAMESPACE = "http://www.w3.org/2002/07/owl" )
const BTREE_DEGREE = 8
Variables ¶
var ( INVERSEOF = turtle.URI{ Namespace: OWL_NAMESPACE, Value: "inverseOf", } )
Functions ¶
This section is empty.
Types ¶
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 HodDB ¶ added in v0.6.0
func NewHodDB ¶ added in v0.6.0
Creates or loads a new instance of HodDB from the provided config file. If any of the Turtle source files in the "buildings" section have changed, HodDB will load them anew.
func (*HodDB) QueryToClassDOT ¶ added in v0.6.0
Turn the results of the query into a GraphViz visualization of the classes and their relationships
func (*HodDB) QueryToDOT ¶ added in v0.6.0
Turn the results of the query into a GraphViz visualization of the results
func (*HodDB) RunQuery ¶ added in v0.6.0
func (hod *HodDB) RunQuery(q *sparql.Query) (QueryResult, error)
Execute a parsed query against HodDB
func (*HodDB) RunQueryString ¶ added in v0.6.0
func (hod *HodDB) RunQueryString(querystring string) (result QueryResult, err error)
Execute the provided query against HodDB
type Key ¶ added in v0.3.2
type Key [8]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) bool
adds subject/object to Predicate index entry. Returns true if this changed the entity
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 Count int Elapsed time.Duration Errors []string // 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 Relation ¶ added in v0.5.2
type Relation struct {
// contains filtered or unexported fields
}
func NewRelation ¶ added in v0.5.2
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