Optional
keyspaceThe keyspace to use for the operation.
Optional
nameIf true, only the name of the collections is returned.
If false, the full collections info is returned.
Defaults to true.
const names = await db.listCollections({ nameOnly: true });
console.log(names); // [{ name: 'my_coll' }]
const info = await db.listCollections({ nameOnly: false });
console.log(info); // [{ name: 'my_coll', options: { ... } }]
true
Optional
timeoutThe method timeout override.
See TimeoutDescriptor for much more information.
Options for listing collections.
Field
nameOnly - If true, only the name of the collections is returned. If false, the full collections info is returned. Defaults to true.
Field
keyspace - Overrides the keyspace to list collections from. If not provided, the default keyspace is used.
Field
timeout - The timeout override for this method
See
Db.listCollections