list-databases
List child databases in the current database.
Description
The list-databases
command lists child databases. If you don’t pass
any options at the command line, Fauna uses the default options
in the fauna-shell
configuration file.
It is not possible to use this command to list parent or peer databases. To access a database outside of the current database, use the Fauna Dashboard. |
Options
Option | Description |
---|---|
|
Optional Fauna server domain, that is, the hostname where
Fauna is running. Defaults to |
|
Optional name of the endpoint to use for the command. |
|
Optional connection port. Defaults to 8443. |
|
Optional connection scheme. Must be one of |
|
Optional secret to use. A secret authenticates your connection to Fauna, and connects you to a database. |
|
Optional connection timeout, an integer number of milliseconds.
When the interval has elapsed, The default is zero, which means that |
|
Not supported. |
|
Not supported. |
Examples
$ fauna list-databases
listing databases
my-test-db
To verify this, run fauna shell
and query for a list of databases. Note
that the child database my-test-db
is listed:
$ fauna shell
Connected to https://db.fauna.com
Type Ctrl+D or .exit to exit the shell
> Database.all()
Database.all()
{
data: [
{
name: "production",
coll: Database,
ts: Time("2023-08-21T23:28:56.840Z"),
global_id: "ywz5gew1syrre"
},
{
name: "internal",
coll: Database,
ts: Time("2023-08-21T23:28:56.840Z"),
global_id: "ywz5gew1syyre"
},
{
name: "my-test-db",
coll: Database,
ts: Time("2023-08-30T21:42:29.200Z"),
global_id: "yw3jf8si4yrrn"
}
]
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!