Documentation ¶
Index ¶
- type Catalog
- func (c *Catalog) Apply(patch *Patch)
- func (c *Catalog) Graph(name string) *Graph
- func (c *Catalog) GraphByID(id int64) *Graph
- func (c *Catalog) Graphs() []*Graph
- func (c *Catalog) Label(graphName, labelName string) *Label
- func (c *Catalog) LabelByID(graphID, labelID int64) *Label
- func (c *Catalog) Labels(graphName string) []*Label
- func (c *Catalog) MDLock()
- func (c *Catalog) MDUnlock()
- type Graph
- func (g *Graph) CreateLabel(labelInfo *model.LabelInfo)
- func (g *Graph) CreateProperty(propertyInfo *model.PropertyInfo)
- func (g *Graph) DropLabel(labelInfo *model.LabelInfo)
- func (g *Graph) DropProperty(propertyInfo *model.PropertyInfo)
- func (g *Graph) Index(name string) *Index
- func (g *Graph) IndexByID(id int64) *Index
- func (g *Graph) Indexes() []*Index
- func (g *Graph) Label(name string) *Label
- func (g *Graph) LabelByID(id int64) *Label
- func (g *Graph) Labels() []*Label
- func (g *Graph) MDLock()
- func (g *Graph) MDUnlock()
- func (g *Graph) Meta() *model.GraphInfo
- func (g *Graph) Properties() []*model.PropertyInfo
- func (g *Graph) Property(name string) *model.PropertyInfo
- func (g *Graph) PropertyByID(id uint16) *model.PropertyInfo
- func (g *Graph) SetNextPropID(propID uint16)
- type Index
- type Label
- type Patch
- type PatchLabel
- type PatchProperties
- type PatchType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog maintains the catalog of graphs and label information.
func (*Catalog) Apply ¶
Apply applies the patch to catalog. Note: we need to ensure the DDL changes have applied to persistent storage first.
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph represents a runtime graph object.
func (*Graph) CreateLabel ¶
CreateLabel create a new label and append to the graph labels list.
func (*Graph) CreateProperty ¶
func (g *Graph) CreateProperty(propertyInfo *model.PropertyInfo)
CreateProperty create a new property and append to the graph properties list.
func (*Graph) DropProperty ¶
func (g *Graph) DropProperty(propertyInfo *model.PropertyInfo)
DropProperty removes specified property from graph.
func (*Graph) MDUnlock ¶
func (g *Graph) MDUnlock()
MDUnlock unlocks the metadata of the current graph.
func (*Graph) Properties ¶
func (g *Graph) Properties() []*model.PropertyInfo
Properties returns the Properties.
func (*Graph) Property ¶
func (g *Graph) Property(name string) *model.PropertyInfo
Property returns the property of specified name.
func (*Graph) PropertyByID ¶
func (g *Graph) PropertyByID(id uint16) *model.PropertyInfo
PropertyByID returns the property of specified ID.
func (*Graph) SetNextPropID ¶
SetNextPropID sets the next property id.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents a runtime index object.
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
Label represents a runtime label object.
type Patch ¶
type Patch struct { Type PatchType Data interface{} }
Patch represents patch which contains a DDL change.
type PatchLabel ¶
PatchLabel represents the payload of patching create/drop label DDL.
type PatchProperties ¶
type PatchProperties struct { MaxPropID uint16 GraphID int64 Properties []*model.PropertyInfo }
PatchProperties represents the payload of patching create properties