Optional keyspaceThe keyspace to use for the operation.
Optional maxThe maximum time to wait for a response from the server, in milliseconds.
Optional nameIf true, only the name of the collection is returned.
If false, the full collection 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 namespaceThe keyspace to use for the operation.
This is now a deprecated alias for the strictly equivalent WithKeyspace.keyspace, and will be removed in an upcoming major version.
https://docs.datastax.com/en/astra-db-serverless/api-reference/client-versions.html#version-1-5
Options for listing collections.
Field
nameOnly - If true, only the name of the collection is returned. If false, the full collection info is returned. Defaults to true.
Field
keyspace - Overrides the keyspace to list collections from. If not provided, the default keyspace is used.
Field
maxTimeMS - The maximum amount of time to allow the operation to run.
See
Db.listCollections