Skip to content

Commit

Permalink
JSCO-10: Add API Documentation (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
thejcfactor authored Sep 16, 2024
1 parent 759f219 commit 84f654b
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 278 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Node.js client for [Couchbase](https://couchbase.com) Columnar

Eventually the SDK will be published to npm, but in the interim a select set of packages with prebuilt binaries are available on the [Releases page](https://github.com/couchbaselabs/columnar-nodejs-client/releases). If a packages is not available for your specific platform, see the [BUILDING page](https://github.com/couchbaselabs/columnar-nodejs-client/blob/main/BUILDING.md) for details on how to build the SDK's binary.

To install the SDK from a wheel on the [Releases page](https://github.com/couchbaselabs/columnar-nodejs-client/releases):
To install the SDK from a prebuilt-binary (a.k.a. prebuild) on the [Releases page](https://github.com/couchbaselabs/columnar-nodejs-client/releases):
1. Download the appropriate package
2. Unzip the downloaded file
3. Install via npm: `npm install <path to unzipped wheel>`
3. Install via npm: `npm install <path to unzipped prebuild>`

If a compatible package is not available, the SDK's binary will need to be built from source:
1. Follow the steps on the [BUILDING page](https://github.com/couchbaselabs/columnar-nodejs-client/blob/main/BUILDING.md)
Expand Down
143 changes: 0 additions & 143 deletions lib/authenticators.ts

This file was deleted.

1 change: 0 additions & 1 deletion lib/columnar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,5 @@ export * from './cluster'
export * from './credential'
export * from './errors'
export * from './scope'
export * from './streamablepromises'

export { NodeCallback } from './utilities'
18 changes: 10 additions & 8 deletions lib/querytypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { errorFromCpp } from './bindingutilities'
/**
* Contains the results of a columnar query.
*
* @category Analytics
* @category Query
*/
export class QueryResult {
private _executor: QueryExecutor
Expand All @@ -41,14 +41,16 @@ export class QueryResult {
}

/**
* Returns a {@link Readable} stream of rows returned from the Columnar query.
* Returns a [Readable](https://nodejs.org/api/stream.html#readable-streams) stream of rows returned from the Columnar query.
*/
rows(): QueryResultStream {
return this._stream
}

/**
* Cancel.
* Volatile: This API is subject to change at any time.
*
* Cancel streaming the query results.
*/
cancel(): void {
this._executor.triggerAbort()
Expand Down Expand Up @@ -160,7 +162,7 @@ export class QueryResultStream extends Readable {
/**
* Contains the meta-data that is returned from a query.
*
* @category Analytics
* @category Query
*/
export class QueryMetadata {
/**
Expand Down Expand Up @@ -192,7 +194,7 @@ export class QueryMetadata {
* Contains information about a warning which occurred during the
* execution of an analytics query.
*
* @category Analytics
* @category Query
*/
export class QueryWarning {
/**
Expand All @@ -218,7 +220,7 @@ export class QueryWarning {
* Contains various metrics that are returned by the server following
* the execution of an analytics query.
*
* @category Analytics
* @category Query
*/
export class QueryMetrics {
/**
Expand Down Expand Up @@ -262,7 +264,7 @@ export class QueryMetrics {
* Represents the various scan consistency options that are available when
* querying against columnar.
*
* @category Analytics
* @category Query
*/
export enum QueryScanConsistency {
/**
Expand All @@ -282,7 +284,7 @@ export enum QueryScanConsistency {
}

/**
* @category Analytics
* @category Query
*/
export interface QueryOptions {
/**
Expand Down
113 changes: 0 additions & 113 deletions lib/streamablepromises.ts

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"bugs": {
"url": "http://www.couchbase.com/issues/browse/JSCO"
"url": "https://jira.issues.couchbase.com/projects/JSCO/issues"
},
"description": "The official Couchbase Node.js Columnar Client Library.",
"engines": {
"node": ">=16"
},
"homepage": "http://www.couchbase.com/communities/nodejs",
"homepage": "https://www.couchbase.com/developers/sdks",
"keywords": [
"couchbase",
"columnar",
Expand Down Expand Up @@ -53,7 +53,7 @@
},
"repository": {
"type": "git",
"url": "http://github.com/couchbase/couchnode.git"
"url": "https://github.com/couchbaselabs/columnar-nodejs-client"
},
"version": "1.0.0-dev",
"config": {
Expand Down
9 changes: 1 addition & 8 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"entryPoints": ["./lib/couchbase.ts"],
"entryPoints": ["./lib/columnar.ts"],
"out": "docs",
"excludePrivate": true,
"excludeInternal": true,
Expand All @@ -9,15 +9,8 @@
},
"categoryOrder": [
"Core",
"Key-Value",
"Transactions",
"Query",
"Views",
"Full Text Search",
"Analytics",
"Datastructures",
"Management",
"Diagnostics",
"Authentication",
"Error Handling",
"Logging"
Expand Down

0 comments on commit 84f654b

Please sign in to comment.