Database.all()
Learn: Databases and multi-tenancy |
---|
Get a Set of all child databases nested directly under the database.
Signature
Database.all() => Set<DatabaseDef>
Database.all(range: { from: Any } | { to: Any } | { from: Any, to: Any }) => Set<DatabaseDef>
Description
Gets a Set containing all child
databases, represented as Database
documents, nested directly under the database to which the query’s
authentication secret is
scoped. To limit the returned Set, you can provide an optional range.
If this method is the last expression in a query, the first page of the Set is returned. See Pagination.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
range |
|
Specifies a range of The Set only includes documents in this range (inclusive). Omit If a range is omitted, all credentials are returned. |
Range parameters
Name | Type | Required | Description |
---|---|---|---|
|
Beginning of the range (inclusive). Must be an
|
||
|
End of the range (inclusive). Must be an
|
Return value
Type | Description |
---|---|
Set<DatabaseDef> |
Set of The Set is empty if:
|
Examples
Range examples
Database.all()
{
data: [
{
name: "childDB",
coll: Database,
ts: Time("2099-06-24T21:54:38.890Z"),
typechecked: true,
priority: 10,
global_id: "ysjpykbahyyr1"
},
...
]
}
Database.all({ from: Database.byName("childDB") })
{
data: [
{
name: "childDB",
coll: Database,
ts: Time("2099-06-24T21:54:38.890Z"),
typechecked: true,
priority: 10,
global_id: "ysjpykbahyyr1"
},
...
]
}