diff --git a/src/main/asciidoc/administration-guide/backup.adoc b/src/main/asciidoc/administration-guide/backup.adoc index 12e5e32e..ba3eb95c 100644 --- a/src/main/asciidoc/administration-guide/backup.adoc +++ b/src/main/asciidoc/administration-guide/backup.adoc @@ -7,6 +7,14 @@ You can execute the backup of a database from SQL. Look at <> for more information. +==== Configuration + +- `-f ` (string) filename of, or path to the backup file to create. +- `-d ` (string) path on local filesystem where to find the ArcadeDB database. +- `-o` (boolean) true to overwrite the backup if already exists. +If false and the `backup-path` already exists, an error is thrown. +Default is false. + ==== Cloud Backups In a container setting it may become necessary to send backups to an S3 bucket instead of a mounted volume. diff --git a/src/main/asciidoc/api-reference/chapter.adoc b/src/main/asciidoc/api-reference/chapter.adoc index f0af1b01..5429e621 100644 --- a/src/main/asciidoc/api-reference/chapter.adoc +++ b/src/main/asciidoc/api-reference/chapter.adoc @@ -10,8 +10,8 @@ You can use any programming language that supports HTTP calls (pretty much any l | Java | Bundled with the project. Look at `Remote Database` class | Apache 2 | CHICKEN Scheme | http://wiki.call-cc.org/eggref/5/arcadedb | zlib-acknowledgement | .NET | https://github.com/tetious/ArcadeDb.Client | Apache 2 -// | PHP (Laravel) | https://github.com/skcheung/laravel-arcadedb | ? -// | Python | https://github.com/adaros92/arcadedb-python-driver | Apache 2 +| PHP (Laravel) | https://github.com/skcheung/laravel-arcadedb | ? +| Python | https://github.com/adaros92/arcadedb-python-driver | Apache 2 | Python | https://github.com/ExtReMLapin/pyarcade | Apache 2 | Python | https://github.com/stevereiner/arcadedb-python | Apache 2 | Ruby | https://github.com/topofocus/arcadedb | MIT diff --git a/src/main/asciidoc/api-reference/python.adoc b/src/main/asciidoc/api-reference/python.adoc index 237a5a14..c30e45a7 100644 --- a/src/main/asciidoc/api-reference/python.adoc +++ b/src/main/asciidoc/api-reference/python.adoc @@ -2,6 +2,7 @@ === Python image:../images/edit.png[link="https://github.com/ArcadeData/arcadedb-docs/blob/main/src/main/asciidoc/api-reference/python.adoc" float=right] -Work in progress +// Besides the Python <> there are direct bindings for Python available. +// For details see https://github.com/arcadedata/arcadedb/blob/embedded-python/bindings/python/README.md . -// Use of `stubgenj` https://pypi.org/project/stubgenj/ +Work in progress diff --git a/src/main/asciidoc/core-concepts/indexes.adoc b/src/main/asciidoc/core-concepts/indexes.adoc index 67ce2796..682c2e9d 100644 --- a/src/main/asciidoc/core-concepts/indexes.adoc +++ b/src/main/asciidoc/core-concepts/indexes.adoc @@ -38,3 +38,19 @@ B+Tree is the most common algorithm used by relational DBMSs. What are the diffe 5. However, there are also some potential disadvantages of LSM tree compared to B+ tree. For example, B+ tree may be faster for queries that require range scans or random access, and it may be easier to implement in some cases. If you're interested to ArcadeDB's LSM-Tree index implementation detail, look at <> + +==== Index Property Types + +ArcadeDB's LSM Tree Indexes can index property fields in various ways: + +1. All properties (scalar or collections) can be indexed in a unique or non-unique index (as a whole). + +2. An index can be for a single property, or multiple properties in a compund index. + +3. String properties can be index tokenized in a full-text index. + +4. Object properties can be indexed by keys or by values. + +5. List properties can be indexed by values. + +6. Vectors of floats can be indexed using a special vector index. diff --git a/src/main/asciidoc/query-languages/sql/sql-create-index.adoc b/src/main/asciidoc/query-languages/sql/sql-create-index.adoc index b12dffe9..dca06da9 100644 --- a/src/main/asciidoc/query-languages/sql/sql-create-index.adoc +++ b/src/main/asciidoc/query-languages/sql/sql-create-index.adoc @@ -24,7 +24,7 @@ ____ ---- CREATE INDEX [] [ IF NOT EXISTS ] -[ ON ( [BY KEY|VALUE][,]*) ] +[ ON ( [BY KEY|VALUE|ITEM][,]*) ] [] [ NULL_STRATEGY SKIP|ERROR] @@ -40,6 +40,7 @@ The type must already exist. The property must already exist. ** `BY KEY` index by key names for map properties. ** `BY VALUE` index by values for map properties. +** `BY ITEM` index by values for list elements. * *`<index-type>`* Defines the index type you want to use: ** `UNIQUE` does not allow duplicate keys, ** `NOTUNIQUE` allows duplicate keys, @@ -58,7 +59,7 @@ If the property types don't equal those specified in the key type list, it throw NOTE: Null values are not indexed, so any query that is looking for null values will not use the index with a full scan. -NOTE: A unique index does not regard or derived types or embedded documents of the indexed type. +NOTE: A unique index does not regard derived types or embedded documents of the indexed type. NOTE: Full-text indexes do not support multiple properties. @@ -85,6 +86,12 @@ ArcadeDB> CREATE INDEX ON Movie (thumbs BY KEY) UNIQUE ArcadeDB> CREATE INDEX ON Movie (thumbs BY VALUE) UNIQUE ---- +* Create a index for the `actors` list property in the type `Movie`: + +---- +ArcadeDB> CREATE INDEX ON Movie (actors BY ITEM) NOTUNIQUE +---- + * Create a series of properties and on them create a composite index: ---- diff --git a/src/main/asciidoc/query-languages/sql/sql-custom-functions.adoc b/src/main/asciidoc/query-languages/sql/sql-custom-functions.adoc index d59d207d..d1e5f64b 100644 --- a/src/main/asciidoc/query-languages/sql/sql-custom-functions.adoc +++ b/src/main/asciidoc/query-languages/sql/sql-custom-functions.adoc @@ -72,6 +72,8 @@ Before to use them in your queries you need to register: [source,java] ---- +SQLQueryEngine sqlEngine = (SQLQueryEngine) database.getQueryEngine("sql"); + // REGISTER 'BIGGER' FUNCTION WITH FIXED 2 PARAMETERS (MIN/MAX=2) SQLEngine.getInstance().registerFunction("bigger", new SQLFunctionAbstract("bigger", 2, 2) { diff --git a/src/main/asciidoc/query-languages/sql/sql-import-database.adoc b/src/main/asciidoc/query-languages/sql/sql-import-database.adoc index 0a14f11f..eac0a847 100644 --- a/src/main/asciidoc/query-languages/sql/sql-import-database.adoc +++ b/src/main/asciidoc/query-languages/sql/sql-import-database.adoc @@ -60,4 +60,4 @@ IMPORT DATABASE http://echo.jsontest.com/key/value/one/two WITH probeOnly = true IMPORT DATABASE file://empty.csv WITH vertices="file://vertices.csv", verticesFileType=csv, typeIdProperty=Id, typeIdType=Long, edges="file://edges.csv", edgesFileType=csv, edgeFromField="From", edgeToField="To" ---- -See also <> +See also <> for a description of the settings. diff --git a/src/main/asciidoc/query-languages/sql/sql-where.adoc b/src/main/asciidoc/query-languages/sql/sql-where.adoc index 408c8fc5..231dc0e0 100644 --- a/src/main/asciidoc/query-languages/sql/sql-where.adoc +++ b/src/main/asciidoc/query-languages/sql/sql-where.adoc @@ -77,7 +77,7 @@ And `item` can be: |map|`+CONTAINSKEY+`|true if the map contains at least one key equals to the requested. You can also use `+map.keys() CONTAINS+` in place of it|`+connections CONTAINSKEY 'Luke'+` |map|`+CONTAINSVALUE+`|true if the map contains at least one value equals to the requested. You can also use `+map.values() CONTAINS+` in place of it|`+connections CONTAINSVALUE 10:3+` |string|`+CONTAINSTEXT+`| When used against an indexed field, a lookup in the index will be performed with the text specified as key. When there is no index a simple Java `+indexOf+` will be performed. So the result set could be different if you have an index or not on that field |`+text CONTAINSTEXT 'jay'+` -|string|`+MATCHES+`|Matches the string using a http://www.regular-expressions.info/[Regular Expression]. Use the modifier `(?s)` to make `.` match also newlines.|`pass:[text MATCHES `\b[A-Z0-9.%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b`]` +|string|`+MATCHES+`|Matches the string using a http://www.regular-expressions.info/[Regular Expression]. Use the modifier `(?s)` to make `.` match also newlines, and `(?i)` for case insensitive patterns.|`pass:[text MATCHES `\b[A-Z0-9.%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b`]` |=== [discrete] diff --git a/src/main/asciidoc/reference/settings.adoc b/src/main/asciidoc/reference/settings.adoc index 4d067137..20581f7e 100644 --- a/src/main/asciidoc/reference/settings.adoc +++ b/src/main/asciidoc/reference/settings.adoc @@ -54,7 +54,7 @@ Here is an example to increase the default page size for buckets to 1 MB: ALTER DATABASE `arcadedb.bucketDefaultPageSize` 1048576 ``` -The current settings can be listed form SQL using: +The current settings can be listed from SQL using: ```sql SELECT expand(settings) FROM schema:database @@ -181,7 +181,7 @@ The following plugins are available for ArcadeDB Server: |`asyncTxBatchSize`|Maximum number of operations to commit in batch by async thread|Integer|10240 |`asyncWorkerThreads`|Number of asynchronous worker threads. By default it is cores minus 1, but at least 1|Integer|(machine dependent) |`bucketDefaultPageSize`|Default page size in bytes for buckets. Default is 65536|Integer|65536 -|`arcadedb.bucketReuseSpaceMode`|Mode used to reuse space in pages. Use 'low' to have faster updates consuming more space on disk, `medium` for balance. Default is 'high'|String|high +|`bucketReuseSpaceMode`|Mode used to reuse space in pages. Use 'low' to have faster updates consuming more space on disk, `medium` for balance. Default is 'high'|String|high |`bucketWipeOutOnDelete`|Wipe out record content on delete. If enabled, assures deleted records cannot be analyzed by parsing the raw files and backups will be more compressed, but it also makes deletes a little bit slower|Boolean|true |`command.timeout`|Default timeout for commands (in ms)|Long|0 |`command.warningsEvery`|Reduce warnings in commands to print in console only every X occurrences. Use 0 to disable warnings with commands|Integer|100