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