Documentation ¶
Overview ¶
ograph is a graph database that uses postgresql as the backend store.
each node have a list of attributes (encoded as JSON), a unique name, and a list of relations
relations can also have attributes, all relations are directed, have a name and two endpoints.
Copyright (c) 2014 André Luiz Alves Moraes ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
Constants ¶
const ( // ErrNotFound: Unable to find a Node or Relation in the graph ErrNotFound = ApiError("not found") // ErrInvalidEncoding: The attributes of a node aren't encoded as utf-8 objects ErrInvalidEncoding = ApiError("attributes must be a utf-8 encoded json") ErrAbortedByUser = ApiError("user aborted the transaction") // A Invalid Node id InvalidNid = Nid(0) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
Gid Nid
}
Identity is used to allow other apis to refer to a given node for later use.
type Node ¶
type Node struct { Attributes Attributes Gid Nid Name string }
A node in the object graph
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
A query used to walk the graph
type Relation ¶
type Relation struct { From *Node To *Node Name string Attributes Attributes }
A connection between two nodes
type RelationSet ¶
type RelationSet []*Relation