Skip to content

Conversation

@jblotus
Copy link

@jblotus jblotus commented Jun 29, 2021

When creating a Node you can specify a predicate via withQueryPredicate()
or optional constructor parameter. When not specified the default predicate
is MATCH.

When creating an edge, you can use the Edge::create() or
Edge::merge() methods to determine the strategy.

When creating a Node you can specify a predicate via withQueryPredicate()
or optional constructor parameter. When not specified the default predicate
is MATCH.

When creating an edge, you can use the Edge::create() or
Edge::merge() methods to determine the strategy.
$graph->addEdge($edge);
$query = $graph->getCommitQueryWithMerge();
$this->assertEquals(
'MATCH (CatOwner:person {name: "John Doe", age: 33, gender: "male", status: "single"}) ' .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notice the match match merge here

$content = ob_get_clean();
echo $content;
$expectedLines = <<<EOT
-----------------------------------------
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests were a little tricky to update but I'm glad they are here!

return (int) $propValue;
}

public function getQueryPredicate(): string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bit is important that i set it to default to MATCH to preserve existing behavior

@mkorkmaz
Copy link
Owner

I'll try to review this in a couple of days. I have ideas that can be applied after this PR.

@jblotus
Copy link
Author

jblotus commented Jun 29, 2021

No rush please - this is merely some ideas I had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants