Skip to content

Commit a98bc35

Browse files
authored
[NOID] Add apoc.cypher.runFile(s) procedures with READ mode version (#3950) (#3980)
* [NOID] Add apoc.cypher.runFile(s) procedures with READ mode version (#3950) * Add apoc.cypher.runFile(s) procedures with READ mode version * fixed CI tests * changes review: renamed runReadFile* to runFile*ReadOnly, added column fileName, updated CypherExtended.collectError method the collectError method had a message `error in file: fileName`, now is not needed since we have the column `fileName` * [NOID] fix compile errors and code formatting * [NOID] fix compile error and code formatting * [NOID] fix test errors and formatting
1 parent 1c03583 commit a98bc35

23 files changed

+376
-58
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
¦xref::overview/apoc.cypher/apoc.cypher.runFileReadOnly.adoc[apoc.cypher.runFileReadOnly icon:book[]] +
2+
3+
`apoc.cypher.runFileReadOnly(file or url,[{timeout:10,parameters:{}}])` - runs each `READ` statement in the file, all semicolon separated
4+
¦label:procedure[]
5+
¦label:apoc-extended[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
¦xref::overview/apoc.cypher/apoc.cypher.runFilesReadOnly.adoc[apoc.cypher.runFilesReadOnly icon:book[]] +
2+
3+
`apoc.cypher.runFilesReadOnly([files or urls],[{timeout:10,parameters:{}}]))` - runs each `READ` statement in the files, all semicolon separated
4+
¦label:procedure[]
5+
¦label:apoc-extended[]

docs/asciidoc/modules/ROOT/pages/cypher-execution/run-cypher-scripts.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ The available procedures and functions are described in the following table:
1818
[separator=¦,opts=header,cols="5,1m,1m"]
1919
|===
2020
¦Qualified Name¦Type¦Release
21+
include::example$generated-documentation/apoc.cypher.runFileReadOnly.adoc[]
22+
include::example$generated-documentation/apoc.cypher.runFilesReadOnly.adoc[]
2123
include::example$generated-documentation/apoc.cypher.runFile.adoc[]
2224
include::example$generated-documentation/apoc.cypher.runFiles.adoc[]
2325
include::example$generated-documentation/apoc.cypher.runSchemaFile.adoc[]
2426
include::example$generated-documentation/apoc.cypher.runSchemaFiles.adoc[]
2527
|===
2628

2729

30+
[[run-cypher-scripts-read-operations]]
31+
== Read Operations only
32+
* `apoc.cypher.runFileReadOnly(file or url,[\{config}])`
33+
* `apoc.cypher.runFilesReadOnly([files or urls],[\{config})])`
34+
35+
2836
[[run-cypher-scripts-data-operations]]
2937
== Data Operations only
3038

docs/asciidoc/modules/ROOT/pages/overview/apoc.cypher/apoc.cypher.runFile.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) -
1414

1515
[source]
1616
----
17-
apoc.cypher.runFile(file :: STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?)
17+
apoc.cypher.runFile(file :: STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
1818
----
1919

2020
== Input parameters
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
= apoc.cypher.runFileReadOnly
2+
:description: This section contains reference documentation for the apoc.cypher.runFileReadOnly procedure.
3+
4+
label:procedure[] label:apoc-extended[]
5+
6+
[.emphasis]
7+
apoc.cypher.runFileReadOnly(file or url,[{statistics:true,timeout:10,parameters:{}}]) - runs each `READ` statement in the file, all semicolon separated - currently no schema operations
8+
9+
== Signature
10+
11+
[source]
12+
----
13+
apoc.cypher.runFileReadOnly(file :: STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
14+
----
15+
16+
== Input parameters
17+
[.procedures, opts=header]
18+
|===
19+
|Name|Type|Default
20+
|file|STRING?|null
21+
|config|MAP?|{}
22+
|===
23+
24+
== Config parameters
25+
include::partial$usage/config/apoc.cypher.runExtended.adoc[]
26+
27+
== Output parameters
28+
[.procedures, opts=header]
29+
|===
30+
|Name|Type
31+
|row|INTEGER?
32+
|result|MAP?
33+
|===
34+
35+
== Reading from a file
36+
include::../../import/includes/enableFileImport.adoc[]
37+
38+
[[usage-apoc.cypher.runFileReadOnly]]
39+
== Usage Examples
40+
include::partial$usage/apoc.cypher.runFileReadOnly.adoc[]
41+
42+
xref::cypher-execution/index.adoc[More documentation of apoc.cypher.runFileReadOnly,role=more information]

docs/asciidoc/modules/ROOT/pages/overview/apoc.cypher/apoc.cypher.runFiles.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}
1414

1515
[source]
1616
----
17-
apoc.cypher.runFiles(file :: LIST? OF STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?)
17+
apoc.cypher.runFiles(file :: LIST? OF STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
1818
----
1919

2020
== Input parameters
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
= apoc.cypher.runFilesReadOnly
2+
:description: This section contains reference documentation for the apoc.cypher.runFilesReadOnly procedure.
3+
4+
label:procedure[] label:apoc-extended[]
5+
6+
[.emphasis]
7+
apoc.cypher.runFilesReadOnly([files or urls],[{timeout:10,parameters:{}}])) - runs each `READ` statement in the files, all semicolon separated
8+
9+
== Signature
10+
11+
[source]
12+
----
13+
apoc.cypher.runFilesReadOnly(file :: LIST? OF STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
14+
----
15+
16+
== Input parameters
17+
[.procedures, opts=header]
18+
|===
19+
|Name|Type|Default
20+
|file|LIST? OF STRING?|null
21+
|config|MAP?|{}
22+
|===
23+
24+
== Config parameters
25+
include::partial$usage/config/apoc.cypher.runExtended.adoc[]
26+
27+
== Output parameters
28+
[.procedures, opts=header]
29+
|===
30+
|Name|Type
31+
|row|INTEGER?
32+
|result|MAP?
33+
|===
34+
35+
== Reading from a file
36+
include::../../import/includes/enableFileImport.adoc[]
37+
38+
[[usage-apoc.cypher.runFilesReadOnly]]
39+
== Usage Examples
40+
include::partial$usage/apoc.cypher.runFilesReadOnly.adoc[]
41+
42+
xref::cypher-execution/index.adoc[More documentation of apoc.cypher.runFilesReadOnly,role=more information]
43+

docs/asciidoc/modules/ROOT/pages/overview/apoc.cypher/apoc.cypher.runSchemaFile.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ apoc.cypher.runSchemaFile(file or url,[{statistics:true,timeout:10}]) - allows o
1414

1515
[source]
1616
----
17-
apoc.cypher.runSchemaFile(file :: STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?)
17+
apoc.cypher.runSchemaFile(file :: STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
1818
----
1919

2020
== Input parameters

docs/asciidoc/modules/ROOT/pages/overview/apoc.cypher/apoc.cypher.runSchemaFiles.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ apoc.cypher.runSchemaFiles([files or urls],{statistics:true,timeout:10}) - allow
1414

1515
[source]
1616
----
17-
apoc.cypher.runSchemaFiles(file :: LIST? OF STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?)
17+
apoc.cypher.runSchemaFiles(file :: LIST? OF STRING?, config = {} :: MAP?) :: (row :: INTEGER?, result :: MAP?, fileName :: STRING?)
1818
----
1919

2020
== Input parameters

docs/asciidoc/modules/ROOT/pages/overview/apoc.cypher/index.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) -
4848
apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}])) - runs each statement in the files, all semicolon separated
4949
|label:procedure[]
5050
|label:apoc-full[]
51+
|xref::overview/apoc.cypher/apoc.cypher.runFileReadOnly.adoc[apoc.cypher.runFileReadOnly icon:book[]]
52+
53+
apoc.cypher.runFileReadOnly(file or url,[{timeout:10,parameters:{}}]) - runs each `READ` statement in the file, all semicolon separated
54+
|label:procedure[]
55+
|label:apoc-full[]
56+
|xref::overview/apoc.cypher/apoc.cypher.runFilesReadOnly.adoc[apoc.cypher.runFilesReadOnly icon:book[]]
57+
58+
apoc.cypher.runFilesReadOnly([files or urls],[{timeout:10,parameters:{}}])) - runs each `READ` statement in the files, all semicolon separated
59+
|label:procedure[]
60+
|label:apoc-full[]
5161
|xref::overview/apoc.cypher/apoc.cypher.runMany.adoc[apoc.cypher.runMany icon:book[]]
5262

5363
apoc.cypher.runMany('cypher;\nstatements;', $params, [{statistics:true,timeout:10}]) - runs each semicolon separated statement and returns summary - currently no schema operations

0 commit comments

Comments
 (0)