Skip to content

Commit c111a5f

Browse files
committed
reorganized the page to accommodate Cypher 25 syntax
1 parent 8a41dfb commit c111a5f

File tree

1 file changed

+106
-8
lines changed

1 file changed

+106
-8
lines changed

modules/ROOT/pages/database-administration/syntax.adoc

Lines changed: 106 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ REQUIRE n.propertyName IS NOT NULL
7878
[[administration-syntax-database-management]]
7979
== Database management command syntax
8080

81-
The below table covers both standard and composite databases.
81+
The following tables cover both standard and composite databases.
82+
83+
=== Show databases
8284

8385
[options="header", width="100%", cols="1m,5a"]
8486
|===
@@ -99,12 +101,35 @@ YIELD { * \| field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]
99101
[WHERE expression]
100102
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
101103
----
104+
|===
105+
106+
=== Create a database
107+
108+
[options="header", width="100%", cols="2m,4a,4a"]
109+
|===
110+
| Command | Syntax Cypher 5 | Syntax Cypher 25
102111

103112
| CREATE DATABASE
104113
|
105114
[source, syntax, role="noheader"]
106115
----
107116
CREATE DATABASE name [IF NOT EXISTS]
117+
[TOPOLOGY n PRIMAR{Y\|IES} [m SECONDAR{Y\|IES}]]
118+
[OPTIONS "{" option: value[, ...] "}"]
119+
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
120+
----
121+
122+
[source, syntax, role="noheader"]
123+
----
124+
CREATE OR REPLACE DATABASE name
125+
[TOPOLOGY n PRIMAR{Y\|IES} [m SECONDAR{Y\|IES}]]
126+
[OPTIONS "{" option: value[, ...] "}"]
127+
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
128+
----
129+
|
130+
[source, syntax, role="noheader"]
131+
----
132+
CREATE DATABASE name [IF NOT EXISTS]
108133
[[SET] TOPOLOGY n PRIMAR{Y\|IES} [m SECONDAR{Y\|IES}]]
109134
[OPTIONS "{" option: value[, ...] "}"]
110135
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
@@ -117,6 +142,13 @@ CREATE OR REPLACE DATABASE name
117142
[OPTIONS "{" option: value[, ...] "}"]
118143
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
119144
----
145+
|===
146+
147+
=== Create a composite database
148+
149+
[options="header", width="100%", cols="2m,4a"]
150+
|===
151+
| Command | Syntax
120152

121153
| CREATE COMPOSITE DATABASE
122154
|
@@ -133,6 +165,13 @@ CREATE OR REPLACE COMPOSITE DATABASE name
133165
[OPTIONS "{" "}"]
134166
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
135167
----
168+
|===
169+
170+
=== Alter a database
171+
172+
[options="header", width="100%", cols="1m,5a"]
173+
|===
174+
| Command | Syntax
136175

137176
| ALTER DATABASE
138177
|
@@ -158,21 +197,41 @@ REMOVE OPTION option
158197
====
159198
There can be multiple `SET OPTION` or `REMOVE OPTION` clauses for different option keys.
160199
====
200+
|===
201+
202+
=== Stop a database
161203

204+
[options="header", width="100%", cols="1m,5a"]
205+
|===
206+
| Command | Syntax
162207

163208
| STOP DATABASE
164209
|
165210
[source, syntax, role="noheader"]
166211
----
167212
STOP DATABASE name [WAIT [n [SEC[OND[S]]]]\|NOWAIT]
168213
----
214+
|===
215+
216+
=== Start a database
217+
218+
[options="header", width="100%", cols="1m,5a"]
219+
|===
220+
| Command | Syntax
169221

170222
| START DATABASE
171223
|
172224
[source, syntax, role="noheader"]
173225
----
174226
START DATABASE name [WAIT [n [SEC[OND[S]]]]\|NOWAIT]
175227
----
228+
|===
229+
230+
=== Delete a database
231+
232+
[options="header", width="100%", cols="1m,5a"]
233+
|===
234+
| Command | Syntax
176235

177236
| DROP DATABASE
178237
|
@@ -186,10 +245,14 @@ DROP [COMPOSITE] DATABASE name [IF EXISTS] [RESTRICT \| CASCADE ALIAS[ES]] [{DUM
186245
[[administration-syntax-database-alias-management]]
187246
== Database alias management command syntax
188247

189-
[options="header", width="100%", cols="1,5a"]
248+
The following tables cover both local and remote database aliases.
249+
250+
=== Show aliases
251+
252+
[options="header", width="100%", cols="1m,5a"]
190253
|===
191254
| Command | Syntax
192-
| Show Database Alias
255+
| SHOW ALIAS
193256
|
194257
[source, syntax, role=noheader]
195258
-----
@@ -204,8 +267,15 @@ YIELD { * \| field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]
204267
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
205268
-----
206269
Lists both local and remote database aliases, optionally filtered on the alias name.
270+
|===
271+
272+
=== Create a local alias
273+
274+
[options="header", width="100%", cols="1m,5a"]
275+
|===
276+
| Command | Syntax
207277

208-
| Create Local Alias
278+
| CREATE ALIAS
209279
|
210280
[source, syntax, role=noheader]
211281
-----
@@ -217,8 +287,15 @@ CREATE ALIAS name [IF NOT EXISTS] FOR DATABASE targetName
217287
CREATE OR REPLACE ALIAS name FOR DATABASE targetName
218288
[PROPERTIES "{" key: value[, ...] "}"]
219289
-----
290+
|===
291+
292+
=== Create a remote alias
293+
294+
[options="header", width="100%", cols="1m,5a"]
295+
|===
296+
| Command | Syntax
220297

221-
| Create Remote Alias
298+
| CREATE ALIAS
222299
|
223300
[source, syntax, role=noheader]
224301
-----
@@ -234,17 +311,30 @@ AT 'url' USER username PASSWORD 'password'
234311
[DRIVER "{" setting: value[, ...] "}"]
235312
[PROPERTIES "{" key: value[, ...] "}"]
236313
-----
314+
|===
315+
316+
=== Alter a local alias
317+
318+
[options="header", width="100%", cols="1m,5a"]
319+
|===
320+
| Command | Syntax
237321

238-
| Alter Local Alias
322+
|ALTER ALIAS
239323
|
240324
[source, syntax, role=noheader]
241325
-----
242326
ALTER ALIAS name [IF EXISTS] SET DATABASE
243327
[TARGET targetName]
244328
[PROPERTIES "{" key: value[, ...] "}"]
245329
-----
330+
|===
331+
332+
=== Alter a remote alias
246333

247-
| Alter Remote Alias
334+
[options="header", width="100%", cols="1m,5a"]
335+
|===
336+
| Command | Syntax
337+
|ALTER ALIAS
248338
|
249339
[source, syntax, role=noheader]
250340
-----
@@ -256,7 +346,15 @@ ALTER ALIAS name [IF EXISTS] SET DATABASE
256346
[PROPERTIES "{" key: value[, ...] "}"]
257347
-----
258348

259-
| Drop Alias
349+
|===
350+
351+
=== Delete an alias
352+
353+
[options="header", width="100%", cols="1m,5a"]
354+
|===
355+
| Command | Syntax
356+
357+
| DROP ALIAS
260358
|
261359
[source, syntax, role=noheader]
262360
-----

0 commit comments

Comments
 (0)