Database.all()
Gets a Set of all Database
collection documents.
Signature
Database.all() => Set<DatabaseDef>
Database.all(range: {from: Any, to: Any}) => Set<Database>
Description
The Database.all()
method returns all documents in the Database
system
collection or, optionally, the Set of databases in the given range.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
range |
Object describing the range. Returns all members of the Set greater than or equal to from and less than or equal to to, including duplicates for an unordered Set. If range is omitted, the method returns all Database objects. |
Return value
Type | Description |
---|---|
Set<DatabaseDef> |
All Database objects or objects in the given range. If the resulting Set is empty, the method returns an empty Set. For an ordered Set, if from is greater than to, the method returns an empty Set. If the first member of the Set is greater than or equal to from and also less than or equal to to only that value is returned. |
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"
},
...
]
}
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!