Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions regress/expected/analyze.out
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SELECT * FROM cypher('analyze', $$ $$) AS (result agtype);
ERROR: syntax error at end of input
LINE 1: SELECT * FROM cypher('analyze', $$ $$) AS (result agtype);
^
-- should return false due to invalid input to age_prepare_function
-- age_prepare_cypher is a compatibility stub and must not affect cypher()
SELECT * FROM age_prepare_cypher(NULL, NULL);
age_prepare_cypher
--------------------
Expand All @@ -79,46 +79,40 @@ SELECT * FROM age_prepare_cypher(NULL, '');
f
(1 row)

-- should return true but cypher should fail
SELECT * FROM age_prepare_cypher('analyze', '');
age_prepare_cypher
--------------------
t
f
(1 row)

SELECT * FROM cypher(NULL, NULL) AS (result agtype);
ERROR: syntax error at end of input
ERROR: a name constant is expected
LINE 1: SELECT * FROM cypher(NULL, NULL) AS (result agtype);
^
-- should return true and execute cypher command
^
SELECT * FROM age_prepare_cypher('analyze', 'MATCH (u) RETURN (u)');
age_prepare_cypher
--------------------
t
f
(1 row)

SELECT * FROM cypher(NULL, NULL) AS (result agtype);
result
----------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {}}::vertex
(1 row)

-- should error due to invalid input to cypher function
ERROR: a name constant is expected
LINE 1: SELECT * FROM cypher(NULL, NULL) AS (result agtype);
^
SELECT * FROM cypher(NULL, NULL) AS (result agtype);
ERROR: a name constant is expected
LINE 1: SELECT * FROM cypher(NULL, NULL) AS (result agtype);
^
-- should return true but cypher should fail
SELECT * FROM age_prepare_cypher('analyze', '$$ $$');
age_prepare_cypher
--------------------
t
f
(1 row)

SELECT * FROM cypher(NULL, NULL) AS (result agtype);
ERROR: unexpected character at or near "$"
ERROR: a name constant is expected
LINE 1: SELECT * FROM cypher(NULL, NULL) AS (result agtype);
^
^
-- should return errors
SELECT * FROM cypher() AS (result agtype);
ERROR: cypher function requires a minimum of 2 arguments
Expand Down
613 changes: 613 additions & 0 deletions regress/expected/cypher_vle.out

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions regress/sql/analyze.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,15 @@ SELECT * FROM cypher('analyze', '') AS (result agtype);
-- should error due to bad cypher statement
SELECT * FROM cypher('analyze', $$ $$) AS (result agtype);

-- should return false due to invalid input to age_prepare_function
-- age_prepare_cypher is a compatibility stub and must not affect cypher()
SELECT * FROM age_prepare_cypher(NULL, NULL);
SELECT * FROM age_prepare_cypher('analyze', NULL);
SELECT * FROM age_prepare_cypher(NULL, '');
-- should return true but cypher should fail
SELECT * FROM age_prepare_cypher('analyze', '');
SELECT * FROM cypher(NULL, NULL) AS (result agtype);
-- should return true and execute cypher command
SELECT * FROM age_prepare_cypher('analyze', 'MATCH (u) RETURN (u)');
SELECT * FROM cypher(NULL, NULL) AS (result agtype);
-- should error due to invalid input to cypher function
SELECT * FROM cypher(NULL, NULL) AS (result agtype);
-- should return true but cypher should fail
SELECT * FROM age_prepare_cypher('analyze', '$$ $$');
SELECT * FROM cypher(NULL, NULL) AS (result agtype);

Expand Down
120 changes: 120 additions & 0 deletions regress/sql/cypher_vle.sql

Large diffs are not rendered by default.

Loading
Loading