clauses

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constraint

type Constraint struct{}

Constraint is a clause generating a Constraint statement, ensuring uniqueness among properties for given relationship types or node labels.

func (*Constraint) Generate

func (c *Constraint) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for Constraint

type ConstraintProperty

type ConstraintProperty struct {
	VarName string
}

A ConstraintProperty is a single property over which the constraint is set.

func (*ConstraintProperty) Generate

func (c *ConstraintProperty) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for ConstraintProperty

func (ConstraintProperty) TemplateString

func (c ConstraintProperty) TemplateString() string

TemplateString for ConstraintProperty

type ConstraintPropertyChain

type ConstraintPropertyChain struct {
	VarName string
	// contains filtered or unexported fields
}

ConstraintPropertyChain represents a chain of properties over which the constraints are set.

func (*ConstraintPropertyChain) Generate

func (c *ConstraintPropertyChain) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for ConstraintPropertyChain

func (ConstraintPropertyChain) TemplateString

func (c ConstraintPropertyChain) TemplateString() string

TemplateString for ConstraintPropertyChain

type DropIndex

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

DropIndex represents the statement dropping an existing index.

func (*DropIndex) Generate

func (c *DropIndex) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for DropIndex

func (DropIndex) TemplateString

func (c DropIndex) TemplateString() string

TemplateString for DropIndex

type Index

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

Index is the Neo4j implementation for creating or dropping a database index as well as for creating constraints on properties.

func (*Index) Generate

func (c *Index) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for Index

func (Index) TemplateString

func (c Index) TemplateString() string

TemplateString for Index

func (*Index) Transform

func (c *Index) Transform(seed *seed.Seed, s *schema.Schema, subclauses []translator.Clause) translator.Clause

Transform an Index to an equivalent by having it evaluate in a (semantically) empty query. Creating an index only has an impact on query performance, not its result. Thus, omitting the index creation should have no effect on the query's outcome.

type IndexOnLabels

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

IndexOnLabels generates an index that indexes on labels. Applicable for index types: lookup

func (*IndexOnLabels) Generate

func (c *IndexOnLabels) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for IndexOnLabels

func (IndexOnLabels) TemplateString

func (c IndexOnLabels) TemplateString() string

TemplateString for IndexOnLabels

type IndexOnProperties

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

IndexOnProperties generates an index that indexes multiple properties. Applicable for index types: range

func (*IndexOnProperties) Generate

func (c *IndexOnProperties) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for IndexOnProperties

func (IndexOnProperties) TemplateString

func (c IndexOnProperties) TemplateString() string

TemplateString for IndexOnProperties

type IndexOnPropertiesProperties

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

IndexOnPropertiesProperties represents the properties on which the IndexOnProperties generates the index

func (*IndexOnPropertiesProperties) Generate

Generate subclauses for IndexOnPropertiesProperties

func (IndexOnPropertiesProperties) TemplateString

func (c IndexOnPropertiesProperties) TemplateString() string

TemplateString for IndexOnPropertiesProperties

type IndexOnProperty

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

IndexOnProperty generates an index that only indexes on a single property. Applicable for index types: text, point

func (*IndexOnProperty) Generate

func (c *IndexOnProperty) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for IndexOnProperty

func (IndexOnProperty) TemplateString

func (c IndexOnProperty) TemplateString() string

TemplateString for IndexOnProperty

type NodeConstraint

type NodeConstraint struct{}

NodeConstraint creates a UNIQUE constraint on nodes.

func (*NodeConstraint) Generate

func (c *NodeConstraint) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for NodeConstraint

func (*NodeConstraint) TemplateString

func (c *NodeConstraint) TemplateString() string

TemplateString for NodeConstraint

type RelationshipConstraint

type RelationshipConstraint struct{}

RelationshipConstraint creates a UNIQUE constraint on relationships.

func (*RelationshipConstraint) Generate

func (c *RelationshipConstraint) Generate(seed *seed.Seed, s *schema.Schema) []translator.Clause

Generate subclauses for RelationshipConstraint

func (*RelationshipConstraint) TemplateString

func (c *RelationshipConstraint) TemplateString() string

TemplateString for RelationshipConstraint

Jump to

Keyboard shortcuts

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