diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e4e0cb4b..b42673927b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,77 @@ + +## [v0.8.0](https://github.com/sourcenetwork/defradb/compare/v0.7.0...v0.8.0) + +> 2023-11-14 + +DefraDB v0.8 is a major pre-production release. Until the stable version 1.0 is reached, the SemVer minor patch number will denote notable releases, which will give the project freedom to experiment and explore potentially breaking changes. + +To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v0.7.x databases. If you need help migrating an existing deployment, reach out at [hello@source.network](mailto:hello@source.network) or join our Discord at https://discord.source.network/. + +### Features + +* Add means to fetch schema ([#2006](https://github.com/sourcenetwork/defradb/issues/2006)) +* Rename Schema.SchemaID to Schema.Root ([#2005](https://github.com/sourcenetwork/defradb/issues/2005)) +* Enable playground in Docker build ([#1986](https://github.com/sourcenetwork/defradb/issues/1986)) +* Change GetCollectionBySchemaFoo funcs to return many ([#1984](https://github.com/sourcenetwork/defradb/issues/1984)) +* Add Swagger UI to playground ([#1979](https://github.com/sourcenetwork/defradb/issues/1979)) +* Add OpenAPI route ([#1960](https://github.com/sourcenetwork/defradb/issues/1960)) +* Remove CollectionDescription.Schema ([#1965](https://github.com/sourcenetwork/defradb/issues/1965)) +* Remove collection from patch schema ([#1957](https://github.com/sourcenetwork/defradb/issues/1957)) +* Make queries utilise secondary indexes ([#1925](https://github.com/sourcenetwork/defradb/issues/1925)) +* Allow setting of default schema version ([#1888](https://github.com/sourcenetwork/defradb/issues/1888)) +* Add CCIP Support ([#1896](https://github.com/sourcenetwork/defradb/issues/1896)) + +### Fixes + +* Fix test module relying on closed memory leak ([#2037](https://github.com/sourcenetwork/defradb/issues/2037)) +* Make return type for FieldKind_INT an int64 ([#1982](https://github.com/sourcenetwork/defradb/issues/1982)) +* Node private key requires data directory ([#1938](https://github.com/sourcenetwork/defradb/issues/1938)) +* Remove collection name from schema ID generation ([#1920](https://github.com/sourcenetwork/defradb/issues/1920)) +* Infinite loop when updating one-one relation ([#1915](https://github.com/sourcenetwork/defradb/issues/1915)) + +### Refactoring + +* CRDT merge direction ([#2016](https://github.com/sourcenetwork/defradb/issues/2016)) +* Reorganise collection description storage ([#1988](https://github.com/sourcenetwork/defradb/issues/1988)) +* Add peerstore to multistore ([#1980](https://github.com/sourcenetwork/defradb/issues/1980)) +* P2P client interface ([#1924](https://github.com/sourcenetwork/defradb/issues/1924)) +* Deprecate CollectionDescription.Schema ([#1939](https://github.com/sourcenetwork/defradb/issues/1939)) +* Remove net GRPC API ([#1927](https://github.com/sourcenetwork/defradb/issues/1927)) +* CLI client interface ([#1839](https://github.com/sourcenetwork/defradb/issues/1839)) + +### Continuous integration + +* Add goreleaser workflow ([#2040](https://github.com/sourcenetwork/defradb/issues/2040)) +* Add mac test runner ([#2035](https://github.com/sourcenetwork/defradb/issues/2035)) +* Parallelize change detector ([#1871](https://github.com/sourcenetwork/defradb/issues/1871)) + +### Chore + +* Update dependencies ([#2044](https://github.com/sourcenetwork/defradb/issues/2044)) + +### Bot + +* Bump [@typescript](https://github.com/typescript)-eslint/parser from 6.10.0 to 6.11.0 in /playground ([#2053](https://github.com/sourcenetwork/defradb/issues/2053)) +* Update dependencies (bulk dependabot PRs) 13-11-2023 ([#2052](https://github.com/sourcenetwork/defradb/issues/2052)) +* Bump axios from 1.5.1 to 1.6.1 in /playground ([#2041](https://github.com/sourcenetwork/defradb/issues/2041)) +* Bump [@typescript](https://github.com/typescript)-eslint/eslint-plugin from 6.9.1 to 6.10.0 in /playground ([#2042](https://github.com/sourcenetwork/defradb/issues/2042)) +* Bump [@vitejs](https://github.com/vitejs)/plugin-react-swc from 3.4.0 to 3.4.1 in /playground ([#2022](https://github.com/sourcenetwork/defradb/issues/2022)) +* Update dependencies (bulk dependabot PRs) 08-11-2023 ([#2038](https://github.com/sourcenetwork/defradb/issues/2038)) +* Update dependencies (bulk dependabot PRs) 30-10-2023 ([#2015](https://github.com/sourcenetwork/defradb/issues/2015)) +* Bump eslint-plugin and parser from 6.8.0 to 6.9.0 in /playground ([#2000](https://github.com/sourcenetwork/defradb/issues/2000)) +* Update dependencies (bulk dependabot PRs) 16-10-2023 ([#1998](https://github.com/sourcenetwork/defradb/issues/1998)) +* Update dependencies (bulk dependabot PRs) 16-10-2023 ([#1976](https://github.com/sourcenetwork/defradb/issues/1976)) +* Bump golang.org/x/net from 0.16.0 to 0.17.0 ([#1961](https://github.com/sourcenetwork/defradb/issues/1961)) +* Bump [@types](https://github.com/types)/react-dom from 18.2.11 to 18.2.12 in /playground ([#1952](https://github.com/sourcenetwork/defradb/issues/1952)) +* Bump [@typescript](https://github.com/typescript)-eslint/eslint-plugin from 6.7.4 to 6.7.5 in /playground ([#1953](https://github.com/sourcenetwork/defradb/issues/1953)) +* Bump combined dependencies 09-10-2023 ([#1951](https://github.com/sourcenetwork/defradb/issues/1951)) +* Bump [@types](https://github.com/types)/react from 18.2.24 to 18.2.25 in /playground ([#1932](https://github.com/sourcenetwork/defradb/issues/1932)) +* Bump [@typescript](https://github.com/typescript)-eslint/parser from 6.7.3 to 6.7.4 in /playground ([#1933](https://github.com/sourcenetwork/defradb/issues/1933)) +* Bump [@vitejs](https://github.com/vitejs)/plugin-react-swc from 3.3.2 to 3.4.0 in /playground ([#1904](https://github.com/sourcenetwork/defradb/issues/1904)) +* Bump combined dependencies 19-09-2023 ([#1931](https://github.com/sourcenetwork/defradb/issues/1931)) +* Bump graphql from 16.8.0 to 16.8.1 in /playground ([#1901](https://github.com/sourcenetwork/defradb/issues/1901)) +* Update combined dependabot PRs 19-09-2023 ([#1898](https://github.com/sourcenetwork/defradb/issues/1898)) + ## [v0.7.0](https://github.com/sourcenetwork/defradb/compare/v0.6.0...v0.7.0) @@ -7,7 +81,7 @@ DefraDB v0.7 is a major pre-production release. Until the stable version 1.0 is This release has focused on robustness, testing, and schema management. Some highlight new features include notable expansions to the expressiveness of schema migrations. -To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v0.5.x databases. If you need help migrating an existing deployment, reach out at [hello@source.network](mailto:hello@source.network) or join our Discord at https://discord.source.network/. +To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v0.6.x databases. If you need help migrating an existing deployment, reach out at [hello@source.network](mailto:hello@source.network) or join our Discord at https://discord.source.network/. ### Features diff --git a/docs/cli/defradb_client.md b/docs/cli/defradb_client.md index b538592ccc..a52fce09f3 100644 --- a/docs/cli/defradb_client.md +++ b/docs/cli/defradb_client.md @@ -31,8 +31,7 @@ Execute queries, add schema types, obtain node info, etc. * [defradb](defradb.md) - DefraDB Edge Database * [defradb client backup](defradb_client_backup.md) - Interact with the backup utility -* [defradb client collection](defradb_client_collection.md) - View detailed collection info. -* [defradb client document](defradb_client_document.md) - Create, read, update, and delete documents. +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. * [defradb client dump](defradb_client_dump.md) - Dump the contents of DefraDB node-side * [defradb client index](defradb_client_index.md) - Manage collections' indexes of a running DefraDB instance * [defradb client p2p](defradb_client_p2p.md) - Interact with the DefraDB P2P system diff --git a/docs/cli/defradb_client_collection.md b/docs/cli/defradb_client_collection.md index d47396d88a..7807f49503 100644 --- a/docs/cli/defradb_client_collection.md +++ b/docs/cli/defradb_client_collection.md @@ -1,35 +1,19 @@ ## defradb client collection -View detailed collection info. +Interact with a collection. ### Synopsis -View detailed collection info. - -Example: view all collections - defradb client collection - -Example: view collection by name - defradb client collection --name User - -Example: view collection by schema id - defradb client collection --schema bae123 - -Example: view collection by version id - defradb client collection --version bae123 - - -``` -defradb client collection [--name --schema --version ] [flags] -``` +Create, read, update, and delete documents within a collection. ### Options ``` -h, --help help for collection - --name string Get collection by name - --schema string Get collection by schema ID - --version string Get collection by version ID + --name string Collection name + --schema string Collection schema Root + --tx uint Transaction ID + --version string Collection version ID ``` ### Options inherited from parent commands @@ -42,11 +26,16 @@ defradb client collection [--name --schema --version [flags] +``` + +### Options + +``` + -f, --file string File containing document(s) + -h, --help help for create +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_collection_delete.md b/docs/cli/defradb_client_collection_delete.md new file mode 100644 index 0000000000..fea6c6ccc7 --- /dev/null +++ b/docs/cli/defradb_client_collection_delete.md @@ -0,0 +1,48 @@ +## defradb client collection delete + +Delete documents by key or filter. + +### Synopsis + +Delete documents by key or filter and lists the number of documents deleted. + +Example: delete by key(s) + defradb client collection delete --name User --key bae-123,bae-456 + +Example: delete by filter + defradb client collection delete --name User --filter '{ "_gte": { "points": 100 } }' + + +``` +defradb client collection delete [--filter --key ] [flags] +``` + +### Options + +``` + --filter string Document filter + -h, --help help for delete + --key strings Document key +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_collection_describe.md b/docs/cli/defradb_client_collection_describe.md new file mode 100644 index 0000000000..88e2427bed --- /dev/null +++ b/docs/cli/defradb_client_collection_describe.md @@ -0,0 +1,52 @@ +## defradb client collection describe + +View collection description. + +### Synopsis + +Introspect collection types. + +Example: view all collections + defradb client collection describe + +Example: view collection by name + defradb client collection describe --name User + +Example: view collection by schema id + defradb client collection describe --schema bae123 + +Example: view collection by version id + defradb client collection describe --version bae123 + + +``` +defradb client collection describe [flags] +``` + +### Options + +``` + -h, --help help for describe +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_collection_get.md b/docs/cli/defradb_client_collection_get.md new file mode 100644 index 0000000000..675988c487 --- /dev/null +++ b/docs/cli/defradb_client_collection_get.md @@ -0,0 +1,44 @@ +## defradb client collection get + +View document fields. + +### Synopsis + +View document fields. + +Example: + defradb client collection get --name User bae-123 + + +``` +defradb client collection get [--show-deleted] [flags] +``` + +### Options + +``` + -h, --help help for get + --show-deleted Show deleted documents +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_collection_keys.md b/docs/cli/defradb_client_collection_keys.md new file mode 100644 index 0000000000..234d8e051f --- /dev/null +++ b/docs/cli/defradb_client_collection_keys.md @@ -0,0 +1,43 @@ +## defradb client collection keys + +List all document keys. + +### Synopsis + +List all document keys. + +Example: + defradb client collection keys --name User + + +``` +defradb client collection keys [flags] +``` + +### Options + +``` + -h, --help help for keys +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_collection_update.md b/docs/cli/defradb_client_collection_update.md new file mode 100644 index 0000000000..c081614cce --- /dev/null +++ b/docs/cli/defradb_client_collection_update.md @@ -0,0 +1,54 @@ +## defradb client collection update + +Update documents by key or filter. + +### Synopsis + +Update documents by key or filter. + +Example: update from string + defradb client collection update --name User --key bae-123 '{ "name": "Bob" }' + +Example: update by filter + defradb client collection update --name User \ + --filter '{ "_gte": { "points": 100 } }' --updater '{ "verified": true }' + +Example: update by keys + defradb client collection update --name User \ + --key bae-123,bae-456 --updater '{ "verified": true }' + + +``` +defradb client collection update [--filter --key --updater ] [flags] +``` + +### Options + +``` + --filter string Document filter + -h, --help help for update + --key strings Document key + --updater string Document updater +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --name string Collection name + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --schema string Collection schema Root + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") + --version string Collection version ID +``` + +### SEE ALSO + +* [defradb client collection](defradb_client_collection.md) - Interact with a collection. + diff --git a/docs/cli/defradb_client_p2p.md b/docs/cli/defradb_client_p2p.md index 1132ee22ad..386929950d 100644 --- a/docs/cli/defradb_client_p2p.md +++ b/docs/cli/defradb_client_p2p.md @@ -30,5 +30,6 @@ Interact with the DefraDB P2P system * [defradb client](defradb_client.md) - Interact with a DefraDB node * [defradb client p2p collection](defradb_client_p2p_collection.md) - Configure the P2P collection system +* [defradb client p2p info](defradb_client_p2p_info.md) - Get peer info from a DefraDB node * [defradb client p2p replicator](defradb_client_p2p_replicator.md) - Configure the replicator system diff --git a/docs/cli/defradb_client_p2p_collection_add.md b/docs/cli/defradb_client_p2p_collection_add.md index b5f3586144..c55c807404 100644 --- a/docs/cli/defradb_client_p2p_collection_add.md +++ b/docs/cli/defradb_client_p2p_collection_add.md @@ -7,8 +7,15 @@ Add P2P collections Add P2P collections to the synchronized pubsub topics. The collections are synchronized between nodes of a pubsub network. +Example: add single collection + defradb client p2p collection add bae123 + +Example: add multiple collections + defradb client p2p collection add bae123,bae456 + + ``` -defradb client p2p collection add [collectionID] [flags] +defradb client p2p collection add [collectionIDs] [flags] ``` ### Options diff --git a/docs/cli/defradb_client_p2p_collection_remove.md b/docs/cli/defradb_client_p2p_collection_remove.md index 04492d2871..2aaa0901b4 100644 --- a/docs/cli/defradb_client_p2p_collection_remove.md +++ b/docs/cli/defradb_client_p2p_collection_remove.md @@ -7,8 +7,15 @@ Remove P2P collections Remove P2P collections from the followed pubsub topics. The removed collections will no longer be synchronized between nodes. +Example: remove single collection + defradb client p2p collection remove bae123 + +Example: remove multiple collections + defradb client p2p collection remove bae123,bae456 + + ``` -defradb client p2p collection remove [collectionID] [flags] +defradb client p2p collection remove [collectionIDs] [flags] ``` ### Options diff --git a/docs/cli/defradb_client_p2p_info.md b/docs/cli/defradb_client_p2p_info.md new file mode 100644 index 0000000000..793179f3d7 --- /dev/null +++ b/docs/cli/defradb_client_p2p_info.md @@ -0,0 +1,36 @@ +## defradb client p2p info + +Get peer info from a DefraDB node + +### Synopsis + +Get peer info from a DefraDB node + +``` +defradb client p2p info [flags] +``` + +### Options + +``` + -h, --help help for info +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") +``` + +### SEE ALSO + +* [defradb client p2p](defradb_client_p2p.md) - Interact with the DefraDB P2P system + diff --git a/docs/cli/defradb_client_p2p_replicator.md b/docs/cli/defradb_client_p2p_replicator.md index 26f4041802..4aa4eb9996 100644 --- a/docs/cli/defradb_client_p2p_replicator.md +++ b/docs/cli/defradb_client_p2p_replicator.md @@ -30,7 +30,7 @@ A replicator replicates one or all collection(s) from one node to another. ### SEE ALSO * [defradb client p2p](defradb_client_p2p.md) - Interact with the DefraDB P2P system -* [defradb client p2p replicator delete](defradb_client_p2p_replicator_delete.md) - Delete a replicator. It will stop synchronizing +* [defradb client p2p replicator delete](defradb_client_p2p_replicator_delete.md) - Delete replicator(s) and stop synchronization * [defradb client p2p replicator getall](defradb_client_p2p_replicator_getall.md) - Get all replicators -* [defradb client p2p replicator set](defradb_client_p2p_replicator_set.md) - Set a P2P replicator +* [defradb client p2p replicator set](defradb_client_p2p_replicator_set.md) - Add replicator(s) and start synchronization diff --git a/docs/cli/defradb_client_p2p_replicator_delete.md b/docs/cli/defradb_client_p2p_replicator_delete.md index 9ffbc115d3..fac7d4ce06 100644 --- a/docs/cli/defradb_client_p2p_replicator_delete.md +++ b/docs/cli/defradb_client_p2p_replicator_delete.md @@ -1,19 +1,25 @@ ## defradb client p2p replicator delete -Delete a replicator. It will stop synchronizing +Delete replicator(s) and stop synchronization ### Synopsis -Delete a replicator. It will stop synchronizing. +Delete replicator(s) and stop synchronization. +A replicator synchronizes one or all collection(s) from this node to another. + +Example: + defradb client p2p replicator delete -c Users '{"ID": "12D3", "Addrs": ["/ip4/0.0.0.0/tcp/9171"]}' + ``` -defradb client p2p replicator delete [flags] +defradb client p2p replicator delete [-c, --collection] [flags] ``` ### Options ``` - -h, --help help for delete + -c, --collection strings Collection(s) to stop replicating + -h, --help help for delete ``` ### Options inherited from parent commands diff --git a/docs/cli/defradb_client_p2p_replicator_getall.md b/docs/cli/defradb_client_p2p_replicator_getall.md index 080011ae65..4c0c81f6d1 100644 --- a/docs/cli/defradb_client_p2p_replicator_getall.md +++ b/docs/cli/defradb_client_p2p_replicator_getall.md @@ -5,7 +5,11 @@ Get all replicators ### Synopsis Get all the replicators active in the P2P data sync system. -These are the replicators that are currently replicating data from one node to another. +A replicator synchronizes one or all collection(s) from this node to another. + +Example: + defradb client p2p replicator getall + ``` defradb client p2p replicator getall [flags] diff --git a/docs/cli/defradb_client_p2p_replicator_set.md b/docs/cli/defradb_client_p2p_replicator_set.md index 23d7b81404..86f47fc30f 100644 --- a/docs/cli/defradb_client_p2p_replicator_set.md +++ b/docs/cli/defradb_client_p2p_replicator_set.md @@ -1,11 +1,14 @@ ## defradb client p2p replicator set -Set a P2P replicator +Add replicator(s) and start synchronization ### Synopsis -Add a new target replicator. -A replicator replicates one or all collection(s) from this node to another. +Add replicator(s) and start synchronization. +A replicator synchronizes one or all collection(s) from this node to another. + +Example: + defradb client p2p replicator set -c Users '{"ID": "12D3", "Addrs": ["/ip4/0.0.0.0/tcp/9171"]}' ``` @@ -15,7 +18,7 @@ defradb client p2p replicator set [-c, --collection] [flags] ### Options ``` - -c, --collection strings Define the collection for the replicator + -c, --collection strings Collection(s) to replicate -h, --help help for set ``` diff --git a/docs/cli/defradb_client_schema.md b/docs/cli/defradb_client_schema.md index 6b04bb2a5d..ee3422741f 100644 --- a/docs/cli/defradb_client_schema.md +++ b/docs/cli/defradb_client_schema.md @@ -30,6 +30,8 @@ Make changes, updates, or look for existing schema types. * [defradb client](defradb_client.md) - Interact with a DefraDB node * [defradb client schema add](defradb_client_schema_add.md) - Add new schema +* [defradb client schema describe](defradb_client_schema_describe.md) - View schema descriptions. * [defradb client schema migration](defradb_client_schema_migration.md) - Interact with the schema migration system of a running DefraDB instance * [defradb client schema patch](defradb_client_schema_patch.md) - Patch an existing schema type +* [defradb client schema set-default](defradb_client_schema_set-default.md) - Set the default schema version diff --git a/docs/cli/defradb_client_schema_describe.md b/docs/cli/defradb_client_schema_describe.md new file mode 100644 index 0000000000..749ba24235 --- /dev/null +++ b/docs/cli/defradb_client_schema_describe.md @@ -0,0 +1,52 @@ +## defradb client schema describe + +View schema descriptions. + +### Synopsis + +Introspect schema types. + +Example: view all schemas + defradb client schema describe + +Example: view schemas by name + defradb client schema describe --name User + +Example: view schemas by root + defradb client schema describe --root bae123 + +Example: view a single schema by version id + defradb client schema describe --version bae123 + + +``` +defradb client schema describe [flags] +``` + +### Options + +``` + -h, --help help for describe + --name string Schema name + --root string Schema root + --version string Schema Version ID +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") +``` + +### SEE ALSO + +* [defradb client schema](defradb_client_schema.md) - Interact with the schema system of a DefraDB node + diff --git a/docs/cli/defradb_client_schema_migration.md b/docs/cli/defradb_client_schema_migration.md index 91f2f324e3..c0910ad746 100644 --- a/docs/cli/defradb_client_schema_migration.md +++ b/docs/cli/defradb_client_schema_migration.md @@ -29,9 +29,9 @@ Make set or look for existing schema migrations on a DefraDB node. ### SEE ALSO * [defradb client schema](defradb_client_schema.md) - Interact with the schema system of a DefraDB node -* [defradb client schema migration down](defradb_client_schema_migration_down.md) - Reverse a migration on the specified schema version. +* [defradb client schema migration down](defradb_client_schema_migration_down.md) - Reverses the migration from the specified schema version. * [defradb client schema migration get](defradb_client_schema_migration_get.md) - Gets the schema migrations within DefraDB * [defradb client schema migration reload](defradb_client_schema_migration_reload.md) - Reload the schema migrations within DefraDB * [defradb client schema migration set](defradb_client_schema_migration_set.md) - Set a schema migration within DefraDB -* [defradb client schema migration up](defradb_client_schema_migration_up.md) - Runs a migration on the specified schema version. +* [defradb client schema migration up](defradb_client_schema_migration_up.md) - Applies the migration to the specified schema version. diff --git a/docs/cli/defradb_client_schema_migration_down.md b/docs/cli/defradb_client_schema_migration_down.md index 3d8a2eb6a5..afb631e267 100644 --- a/docs/cli/defradb_client_schema_migration_down.md +++ b/docs/cli/defradb_client_schema_migration_down.md @@ -1,18 +1,30 @@ ## defradb client schema migration down -Reverse a migration on the specified schema version. +Reverses the migration from the specified schema version. ### Synopsis -Reverse a migration on the specified schema version. +Reverses the migration from the specified schema version. +Documents is a list of documents to reverse the migration from. + +Example: migrate from string + defradb client schema migration down --version bae123 '[{"name": "Bob"}]' + +Example: migrate from file + defradb client schema migration down --version bae123 -f documents.json + +Example: migrate from stdin + cat documents.json | defradb client schema migration down --version bae123 - + ``` -defradb client schema migration down --version [flags] +defradb client schema migration down --version [flags] ``` ### Options ``` + -f, --file string File containing document(s) -h, --help help for down --version string Schema version id ``` diff --git a/docs/cli/defradb_client_schema_migration_up.md b/docs/cli/defradb_client_schema_migration_up.md index a637f2f28d..8f7688ccad 100644 --- a/docs/cli/defradb_client_schema_migration_up.md +++ b/docs/cli/defradb_client_schema_migration_up.md @@ -1,18 +1,30 @@ ## defradb client schema migration up -Runs a migration on the specified schema version. +Applies the migration to the specified schema version. ### Synopsis -Runs a migration on the specified schema version. +Applies the migration to the specified schema version. +Documents is a list of documents to apply the migration to. + +Example: migrate from string + defradb client schema migration up --version bae123 '[{"name": "Bob"}]' + +Example: migrate from file + defradb client schema migration up --version bae123 -f documents.json + +Example: migrate from stdin + cat documents.json | defradb client schema migration up --version bae123 - + ``` -defradb client schema migration up --version [flags] +defradb client schema migration up --version [flags] ``` ### Options ``` + -f, --file string File containing document(s) -h, --help help for up --version string Schema version id ``` diff --git a/docs/cli/defradb_client_schema_patch.md b/docs/cli/defradb_client_schema_patch.md index ba04faddf2..357b43b2a8 100644 --- a/docs/cli/defradb_client_schema_patch.md +++ b/docs/cli/defradb_client_schema_patch.md @@ -28,6 +28,7 @@ defradb client schema patch [schema] [flags] ``` -f, --file string File to load a patch from -h, --help help for patch + --set-default Set default schema version ``` ### Options inherited from parent commands diff --git a/docs/cli/defradb_client_schema_set-default.md b/docs/cli/defradb_client_schema_set-default.md new file mode 100644 index 0000000000..0698b0e6d5 --- /dev/null +++ b/docs/cli/defradb_client_schema_set-default.md @@ -0,0 +1,36 @@ +## defradb client schema set-default + +Set the default schema version + +### Synopsis + +Set the default schema version + +``` +defradb client schema set-default [versionID] [flags] +``` + +### Options + +``` + -h, --help help for set-default +``` + +### Options inherited from parent commands + +``` + --logformat string Log format to use. Options are csv, json (default "csv") + --logger stringArray Override logger parameters. Usage: --logger ,level=,output=,... + --loglevel string Log level to use. Options are debug, info, error, fatal (default "info") + --lognocolor Disable colored log output + --logoutput string Log output path (default "stderr") + --logtrace Include stacktrace in error and fatal logs + --rootdir string Directory for data and configuration to use (default: $HOME/.defradb) + --tx uint Transaction ID + --url string URL of HTTP endpoint to listen on or connect to (default "localhost:9181") +``` + +### SEE ALSO + +* [defradb client schema](defradb_client_schema.md) - Interact with the schema system of a DefraDB node + diff --git a/docs/cli/defradb_start.md b/docs/cli/defradb_start.md index d23b1fcacb..174700674b 100644 --- a/docs/cli/defradb_start.md +++ b/docs/cli/defradb_start.md @@ -23,7 +23,6 @@ defradb start [flags] --privkeypath string Path to the private key for tls (default "certs/server.crt") --pubkeypath string Path to the public key for tls (default "certs/server.key") --store string Specify the datastore to use (supported: badger, memory) (default "badger") - --tcpaddr string Listener address for the tcp gRPC server (formatted as a libp2p MultiAddr) (default "/ip4/0.0.0.0/tcp/9161") --tls Enable serving the API over https --valuelogfilesize ByteSize Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1GiB) ``` diff --git a/licenses/BSL.txt b/licenses/BSL.txt index 1847b1aee1..bd545e07fc 100644 --- a/licenses/BSL.txt +++ b/licenses/BSL.txt @@ -7,7 +7,7 @@ Parameters Licensor: Democratized Data (D2) Foundation -Licensed Work: DefraDB v0.7.0 +Licensed Work: DefraDB v0.8.0 The Licensed Work is (c) 2023 D2 Foundation. @@ -28,7 +28,7 @@ Additional Use Grant: You may only use the Licensed Work for the -Change Date: 2027-09-18 +Change Date: 2027-11-14 Change License: Apache License, Version 2.0