From 0ea41f5a3a75a7e6d44ac680f2f2b21f1d128e90 Mon Sep 17 00:00:00 2001 From: Therese Magnusson Date: Mon, 13 Dec 2021 10:04:52 +0100 Subject: [PATCH] Remove BRIEF/VERBOSE keywords for SHOW INDEXES/CONSTRAINTS and EXISTS keyword for SHOW CONSTRAINTS --- ...tions-additions-and-compatibility.asciidoc | 83 +++++++++++++++++++ .../docgen/tooling/PrettifierParser.scala | 10 --- .../docgen/tooling/PrettifierParserTest.scala | 11 --- .../docgen/tooling/PrettifierTest.scala | 11 --- 4 files changed, 83 insertions(+), 32 deletions(-) diff --git a/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc b/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc index dad9548cb3d..c9850856c43 100644 --- a/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc +++ b/cypher/cypher-docs/src/docs/dev/deprecations-additions-and-compatibility.asciidoc @@ -10,6 +10,89 @@ New features are added to the language continuously, and occasionally, some feat This section list all of the features that have been removed, deprecated, added, or extended in different Cypher versions. Replacement syntax for deprecated and removed features are also indicated. +[[cypher-deprecations-additions-removals-5.0]] +== Version 5.0 +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +SHOW EXISTS CONSTRAINTS +---- +[source, cypher, role="noheader"] +---- +SHOW NODE EXISTS CONSTRAINTS +---- +[source, cypher, role="noheader"] +---- +SHOW RELATIONSHIP EXISTS CONSTRAINTS +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS +---- +[source, cypher, role="noheader"] +---- +SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS +---- +[source, cypher, role="noheader"] +---- +SHOW REL[ATIONSHIP] [PROPERTY] EXIST[ENCE] CONSTRAINTS +---- + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +SHOW INDEXES BRIEF +---- +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS BRIEF +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW INDEXES +---- +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS +---- + +a| +label:syntax[] +label:removed[] +[source, cypher, role="noheader"] +---- +SHOW INDEXES VERBOSE +---- +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS VERBOSE +---- +a| +Replaced by: +[source, cypher, role="noheader"] +---- +SHOW INDEXES YIELD * +---- +[source, cypher, role="noheader"] +---- +SHOW CONSTRAINTS YIELD * +---- + +|=== + [[cypher-deprecations-additions-removals-4.4]] == Version 4.4 [cols="2", options="header"] diff --git a/cypher/cypher-prettifier/src/main/scala/org/neo4j/cypher/docgen/tooling/PrettifierParser.scala b/cypher/cypher-prettifier/src/main/scala/org/neo4j/cypher/docgen/tooling/PrettifierParser.scala index fe1239ac52c..8639eae5edb 100644 --- a/cypher/cypher-prettifier/src/main/scala/org/neo4j/cypher/docgen/tooling/PrettifierParser.scala +++ b/cypher/cypher-prettifier/src/main/scala/org/neo4j/cypher/docgen/tooling/PrettifierParser.scala @@ -93,10 +93,6 @@ class PrettifierParser(val keepMyNewlines: Boolean) extends Parser with Base wit keyword("FOR") | keyword("IF NOT EXISTS") | keyword("IF EXISTS") | - keyword("BRIEF OUTPUT") | - keyword("BRIEF") | - keyword("VERBOSE OUTPUT") | - keyword("VERBOSE") | keyword("OPTIONS") | keyword("EACH") ) ~> NonBreakingKeywords @@ -160,8 +156,6 @@ class PrettifierParser(val keepMyNewlines: Boolean) extends Parser with Base wit keyword("SHOW NODE KEY CONSTRAINTS") | keyword("SHOW NODE EXIST CONSTRAINT") | keyword("SHOW NODE EXIST CONSTRAINTS") | - keyword("SHOW NODE EXISTS CONSTRAINT") | - keyword("SHOW NODE EXISTS CONSTRAINTS") | keyword("SHOW NODE EXISTENCE CONSTRAINT") | keyword("SHOW NODE EXISTENCE CONSTRAINTS") | keyword("SHOW NODE PROPERTY EXIST CONSTRAINT") | @@ -170,8 +164,6 @@ class PrettifierParser(val keepMyNewlines: Boolean) extends Parser with Base wit keyword("SHOW NODE PROPERTY EXISTENCE CONSTRAINTS") | keyword("SHOW RELATIONSHIP EXIST CONSTRAINT") | keyword("SHOW RELATIONSHIP EXIST CONSTRAINTS") | - keyword("SHOW RELATIONSHIP EXISTS CONSTRAINT") | - keyword("SHOW RELATIONSHIP EXISTS CONSTRAINTS") | keyword("SHOW RELATIONSHIP EXISTENCE CONSTRAINT") | keyword("SHOW RELATIONSHIP EXISTENCE CONSTRAINTS") | keyword("SHOW RELATIONSHIP PROPERTY EXIST CONSTRAINT") | @@ -188,8 +180,6 @@ class PrettifierParser(val keepMyNewlines: Boolean) extends Parser with Base wit keyword("SHOW REL PROPERTY EXISTENCE CONSTRAINTS") | keyword("SHOW EXIST CONSTRAINT") | keyword("SHOW EXIST CONSTRAINTS") | - keyword("SHOW EXISTS CONSTRAINT") | - keyword("SHOW EXISTS CONSTRAINTS") | keyword("SHOW EXISTENCE CONSTRAINT") | keyword("SHOW EXISTENCE CONSTRAINTS") | keyword("SHOW PROPERTY EXIST CONSTRAINT") | diff --git a/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierParserTest.scala b/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierParserTest.scala index 4ee3c47a998..fbfbf0219f6 100644 --- a/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierParserTest.scala +++ b/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierParserTest.scala @@ -130,14 +130,6 @@ class PrettifierParserTest extends ParserTestBase[Seq[SyntaxToken], Seq[SyntaxTo ("show constraint yield *", Seq(BreakingKeywords("show constraint"), NonBreakingKeywords("yield"), AnyText("*"))), ("show constraint where type = 'UNIQUE'", Seq(BreakingKeywords("show constraint"), BreakingKeywords("where"), AnyText("type"), AnyText("="), EscapedText("UNIQUE", '\''))), - - // deprecated - - ("show constraints brief output", Seq(BreakingKeywords("show constraints"), NonBreakingKeywords("brief output"))), - ("show constraints verbose", Seq(BreakingKeywords("show constraints"), NonBreakingKeywords("verbose"))), - ("show exists constraint", Seq(BreakingKeywords("show exists constraint"))), - ("show node exists constraint", Seq(BreakingKeywords("show node exists constraint"))), - ("show relationship exists constraint", Seq(BreakingKeywords("show relationship exists constraint"))), ).foreach { case (query, result) => // when then parsing(query) shouldGive result @@ -220,9 +212,6 @@ class PrettifierParserTest extends ParserTestBase[Seq[SyntaxToken], Seq[SyntaxTo ("show lookup index", Seq(BreakingKeywords("show lookup index"))), ("show index yield *", Seq(BreakingKeywords("show index"), NonBreakingKeywords("yield"), AnyText("*"))), ("show index where type = 'BTREE'", Seq(BreakingKeywords("show index"), BreakingKeywords("where"), AnyText("type"), AnyText("="), EscapedText("BTREE", '\''))), - // deprecated - ("show indexes brief", Seq(BreakingKeywords("show indexes"), NonBreakingKeywords("brief"))), - ("show btree index verbose output", Seq(BreakingKeywords("show btree index"), NonBreakingKeywords("verbose output"))), ).foreach { case (query, result) => // when then parsing(query) shouldGive result diff --git a/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierTest.scala b/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierTest.scala index 7ed1077e94c..c7f1db7d065 100644 --- a/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierTest.scala +++ b/cypher/cypher-prettifier/src/test/scala/org/neo4j/cypher/docgen/tooling/PrettifierTest.scala @@ -87,9 +87,6 @@ class PrettifierTest extends Suite actual("show btree index yield *") should equal(expected("SHOW BTREE INDEX YIELD *")) actual("show fulltext indexes") should equal(expected("SHOW FULLTEXT INDEXES")) actual("show lookup indexes") should equal(expected("SHOW LOOKUP INDEXES")) - // deprecated - actual("show all indexes brief output") should equal(expected("SHOW ALL INDEXES BRIEF OUTPUT")) - actual("show btree index verbose") should equal(expected("SHOW BTREE INDEX VERBOSE")) } test("may break SHOW INDEXES with WHERE") { @@ -199,14 +196,6 @@ class PrettifierTest extends Suite actual("show rel property existence constraints") should equal(expected("SHOW REL PROPERTY EXISTENCE CONSTRAINTS")) actual("show constraint yield *") should equal(expected("SHOW CONSTRAINT YIELD *")) - - // deprecated - - actual("show constraints brief") should equal(expected("SHOW CONSTRAINTS BRIEF")) - actual("show constraints verbose output") should equal(expected("SHOW CONSTRAINTS VERBOSE OUTPUT")) - actual("show exists constraint") should equal(expected("SHOW EXISTS CONSTRAINT")) - actual("show node exists constraint") should equal(expected("SHOW NODE EXISTS CONSTRAINT")) - actual("show relationship exists constraint") should equal(expected("SHOW RELATIONSHIP EXISTS CONSTRAINT")) } test("may break SHOW CONSTRAINTS with WHERE") {