modifiers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package modifiers provides executors for Cypher data modification clauses including SET, DELETE, and REMOVE operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modifier

type Modifier struct {
	Store   *storage.DB
	Matcher *matchers.Matcher
	// contains filtered or unexported fields
}

Modifier executes data modification clauses (SET, DELETE, REMOVE). It coordinates with the Matcher to find existing graph elements to modify.

func NewModifier

func NewModifier(store *storage.DB, matcher *matchers.Matcher) *Modifier

NewModifier creates a new Modifier instance with the given storage and matcher.

func (*Modifier) ExecuteDelete

func (m *Modifier) ExecuteDelete(t *tx.Transaction, clause *ast.DeleteClause, varVars map[string]interface{}, params map[string]interface{}) (affectedNodes, affectedRels int, err error)

ExecuteDelete executes a DELETE clause to remove nodes and relationships. If Detach is true, it also removes all relationships connected to deleted nodes. It returns the count of affected nodes and relationships.

func (*Modifier) ExecuteRemove

func (m *Modifier) ExecuteRemove(t *tx.Transaction, clause *ast.RemoveClause, varVars map[string]interface{}, params map[string]interface{}) (affectedNodes int, err error)

ExecuteRemove executes a REMOVE clause to remove labels or properties from nodes. It returns the count of affected nodes.

func (*Modifier) ExecuteSet

func (m *Modifier) ExecuteSet(t *tx.Transaction, clause *ast.SetClause, varVars map[string]interface{}, params map[string]interface{}) (affectedNodes int, err error)

ExecuteSet executes a SET clause to update node properties. It returns the count of affected nodes.

Jump to

Keyboard shortcuts

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