Allows you to override the namespace (aka keyspace) to use for some db operation. If not specified,
the db operation will use either the namespace provided when creating the Db instance, the namespace
provided when creating the DataAPIClient instance, or the default namespace 'default_keyspace'.
(in that order)
Example
constclient = newDataAPIClient('AstraCS:...');
// Using 'default_keyspace' as the namespace constdb1 = client.db('https://<db_id>-<region>.apps.astra.datastax.com');
// Using 'my_namespace' as the namespace constdb2 = client.db('https://<db_id>-<region>.apps.astra.datastax.com', { namespace:'my_keyspace', });
// Finds 'my_collection' in 'default_keyspace' constcoll1 = db1.collection('my_collection');
Allows you to override the namespace (aka keyspace) to use for some db operation. If not specified, the db operation will use either the namespace provided when creating the Db instance, the namespace provided when creating the DataAPIClient instance, or the default namespace
'default_keyspace'
. (in that order)Example
Field
namespace - The namespace (aka keyspace) to use for the db operation.