@datastax/astra-db-ts
Advanced tools
Comparing version 0.0.2 to 0.0.21
@@ -25,3 +25,3 @@ import { Db } from './db'; | ||
* @param uri an Stargate JSON API uri (Eg. http://localhost:8181/v1/testks1) where testks1 is the name of the keyspace/Namespace which should always be the last part of the URL | ||
* @returns MongoClient | ||
* @returns Client | ||
*/ | ||
@@ -33,4 +33,4 @@ static connect(uri: string, options?: ClientOptions | null): Promise<Client>; | ||
/** | ||
* Connect the MongoClient instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a MongoClient instance | ||
* Connect the Client instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a Client instance | ||
*/ | ||
@@ -37,0 +37,0 @@ connect(): Promise<Client>; |
@@ -46,3 +46,3 @@ "use strict"; | ||
* @param uri an Stargate JSON API uri (Eg. http://localhost:8181/v1/testks1) where testks1 is the name of the keyspace/Namespace which should always be the last part of the URL | ||
* @returns MongoClient | ||
* @returns Client | ||
*/ | ||
@@ -76,4 +76,4 @@ static async connect(uri, options) { | ||
/** | ||
* Connect the MongoClient instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a MongoClient instance | ||
* Connect the Client instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a Client instance | ||
*/ | ||
@@ -80,0 +80,0 @@ async connect() { |
@@ -29,3 +29,3 @@ "use strict"; | ||
this.httpClient = new client_1.HTTPClient({ | ||
baseUrl: httpClient.baseUrl + `/${name}`, | ||
baseUrl: httpClient.baseUrl, | ||
username: httpClient.username, | ||
@@ -32,0 +32,0 @@ password: httpClient.password, |
@@ -21,4 +21,2 @@ "use strict"; | ||
Object.defineProperty(exports, "AstraDB", { enumerable: true, get: function () { return client_1.AstraDB; } }); | ||
// export * as client from './client'; | ||
// export * as logger from './logger'; | ||
//# sourceMappingURL=index.js.map |
export declare const LIB_NAME = "@datastax/astra-db-ts"; | ||
export declare const LIB_VERSION = "0.0.2"; | ||
export declare const LIB_VERSION = "0.0.21"; |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.LIB_NAME = "@datastax/astra-db-ts"; | ||
exports.LIB_VERSION = "0.0.2"; | ||
exports.LIB_VERSION = "0.0.21"; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@datastax/astra-db-ts", | ||
"version": "0.0.2", | ||
"version": "0.0.21", | ||
"description": "Astra DB TS Client", | ||
@@ -26,3 +26,3 @@ "contributors": [ | ||
], | ||
"homepage": "https://github.com/datastax/astra-ts-client", | ||
"homepage": "https://github.com/datastax/astra-db-ts", | ||
"license": "Apache-2.0", | ||
@@ -29,0 +29,0 @@ "main": "dist/index.js", |
@@ -7,5 +7,8 @@ # @datastax/astra-db-ts | ||
import { AstraDB } from "@datastax/astra-db-ts"; | ||
const { TOKEN, DATABASE_ID, REGION, COLLECTION_NAME } = process.env; | ||
const astraDb = new AstraDB(TOKEN, DATABASE_ID, REGION); | ||
const collection = await astraDb.collection("events"); | ||
const collection = await astraDb.collection(COLLECTION_NAME); | ||
const results = await collection.countDocuments(); | ||
``` | ||
``` |
@@ -64,3 +64,3 @@ // Copyright DataStax, Inc. | ||
* @param uri an Stargate JSON API uri (Eg. http://localhost:8181/v1/testks1) where testks1 is the name of the keyspace/Namespace which should always be the last part of the URL | ||
* @returns MongoClient | ||
* @returns Client | ||
*/ | ||
@@ -98,4 +98,4 @@ static async connect(uri: string, options?: ClientOptions | null): Promise<Client> { | ||
/** | ||
* Connect the MongoClient instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a MongoClient instance | ||
* Connect the Client instance to JSON API (create Namespace automatically when the 'createNamespaceOnConnect' flag is set to true) | ||
* @returns a Client instance | ||
*/ | ||
@@ -102,0 +102,0 @@ async connect(): Promise<Client> { |
@@ -32,3 +32,3 @@ // Copyright DataStax, Inc. | ||
this.httpClient = new HTTPClient({ | ||
baseUrl: httpClient.baseUrl + `/${name}`, | ||
baseUrl: httpClient.baseUrl, | ||
username: httpClient.username, | ||
@@ -35,0 +35,0 @@ password: httpClient.password, |
@@ -17,3 +17,1 @@ // Copyright DataStax, Inc. | ||
export { AstraDB } from './collections/client'; | ||
// export * as client from './client'; | ||
// export * as logger from './logger'; |
export const LIB_NAME = "@datastax/astra-db-ts"; | ||
export const LIB_VERSION = "0.0.2"; | ||
export const LIB_VERSION = "0.0.21"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
14
590114
8067