From 332b09599934454e01bd1ece2a2984d05beeade8 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Tue, 8 Dec 2020 19:28:46 +0300 Subject: [PATCH 01/17] package.json --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7213481..1f6116d 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,18 @@ "async", "stream" ], + "homepage": "https://github.com/deepcrawl/node-duckdb#readme", "repository": { "type": "git", - "url": "ssh://git@github.com/deepcrawl/node-duckdb.git", - "directory": "node-duckdb" + "url": "https://github.com/deepcrawl/node-duckdb.git" }, "license": "MIT", "author": "DeepCrawl", + "contributors": [ + "Dan Forsberg (https://github.com/dforsber)", + "Pieter Raubenheimer (https://github.com/jupiter)", + "Rostislav Provodenko (https://github.com/rostislavdeepcrawl)" + ], "main": "dist/index.js", "types": "dist/index.d.ts", "binary": { From 36424ce8f2bbe34a9ba66812883706e919534ca1 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 18:36:35 +0300 Subject: [PATCH 02/17] wip --- api-extractor.json | 364 ++++ etc/node-duckdb.api.md | 138 ++ examples/src/stream-example.ts | 2 +- markdown/index.md | 12 + markdown/node-duckdb.accessmode.md | 23 + .../node-duckdb.connection._constructor_.md | 31 + markdown/node-duckdb.connection.close.md | 21 + markdown/node-duckdb.connection.execute.md | 57 + .../node-duckdb.connection.executeiterator.md | 50 + markdown/node-duckdb.connection.isclosed.md | 13 + markdown/node-duckdb.connection.md | 38 + markdown/node-duckdb.duckdb._constructor_.md | 50 + markdown/node-duckdb.duckdb.accessmode.md | 13 + .../node-duckdb.duckdb.checkpointwalsize.md | 13 + markdown/node-duckdb.duckdb.close.md | 21 + markdown/node-duckdb.duckdb.collation.md | 13 + .../node-duckdb.duckdb.defaultnullorder.md | 13 + .../node-duckdb.duckdb.defaultordertype.md | 13 + markdown/node-duckdb.duckdb.enablecopy.md | 13 + markdown/node-duckdb.duckdb.isclosed.md | 13 + markdown/node-duckdb.duckdb.maximummemory.md | 13 + markdown/node-duckdb.duckdb.md | 41 + .../node-duckdb.duckdb.temporarydirectory.md | 13 + ...ode-duckdb.duckdb.usetemporarydirectory.md | 13 + markdown/node-duckdb.iduckdbconfig.md | 21 + markdown/node-duckdb.iduckdbconfig.options.md | 11 + markdown/node-duckdb.iduckdbconfig.path.md | 13 + ...-duckdb.iduckdboptionsconfig.accessmode.md | 13 + ....iduckdboptionsconfig.checkpointwalsize.md | 13 + ...e-duckdb.iduckdboptionsconfig.collation.md | 13 + ...b.iduckdboptionsconfig.defaultnullorder.md | 13 + ...b.iduckdboptionsconfig.defaultordertype.md | 13 + ...-duckdb.iduckdboptionsconfig.enablecopy.md | 13 + ...ckdb.iduckdboptionsconfig.maximummemory.md | 13 + markdown/node-duckdb.iduckdboptionsconfig.md | 29 + ...iduckdboptionsconfig.temporarydirectory.md | 13 + ...duckdb.iduckdboptionsconfig.usedirectio.md | 13 + ...ckdboptionsconfig.usetemporarydirectory.md | 13 + ...uckdb.iexecuteoptions.forcematerialized.md | 13 + markdown/node-duckdb.iexecuteoptions.md | 21 + ...-duckdb.iexecuteoptions.rowresultformat.md | 13 + markdown/node-duckdb.md | 65 + markdown/node-duckdb.orderbynulltype.md | 23 + markdown/node-duckdb.ordertype.md | 23 + markdown/node-duckdb.resultiterator.close.md | 21 + .../node-duckdb.resultiterator.describe.md | 17 + ...node-duckdb.resultiterator.fetchallrows.md | 21 + .../node-duckdb.resultiterator.fetchrow.md | 21 + .../node-duckdb.resultiterator.isclosed.md | 13 + markdown/node-duckdb.resultiterator.md | 34 + markdown/node-duckdb.resultiterator.type.md | 13 + markdown/node-duckdb.resultstream.md | 19 + markdown/node-duckdb.resulttype.md | 21 + markdown/node-duckdb.rowresultformat.md | 21 + package.json | 5 +- src/addon-types/duckdb-config.ts | 80 +- src/addon-types/result-type.ts | 10 + src/addon/connection.ts | 92 + src/addon/duckdb.ts | 83 + src/addon/result-iterator.ts | 35 + src/addon/result-stream.ts | 16 +- src/index.ts | 35 +- temp/node-duckdb.api.json | 1718 +++++++++++++++++ temp/node-duckdb.api.md | 138 ++ tsconfig.json | 4 +- yarn.lock | 189 +- 66 files changed, 3941 insertions(+), 18 deletions(-) create mode 100644 api-extractor.json create mode 100644 etc/node-duckdb.api.md create mode 100644 markdown/index.md create mode 100644 markdown/node-duckdb.accessmode.md create mode 100644 markdown/node-duckdb.connection._constructor_.md create mode 100644 markdown/node-duckdb.connection.close.md create mode 100644 markdown/node-duckdb.connection.execute.md create mode 100644 markdown/node-duckdb.connection.executeiterator.md create mode 100644 markdown/node-duckdb.connection.isclosed.md create mode 100644 markdown/node-duckdb.connection.md create mode 100644 markdown/node-duckdb.duckdb._constructor_.md create mode 100644 markdown/node-duckdb.duckdb.accessmode.md create mode 100644 markdown/node-duckdb.duckdb.checkpointwalsize.md create mode 100644 markdown/node-duckdb.duckdb.close.md create mode 100644 markdown/node-duckdb.duckdb.collation.md create mode 100644 markdown/node-duckdb.duckdb.defaultnullorder.md create mode 100644 markdown/node-duckdb.duckdb.defaultordertype.md create mode 100644 markdown/node-duckdb.duckdb.enablecopy.md create mode 100644 markdown/node-duckdb.duckdb.isclosed.md create mode 100644 markdown/node-duckdb.duckdb.maximummemory.md create mode 100644 markdown/node-duckdb.duckdb.md create mode 100644 markdown/node-duckdb.duckdb.temporarydirectory.md create mode 100644 markdown/node-duckdb.duckdb.usetemporarydirectory.md create mode 100644 markdown/node-duckdb.iduckdbconfig.md create mode 100644 markdown/node-duckdb.iduckdbconfig.options.md create mode 100644 markdown/node-duckdb.iduckdbconfig.path.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.accessmode.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.collation.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md create mode 100644 markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md create mode 100644 markdown/node-duckdb.iexecuteoptions.forcematerialized.md create mode 100644 markdown/node-duckdb.iexecuteoptions.md create mode 100644 markdown/node-duckdb.iexecuteoptions.rowresultformat.md create mode 100644 markdown/node-duckdb.md create mode 100644 markdown/node-duckdb.orderbynulltype.md create mode 100644 markdown/node-duckdb.ordertype.md create mode 100644 markdown/node-duckdb.resultiterator.close.md create mode 100644 markdown/node-duckdb.resultiterator.describe.md create mode 100644 markdown/node-duckdb.resultiterator.fetchallrows.md create mode 100644 markdown/node-duckdb.resultiterator.fetchrow.md create mode 100644 markdown/node-duckdb.resultiterator.isclosed.md create mode 100644 markdown/node-duckdb.resultiterator.md create mode 100644 markdown/node-duckdb.resultiterator.type.md create mode 100644 markdown/node-duckdb.resultstream.md create mode 100644 markdown/node-duckdb.resulttype.md create mode 100644 markdown/node-duckdb.rowresultformat.md create mode 100644 temp/node-duckdb.api.json create mode 100644 temp/node-duckdb.api.md diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 0000000..9886efb --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,364 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/dist/index.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/etc/node-duckdb.api.md b/etc/node-duckdb.api.md new file mode 100644 index 0000000..592f9d8 --- /dev/null +++ b/etc/node-duckdb.api.md @@ -0,0 +1,138 @@ +## API Report File for "node-duckdb" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Readable } from 'stream'; + +// @public +export enum AccessMode { + // (undocumented) + Automatic = 1, + // (undocumented) + ReadOnly = 2, + // (undocumented) + ReadWrite = 3, + // (undocumented) + Undefined = 0 +} + +// @public +export class Connection { + constructor(duckdb: DuckDB); + close(): void; + execute(command: string, options?: IExecuteOptions): Promise>; + executeIterator(command: string, options?: IExecuteOptions): Promise>; + get isClosed(): boolean; +} + +// @public +export class DuckDB { + constructor(config?: IDuckDBConfig); + get accessMode(): AccessMode; + get checkPointWALSize(): number; + close(): void; + get collation(): string; + // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts + // + // @internal + get db(): DuckDBClass; + get defaultNullOrder(): OrderByNullType; + get defaultOrderType(): OrderType; + get enableCopy(): boolean; + get isClosed(): boolean; + get maximumMemory(): number; + get temporaryDirectory(): string; + get useTemporaryDirectory(): boolean; +} + +// @public +export interface IDuckDBConfig { + // (undocumented) + options?: IDuckDBOptionsConfig; + path?: string; +} + +// @public +export interface IDuckDBOptionsConfig { + accessMode?: AccessMode; + checkPointWALSize?: number; + collation?: string; + defaultNullOrder?: OrderByNullType; + defaultOrderType?: OrderType; + enableCopy?: boolean; + maximumMemory?: number; + temporaryDirectory?: string; + useDirectIO?: boolean; + useTemporaryDirectory?: boolean; +} + +// @public +export interface IExecuteOptions { + forceMaterialized?: boolean; + rowResultFormat?: RowResultFormat; +} + +// @public +export enum OrderByNullType { + // (undocumented) + Default = 1, + // (undocumented) + Invalid = 0, + // (undocumented) + NullsFirst = 2, + // (undocumented) + NullsLast = 3 +} + +// @public +export enum OrderType { + // (undocumented) + Ascending = 2, + // (undocumented) + Default = 1, + // (undocumented) + Descending = 3, + // (undocumented) + Invalid = 0 +} + +// @public +export class ResultIterator { + // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts + // + // @internal + constructor(resultInterator: ResultIteratorClass); + close(): void; + describe(): string[][]; + fetchAllRows(): T[]; + fetchRow(): T; + get isClosed(): boolean; + get type(): ResultType; +} + +// @public +export class ResultStream extends Readable { + // @internal + constructor(resultIterator: ResultIterator); + // @internal (undocumented) + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + // @internal (undocumented) + _read(): void; + } + +// @public +export enum ResultType { + Materialized = "Materialized", + Streaming = "Streaming" +} + +// @public +export enum RowResultFormat { + Array = 1, + Object = 0 +} + + +``` diff --git a/examples/src/stream-example.ts b/examples/src/stream-example.ts index 425291e..95e6904 100644 --- a/examples/src/stream-example.ts +++ b/examples/src/stream-example.ts @@ -1,6 +1,6 @@ import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; import { createWriteStream } from "fs"; -import {Transform} from "stream"; +import { Transform } from "stream"; class ArrayToCsvTransform extends Transform { diff --git a/markdown/index.md b/markdown/index.md new file mode 100644 index 0000000..699c49f --- /dev/null +++ b/markdown/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/) | + diff --git a/markdown/node-duckdb.accessmode.md b/markdown/node-duckdb.accessmode.md new file mode 100644 index 0000000..da39ee9 --- /dev/null +++ b/markdown/node-duckdb.accessmode.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) + +## AccessMode enum + +Access mode specifier + +Signature: + +```typescript +export declare enum AccessMode +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Automatic | 1 | | +| ReadOnly | 2 | | +| ReadWrite | 3 | | +| Undefined | 0 | | + diff --git a/markdown/node-duckdb.connection._constructor_.md b/markdown/node-duckdb.connection._constructor_.md new file mode 100644 index 0000000..429381e --- /dev/null +++ b/markdown/node-duckdb.connection._constructor_.md @@ -0,0 +1,31 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) + +## Connection.(constructor) + +Connection constructor. + +Signature: + +```typescript +constructor(duckdb: DuckDB); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| duckdb | [DuckDB](./node-duckdb.duckdb.md) | [DuckDB](./node-duckdb.duckdb.md) instance to connect to. | + +## Example + +Initializing a connection: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB(); +const connection = new Connection(db); + +``` + diff --git a/markdown/node-duckdb.connection.close.md b/markdown/node-duckdb.connection.close.md new file mode 100644 index 0000000..916461b --- /dev/null +++ b/markdown/node-duckdb.connection.close.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) + +## Connection.close() method + +Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). + +Signature: + +```typescript +close(): void; +``` +Returns: + +void + +## Remarks + +Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. + diff --git a/markdown/node-duckdb.connection.execute.md b/markdown/node-duckdb.connection.execute.md new file mode 100644 index 0000000..504bc9d --- /dev/null +++ b/markdown/node-duckdb.connection.execute.md @@ -0,0 +1,57 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) + +## Connection.execute() method + +Asynchronously executes the query and returns a node.js stream that wraps the result set. + +Signature: + +```typescript +execute(command: string, options?: IExecuteOptions): Promise>; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| command | string | SQL command to execute | +| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | + +Returns: + +Promise<[ResultStream](./node-duckdb.resultstream.md)<T>> + +## Example + +Streaming results of a DuckDB query into a CSV file: + +``` +import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; +import { createWriteStream } from "fs"; +import { Transform } from "stream"; +class ArrayToCsvTransform extends Transform { + constructor() { + super({objectMode: true}) + } + _transform(chunk: any[], _encoding: string, callback: any) { + this.push(chunk.join(",") + '\n'); + callback(); + } +} + +async function outputToFileAsCsv() { + const db = new DuckDB(); + const connection = new Connection(db); + await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + const transformToCsvStream = new ArrayToCsvTransform(); + const writeStream = createWriteStream("my-people-output"); + resultStream.pipe(transformToCsvStream).pipe(writeStream); +} +outputToFileAsCsv(); + +``` + diff --git a/markdown/node-duckdb.connection.executeiterator.md b/markdown/node-duckdb.connection.executeiterator.md new file mode 100644 index 0000000..c1c0ad4 --- /dev/null +++ b/markdown/node-duckdb.connection.executeiterator.md @@ -0,0 +1,50 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) + +## Connection.executeIterator() method + +Asynchronously executes the query and returns an iterator that points to the first result in the result set. + +Signature: + +```typescript +executeIterator(command: string, options?: IExecuteOptions): Promise>; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| command | string | SQL command to execute | +| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | + +Returns: + +Promise<[ResultIterator](./node-duckdb.resultiterator.md)<T>> + +## Example + +Printing rows: + +``` +import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; +async function queryDatabaseWithIterator() { + const db = new DuckDB(); + const connection = new Connection(db); + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + // print the first row + console.log(result.fetchRow()); + // print the rest of the rows + console.log(result.fetchAllRows()); + const result2 = await connection.executeIterator("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + console.log(result2.fetchAllRows()); + connection.close(); + db.close(); +} +queryDatabaseWithIterator(); + +``` + diff --git a/markdown/node-duckdb.connection.isclosed.md b/markdown/node-duckdb.connection.isclosed.md new file mode 100644 index 0000000..f220382 --- /dev/null +++ b/markdown/node-duckdb.connection.isclosed.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) + +## Connection.isClosed property + +If the connection is closed returns true, otherwise false. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/markdown/node-duckdb.connection.md b/markdown/node-duckdb.connection.md new file mode 100644 index 0000000..e5fa162 --- /dev/null +++ b/markdown/node-duckdb.connection.md @@ -0,0 +1,38 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) + +## Connection class + +The Connection class represents a DuckDB connection. + +Signature: + +```typescript +export declare class Connection +``` + +## Remarks + +The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(duckdb)](./node-duckdb.connection._constructor_.md) | | Connection constructor. | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [isClosed](./node-duckdb.connection.isclosed.md) | | boolean | If the connection is closed returns true, otherwise false. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [close()](./node-duckdb.connection.close.md) | | Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). | +| [execute(command, options)](./node-duckdb.connection.execute.md) | | Asynchronously executes the query and returns a node.js stream that wraps the result set. | +| [executeIterator(command, options)](./node-duckdb.connection.executeiterator.md) | | Asynchronously executes the query and returns an iterator that points to the first result in the result set. | + diff --git a/markdown/node-duckdb.duckdb._constructor_.md b/markdown/node-duckdb.duckdb._constructor_.md new file mode 100644 index 0000000..9df6b2f --- /dev/null +++ b/markdown/node-duckdb.duckdb._constructor_.md @@ -0,0 +1,50 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) + +## DuckDB.(constructor) + +DuckDB Database constructor. When called instantiates a native instance of DuckDB. + +Signature: + +```typescript +constructor(config?: IDuckDBConfig); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| config | [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | optional configuration object of type [IDuckDBConfig](./node-duckdb.iduckdbconfig.md). | + +## Example 1 + +Initializing a duckdb database in memory: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB(); + +``` + +## Example 2 + +Initializing a duckdb database from file: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB({ path: join(__dirname, "./mydb") }); + +``` + +## Example 3 + +Initializing a duckdb database from file and setting some additional options: + +``` +import { DuckDB, OrderType } from "node-duckdb"; +const db = new DuckDB({ path: join(__dirname, "./mydb"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } }); + +``` + diff --git a/markdown/node-duckdb.duckdb.accessmode.md b/markdown/node-duckdb.duckdb.accessmode.md new file mode 100644 index 0000000..a0f30b9 --- /dev/null +++ b/markdown/node-duckdb.duckdb.accessmode.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) + +## DuckDB.accessMode property + +Returns the [access mode](./node-duckdb.accessmode.md) used by the database. + +Signature: + +```typescript +get accessMode(): AccessMode; +``` diff --git a/markdown/node-duckdb.duckdb.checkpointwalsize.md b/markdown/node-duckdb.duckdb.checkpointwalsize.md new file mode 100644 index 0000000..fdaf66d --- /dev/null +++ b/markdown/node-duckdb.duckdb.checkpointwalsize.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) + +## DuckDB.checkPointWALSize property + +Returns the checkpoint write ahead log size used by the database. + +Signature: + +```typescript +get checkPointWALSize(): number; +``` diff --git a/markdown/node-duckdb.duckdb.close.md b/markdown/node-duckdb.duckdb.close.md new file mode 100644 index 0000000..1f85860 --- /dev/null +++ b/markdown/node-duckdb.duckdb.close.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) + +## DuckDB.close() method + +Closes the underlying duckdb database, frees associated memory and renders it unusuable. + +Signature: + +```typescript +close(): void; +``` +Returns: + +void + +## Remarks + +Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. + diff --git a/markdown/node-duckdb.duckdb.collation.md b/markdown/node-duckdb.duckdb.collation.md new file mode 100644 index 0000000..db6d5af --- /dev/null +++ b/markdown/node-duckdb.duckdb.collation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) + +## DuckDB.collation property + +Returns the collation used by the database. + +Signature: + +```typescript +get collation(): string; +``` diff --git a/markdown/node-duckdb.duckdb.defaultnullorder.md b/markdown/node-duckdb.duckdb.defaultnullorder.md new file mode 100644 index 0000000..a380c5f --- /dev/null +++ b/markdown/node-duckdb.duckdb.defaultnullorder.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) + +## DuckDB.defaultNullOrder property + +Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). + +Signature: + +```typescript +get defaultNullOrder(): OrderByNullType; +``` diff --git a/markdown/node-duckdb.duckdb.defaultordertype.md b/markdown/node-duckdb.duckdb.defaultordertype.md new file mode 100644 index 0000000..581f655 --- /dev/null +++ b/markdown/node-duckdb.duckdb.defaultordertype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) + +## DuckDB.defaultOrderType property + +Returns the default [sort order](./node-duckdb.ordertype.md). + +Signature: + +```typescript +get defaultOrderType(): OrderType; +``` diff --git a/markdown/node-duckdb.duckdb.enablecopy.md b/markdown/node-duckdb.duckdb.enablecopy.md new file mode 100644 index 0000000..7a405c3 --- /dev/null +++ b/markdown/node-duckdb.duckdb.enablecopy.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) + +## DuckDB.enableCopy property + +Returns true of copying is enabled, false otherwise. + +Signature: + +```typescript +get enableCopy(): boolean; +``` diff --git a/markdown/node-duckdb.duckdb.isclosed.md b/markdown/node-duckdb.duckdb.isclosed.md new file mode 100644 index 0000000..5b26d29 --- /dev/null +++ b/markdown/node-duckdb.duckdb.isclosed.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) + +## DuckDB.isClosed property + +Returns true if the underlying database has been closed, false otherwise. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/markdown/node-duckdb.duckdb.maximummemory.md b/markdown/node-duckdb.duckdb.maximummemory.md new file mode 100644 index 0000000..1d7fe18 --- /dev/null +++ b/markdown/node-duckdb.duckdb.maximummemory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) + +## DuckDB.maximumMemory property + +Returns the maximum memory limit for the database. + +Signature: + +```typescript +get maximumMemory(): number; +``` diff --git a/markdown/node-duckdb.duckdb.md b/markdown/node-duckdb.duckdb.md new file mode 100644 index 0000000..d084747 --- /dev/null +++ b/markdown/node-duckdb.duckdb.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) + +## DuckDB class + +The DuckDB class represents a DuckDB database instance. + +Signature: + +```typescript +export declare class DuckDB +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(config)](./node-duckdb.duckdb._constructor_.md) | | DuckDB Database constructor. When called instantiates a native instance of DuckDB. | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [accessMode](./node-duckdb.duckdb.accessmode.md) | | [AccessMode](./node-duckdb.accessmode.md) | Returns the [access mode](./node-duckdb.accessmode.md) used by the database. | +| [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) | | number | Returns the checkpoint write ahead log size used by the database. | +| [collation](./node-duckdb.duckdb.collation.md) | | string | Returns the collation used by the database. | +| [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) | | [OrderByNullType](./node-duckdb.orderbynulltype.md) | Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). | +| [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) | | [OrderType](./node-duckdb.ordertype.md) | Returns the default [sort order](./node-duckdb.ordertype.md). | +| [enableCopy](./node-duckdb.duckdb.enablecopy.md) | | boolean | Returns true of copying is enabled, false otherwise. | +| [isClosed](./node-duckdb.duckdb.isclosed.md) | | boolean | Returns true if the underlying database has been closed, false otherwise. | +| [maximumMemory](./node-duckdb.duckdb.maximummemory.md) | | number | Returns the maximum memory limit for the database. | +| [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) | | string | Returns the temporary directory location for the database. | +| [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) | | boolean | Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [close()](./node-duckdb.duckdb.close.md) | | Closes the underlying duckdb database, frees associated memory and renders it unusuable. | + diff --git a/markdown/node-duckdb.duckdb.temporarydirectory.md b/markdown/node-duckdb.duckdb.temporarydirectory.md new file mode 100644 index 0000000..95aacb6 --- /dev/null +++ b/markdown/node-duckdb.duckdb.temporarydirectory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) + +## DuckDB.temporaryDirectory property + +Returns the temporary directory location for the database. + +Signature: + +```typescript +get temporaryDirectory(): string; +``` diff --git a/markdown/node-duckdb.duckdb.usetemporarydirectory.md b/markdown/node-duckdb.duckdb.usetemporarydirectory.md new file mode 100644 index 0000000..9621c9b --- /dev/null +++ b/markdown/node-duckdb.duckdb.usetemporarydirectory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) + +## DuckDB.useTemporaryDirectory property + +Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. + +Signature: + +```typescript +get useTemporaryDirectory(): boolean; +``` diff --git a/markdown/node-duckdb.iduckdbconfig.md b/markdown/node-duckdb.iduckdbconfig.md new file mode 100644 index 0000000..4dfcb87 --- /dev/null +++ b/markdown/node-duckdb.iduckdbconfig.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) + +## IDuckDBConfig interface + +Configuration object for DuckDB + +Signature: + +```typescript +export interface IDuckDBConfig +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [options?](./node-duckdb.iduckdbconfig.options.md) | [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | (Optional) | +| [path?](./node-duckdb.iduckdbconfig.path.md) | string | (Optional) Path to the database file. If undefined, in-memory database is created | + diff --git a/markdown/node-duckdb.iduckdbconfig.options.md b/markdown/node-duckdb.iduckdbconfig.options.md new file mode 100644 index 0000000..0a03ae9 --- /dev/null +++ b/markdown/node-duckdb.iduckdbconfig.options.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) + +## IDuckDBConfig.options property + +Signature: + +```typescript +options?: IDuckDBOptionsConfig; +``` diff --git a/markdown/node-duckdb.iduckdbconfig.path.md b/markdown/node-duckdb.iduckdbconfig.path.md new file mode 100644 index 0000000..0875ab4 --- /dev/null +++ b/markdown/node-duckdb.iduckdbconfig.path.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) + +## IDuckDBConfig.path property + +Path to the database file. If undefined, in-memory database is created + +Signature: + +```typescript +path?: string; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md b/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md new file mode 100644 index 0000000..529f6d8 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) + +## IDuckDBOptionsConfig.accessMode property + +Access Mode + +Signature: + +```typescript +accessMode?: AccessMode; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md b/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md new file mode 100644 index 0000000..db4568f --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) + +## IDuckDBOptionsConfig.checkPointWALSize property + +Checkpoint Write Ahead Log Size (in bytes) + +Signature: + +```typescript +checkPointWALSize?: number; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.collation.md b/markdown/node-duckdb.iduckdboptionsconfig.collation.md new file mode 100644 index 0000000..333910c --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.collation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) + +## IDuckDBOptionsConfig.collation property + +Collation + +Signature: + +```typescript +collation?: string; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md b/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md new file mode 100644 index 0000000..1363166 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) + +## IDuckDBOptionsConfig.defaultNullOrder property + +Default order for Null values + +Signature: + +```typescript +defaultNullOrder?: OrderByNullType; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md b/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md new file mode 100644 index 0000000..8a72e0c --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) + +## IDuckDBOptionsConfig.defaultOrderType property + +Default Order + +Signature: + +```typescript +defaultOrderType?: OrderType; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md b/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md new file mode 100644 index 0000000..3786e7c --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) + +## IDuckDBOptionsConfig.enableCopy property + +Enable Copy + +Signature: + +```typescript +enableCopy?: boolean; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md b/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md new file mode 100644 index 0000000..4263e01 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) + +## IDuckDBOptionsConfig.maximumMemory property + +Maximum memory limit for the databse (in bytes) + +Signature: + +```typescript +maximumMemory?: number; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.md b/markdown/node-duckdb.iduckdboptionsconfig.md new file mode 100644 index 0000000..70fae22 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) + +## IDuckDBOptionsConfig interface + +Options object type for the DuckDB class + +Signature: + +```typescript +export interface IDuckDBOptionsConfig +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [accessMode?](./node-duckdb.iduckdboptionsconfig.accessmode.md) | [AccessMode](./node-duckdb.accessmode.md) | (Optional) Access Mode | +| [checkPointWALSize?](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) | number | (Optional) Checkpoint Write Ahead Log Size (in bytes) | +| [collation?](./node-duckdb.iduckdboptionsconfig.collation.md) | string | (Optional) Collation | +| [defaultNullOrder?](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) | [OrderByNullType](./node-duckdb.orderbynulltype.md) | (Optional) Default order for Null values | +| [defaultOrderType?](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) | [OrderType](./node-duckdb.ordertype.md) | (Optional) Default Order | +| [enableCopy?](./node-duckdb.iduckdboptionsconfig.enablecopy.md) | boolean | (Optional) Enable Copy | +| [maximumMemory?](./node-duckdb.iduckdboptionsconfig.maximummemory.md) | number | (Optional) Maximum memory limit for the databse (in bytes) | +| [temporaryDirectory?](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) | string | (Optional) Location of the temporary directory | +| [useDirectIO?](./node-duckdb.iduckdboptionsconfig.usedirectio.md) | boolean | (Optional) Whether to use Direct IO | +| [useTemporaryDirectory?](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) | boolean | (Optional) Whether to use temporary directory to store data that doesn't fit in memory | + diff --git a/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md b/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md new file mode 100644 index 0000000..40925a5 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) + +## IDuckDBOptionsConfig.temporaryDirectory property + +Location of the temporary directory + +Signature: + +```typescript +temporaryDirectory?: string; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md b/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md new file mode 100644 index 0000000..59b74e2 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) + +## IDuckDBOptionsConfig.useDirectIO property + +Whether to use Direct IO + +Signature: + +```typescript +useDirectIO?: boolean; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md b/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md new file mode 100644 index 0000000..edbedf6 --- /dev/null +++ b/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) + +## IDuckDBOptionsConfig.useTemporaryDirectory property + +Whether to use temporary directory to store data that doesn't fit in memory + +Signature: + +```typescript +useTemporaryDirectory?: boolean; +``` diff --git a/markdown/node-duckdb.iexecuteoptions.forcematerialized.md b/markdown/node-duckdb.iexecuteoptions.forcematerialized.md new file mode 100644 index 0000000..12a957b --- /dev/null +++ b/markdown/node-duckdb.iexecuteoptions.forcematerialized.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) + +## IExecuteOptions.forceMaterialized property + +Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. + +Signature: + +```typescript +forceMaterialized?: boolean; +``` diff --git a/markdown/node-duckdb.iexecuteoptions.md b/markdown/node-duckdb.iexecuteoptions.md new file mode 100644 index 0000000..e9d93a6 --- /dev/null +++ b/markdown/node-duckdb.iexecuteoptions.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) + +## IExecuteOptions interface + +Options for connection.execute + +Signature: + +```typescript +export interface IExecuteOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [forceMaterialized?](./node-duckdb.iexecuteoptions.forcematerialized.md) | boolean | (Optional) Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. | +| [rowResultFormat?](./node-duckdb.iexecuteoptions.rowresultformat.md) | [RowResultFormat](./node-duckdb.rowresultformat.md) | (Optional) Row format | + diff --git a/markdown/node-duckdb.iexecuteoptions.rowresultformat.md b/markdown/node-duckdb.iexecuteoptions.rowresultformat.md new file mode 100644 index 0000000..f76f735 --- /dev/null +++ b/markdown/node-duckdb.iexecuteoptions.rowresultformat.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) + +## IExecuteOptions.rowResultFormat property + +Row format + +Signature: + +```typescript +rowResultFormat?: RowResultFormat; +``` diff --git a/markdown/node-duckdb.md b/markdown/node-duckdb.md new file mode 100644 index 0000000..02aa683 --- /dev/null +++ b/markdown/node-duckdb.md @@ -0,0 +1,65 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) + +## node-duckdb package + +Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/) + +## Example + +Do some simple querying and print the result + +``` +import { Connection, DuckDB } from "node-duckdb"; + +async function queryDatabaseWithIterator() { + // create new database in memory + const db = new DuckDB(); + // create a new connection to the database + const connection = new Connection(db); + + // perform some queries + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + + // fetch and print result + console.log(result.fetchAllRows()); + + // release resources + connection.close(); + db.close(); +} + +queryDatabaseWithIterator(); + +``` + +## Classes + +| Class | Description | +| --- | --- | +| [Connection](./node-duckdb.connection.md) | The Connection class represents a DuckDB connection. | +| [DuckDB](./node-duckdb.duckdb.md) | The DuckDB class represents a DuckDB database instance. | +| [ResultIterator](./node-duckdb.resultiterator.md) | ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. | +| [ResultStream](./node-duckdb.resultstream.md) | This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by execute. | + +## Enumerations + +| Enumeration | Description | +| --- | --- | +| [AccessMode](./node-duckdb.accessmode.md) | Access mode specifier | +| [OrderByNullType](./node-duckdb.orderbynulltype.md) | Null order specifier | +| [OrderType](./node-duckdb.ordertype.md) | Default sort order specifier | +| [ResultType](./node-duckdb.resulttype.md) | Specifier for how DuckDB attempts to load the result | +| [RowResultFormat](./node-duckdb.rowresultformat.md) | Result format specifier for rows | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | Configuration object for DuckDB | +| [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | Options object type for the DuckDB class | +| [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | Options for connection.execute | + diff --git a/markdown/node-duckdb.orderbynulltype.md b/markdown/node-duckdb.orderbynulltype.md new file mode 100644 index 0000000..b14a1cf --- /dev/null +++ b/markdown/node-duckdb.orderbynulltype.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) + +## OrderByNullType enum + +Null order specifier + +Signature: + +```typescript +export declare enum OrderByNullType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Default | 1 | | +| Invalid | 0 | | +| NullsFirst | 2 | | +| NullsLast | 3 | | + diff --git a/markdown/node-duckdb.ordertype.md b/markdown/node-duckdb.ordertype.md new file mode 100644 index 0000000..e851a95 --- /dev/null +++ b/markdown/node-duckdb.ordertype.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) + +## OrderType enum + +Default sort order specifier + +Signature: + +```typescript +export declare enum OrderType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Ascending | 2 | | +| Default | 1 | | +| Descending | 3 | | +| Invalid | 0 | | + diff --git a/markdown/node-duckdb.resultiterator.close.md b/markdown/node-duckdb.resultiterator.close.md new file mode 100644 index 0000000..ee18c63 --- /dev/null +++ b/markdown/node-duckdb.resultiterator.close.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) + +## ResultIterator.close() method + +Close the ResultIterator + +Signature: + +```typescript +close(): void; +``` +Returns: + +void + +## Remarks + +`close` on the connection automatically closes all associated ResultIterators. + diff --git a/markdown/node-duckdb.resultiterator.describe.md b/markdown/node-duckdb.resultiterator.describe.md new file mode 100644 index 0000000..688b6da --- /dev/null +++ b/markdown/node-duckdb.resultiterator.describe.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) + +## ResultIterator.describe() method + +Describe the result set schema. + +Signature: + +```typescript +describe(): string[][]; +``` +Returns: + +string\[\]\[\] + diff --git a/markdown/node-duckdb.resultiterator.fetchallrows.md b/markdown/node-duckdb.resultiterator.fetchallrows.md new file mode 100644 index 0000000..c756df7 --- /dev/null +++ b/markdown/node-duckdb.resultiterator.fetchallrows.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) + +## ResultIterator.fetchAllRows() method + +Fetch all rows + +Signature: + +```typescript +fetchAllRows(): T[]; +``` +Returns: + +T\[\] + +## Remarks + +Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. + diff --git a/markdown/node-duckdb.resultiterator.fetchrow.md b/markdown/node-duckdb.resultiterator.fetchrow.md new file mode 100644 index 0000000..a8dbddb --- /dev/null +++ b/markdown/node-duckdb.resultiterator.fetchrow.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) + +## ResultIterator.fetchRow() method + +Fetch the next row + +Signature: + +```typescript +fetchRow(): T; +``` +Returns: + +T + +## Remarks + +First call returns the first row, when no more rows left `null` is returned. + diff --git a/markdown/node-duckdb.resultiterator.isclosed.md b/markdown/node-duckdb.resultiterator.isclosed.md new file mode 100644 index 0000000..243f340 --- /dev/null +++ b/markdown/node-duckdb.resultiterator.isclosed.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) + +## ResultIterator.isClosed property + +Returns true if ResultIterator is closed, false otherwise. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/markdown/node-duckdb.resultiterator.md b/markdown/node-duckdb.resultiterator.md new file mode 100644 index 0000000..58c6ad6 --- /dev/null +++ b/markdown/node-duckdb.resultiterator.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) + +## ResultIterator class + +ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. + +Signature: + +```typescript +export declare class ResultIterator +``` + +## Remarks + +The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class. + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [isClosed](./node-duckdb.resultiterator.isclosed.md) | | boolean | Returns true if ResultIterator is closed, false otherwise. | +| [type](./node-duckdb.resultiterator.type.md) | | [ResultType](./node-duckdb.resulttype.md) | Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on executeIterator. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [close()](./node-duckdb.resultiterator.close.md) | | Close the ResultIterator | +| [describe()](./node-duckdb.resultiterator.describe.md) | | Describe the result set schema. | +| [fetchAllRows()](./node-duckdb.resultiterator.fetchallrows.md) | | Fetch all rows | +| [fetchRow()](./node-duckdb.resultiterator.fetchrow.md) | | Fetch the next row | + diff --git a/markdown/node-duckdb.resultiterator.type.md b/markdown/node-duckdb.resultiterator.type.md new file mode 100644 index 0000000..96aa128 --- /dev/null +++ b/markdown/node-duckdb.resultiterator.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) + +## ResultIterator.type property + +Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on `executeIterator`. + +Signature: + +```typescript +get type(): ResultType; +``` diff --git a/markdown/node-duckdb.resultstream.md b/markdown/node-duckdb.resultstream.md new file mode 100644 index 0000000..ec67561 --- /dev/null +++ b/markdown/node-duckdb.resultstream.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) + +## ResultStream class + +This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. + +Signature: + +```typescript +export declare class ResultStream extends Readable +``` +Extends: Readable + +## Remarks + +The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class. + diff --git a/markdown/node-duckdb.resulttype.md b/markdown/node-duckdb.resulttype.md new file mode 100644 index 0000000..6abfb56 --- /dev/null +++ b/markdown/node-duckdb.resulttype.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) + +## ResultType enum + +Specifier for how DuckDB attempts to load the result + +Signature: + +```typescript +export declare enum ResultType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Materialized | "Materialized" | Load the whole result set into memory | +| Streaming | "Streaming" | Keep pointer to the first row, don't load the whole result set all at once | + diff --git a/markdown/node-duckdb.rowresultformat.md b/markdown/node-duckdb.rowresultformat.md new file mode 100644 index 0000000..9180099 --- /dev/null +++ b/markdown/node-duckdb.rowresultformat.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) + +## RowResultFormat enum + +Result format specifier for rows + +Signature: + +```typescript +export declare enum RowResultFormat +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Array | 1 | Array, e.g. \["Bob", 23\] | +| Object | 0 | Object, e.g. {name: "Bob", age: 23} | + diff --git a/package.json b/package.json index 1f6116d..349b482 100644 --- a/package.json +++ b/package.json @@ -53,15 +53,18 @@ "prettier:check": "prettier --check '**/*.{js,json,md,ts,yml}'", "prettier:fix": "prettier --write '**/*.{js,json,md,ts,yml}'", "postpublish": "yarn cleanup:binaries && yarn prebuild:all-targets && yarn prebuild:upload", - "test": "yarn build:ts && jest --runInBand --testTimeout=60000" + "test": "yarn build:ts && jest --runInBand --testTimeout=60000", + "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown --input-folder temp" }, "dependencies": { + "@microsoft/api-extractor": "^7.12.0", "cmake-js": "^6.1.0", "node-addon-api": "^3.0.2", "prebuild-install": "^6.0.0", "rimraf": "^3.0.2" }, "devDependencies": { + "@microsoft/api-documenter": "^7.11.3", "@types/jest": "^26.0.14", "@typescript-eslint/eslint-plugin": "^4.3.0", "@zerollup/ts-transform-paths": "^1.7.18", diff --git a/src/addon-types/duckdb-config.ts b/src/addon-types/duckdb-config.ts index 6a4c880..9c7a19d 100644 --- a/src/addon-types/duckdb-config.ts +++ b/src/addon-types/duckdb-config.ts @@ -1,48 +1,116 @@ +/** + * Access mode specifier + * @public + */ export enum AccessMode { Undefined = 0, Automatic = 1, ReadOnly = 2, ReadWrite = 3, } - +/** + * Default sort order specifier + * @public + */ export enum OrderType { Invalid = 0, Default = 1, Ascending = 2, Descending = 3, } - +/** + * Null order specifier + * @public + */ export enum OrderByNullType { Invalid = 0, Default = 1, NullsFirst = 2, NullsLast = 3, } - +/** + * Result format specifier for rows + * @public + */ export enum RowResultFormat { + /** + * Object, e.g. \{name: "Bob", age: 23\} + */ Object = 0, + /** + * Array, e.g. ["Bob", 23] + */ Array = 1, } - +/** + * Options object type for the DuckDB class + * @public + */ export interface IDuckDBOptionsConfig { + /** + * Access Mode + */ accessMode?: AccessMode; + /** + * Checkpoint Write Ahead Log Size (in bytes) + */ checkPointWALSize?: number; + /** + * Whether to use Direct IO + */ useDirectIO?: boolean; + /** + * Maximum memory limit for the databse (in bytes) + */ maximumMemory?: number; + /** + * Whether to use temporary directory to store data that doesn't fit in memory + */ useTemporaryDirectory?: boolean; + /** + * Location of the temporary directory + */ temporaryDirectory?: string; + /** + * Collation + */ collation?: string; + /** + * Default Order + */ defaultOrderType?: OrderType; + /** + * Default order for Null values + */ defaultNullOrder?: OrderByNullType; + /** + * Enable Copy + */ enableCopy?: boolean; } - +/** + * Configuration object for DuckDB + * @public + */ export interface IDuckDBConfig { + /** + * Path to the database file. If undefined, in-memory database is created + */ path?: string; options?: IDuckDBOptionsConfig; } - +/** + * Options for connection.execute + * @public + */ export interface IExecuteOptions { + /** + * Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. + * If falsy, DuckDB will *attempt* to not load the whole result set into memory at once. + */ forceMaterialized?: boolean; + /** + * Row format + */ rowResultFormat?: RowResultFormat; } diff --git a/src/addon-types/result-type.ts b/src/addon-types/result-type.ts index ec68db7..3c3ad25 100644 --- a/src/addon-types/result-type.ts +++ b/src/addon-types/result-type.ts @@ -1,4 +1,14 @@ +/** + * Specifier for how DuckDB attempts to load the result + * @public + */ export enum ResultType { + /** + * Load the whole result set into memory + */ Materialized = "Materialized", + /** + * Keep pointer to the first row, don't load the whole result set all at once + */ Streaming = "Streaming", } diff --git a/src/addon/connection.ts b/src/addon/connection.ts index 0fdc159..f6b4c95 100644 --- a/src/addon/connection.ts +++ b/src/addon/connection.ts @@ -4,19 +4,111 @@ import {DuckDB} from "./duckdb"; import { ResultIterator } from "./result-iterator"; import { IExecuteOptions } from "@addon-types"; +/** + * The Connection class represents a DuckDB connection. + * + * @remarks + * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. + * + * @public + */ export class Connection { + /** + * Connection constructor. + * @param duckdb - {@link DuckDB | DuckDB} instance to connect to. + * + * + * @example + * Initializing a connection: + * ``` + * import { DuckDB } from "node-duckdb"; + * const db = new DuckDB(); + * const connection = new Connection(db); + * ``` + * + * @public + */ constructor(private duckdb: DuckDB) {} private connectionBinding = new ConnectionBinding(this.duckdb.db); + /** + * Asynchronously executes the query and returns a node.js stream that wraps the result set. + * @param command - SQL command to execute + * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions} + * + * @example + * Streaming results of a DuckDB query into a CSV file: + * ``` + * import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; + * import { createWriteStream } from "fs"; + * import { Transform } from "stream"; + * class ArrayToCsvTransform extends Transform { + * constructor() { + * super({objectMode: true}) + * } + * _transform(chunk: any[], _encoding: string, callback: any) { + * this.push(chunk.join(",") + '\n'); + * callback(); + * } + * } + * + * async function outputToFileAsCsv() { + * const db = new DuckDB(); + * const connection = new Connection(db); + * await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); + * await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + * const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + * const transformToCsvStream = new ArrayToCsvTransform(); + * const writeStream = createWriteStream("my-people-output"); + * resultStream.pipe(transformToCsvStream).pipe(writeStream); + * } + * outputToFileAsCsv(); + * ``` + */ public async execute(command: string, options?: IExecuteOptions): Promise> { const resultIteratorBinding = await this.connectionBinding.execute(command, options); return new ResultStream(new ResultIterator(resultIteratorBinding)); } + /** + * Asynchronously executes the query and returns an iterator that points to the first result in the result set. + * @param command - SQL command to execute + * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions} + * + * @example + * Printing rows: + * ``` + * import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; + * async function queryDatabaseWithIterator() { + * const db = new DuckDB(); + * const connection = new Connection(db); + * await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + * await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + * const result = await connection.executeIterator("SELECT * FROM people;"); + * // print the first row + * console.log(result.fetchRow()); + * // print the rest of the rows + * console.log(result.fetchAllRows()); + * const result2 = await connection.executeIterator("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + * console.log(result2.fetchAllRows()); + * connection.close(); + * db.close(); + * } + * queryDatabaseWithIterator(); + * ``` + */ public async executeIterator(command: string, options?: IExecuteOptions): Promise> { return new ResultIterator(await this.connectionBinding.execute(command, options)); } + /** + * Close the connection (also closes all {@link ResultStream | ResultStream} or {@link ResultIterator | ResultIterator} objects associated with this connection). + * @remarks + * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. + */ public close(): void { return this.connectionBinding.close(); } + /** + * If the connection is closed returns true, otherwise false. + */ public get isClosed(): boolean { return this.connectionBinding.isClosed; } diff --git a/src/addon/duckdb.ts b/src/addon/duckdb.ts index b00aba6..439b165 100644 --- a/src/addon/duckdb.ts +++ b/src/addon/duckdb.ts @@ -1,44 +1,127 @@ import { IDuckDBConfig } from "@addon-types"; import { DuckDBBinding, DuckDBClass } from "../addon-bindings"; +import {AccessMode, OrderType, OrderByNullType} from "@addon-types"; +/** + * The DuckDB class represents a DuckDB database instance. + * @public + */ export class DuckDB { private duckdb: DuckDBClass; + /** + * DuckDB Database constructor. When called instantiates a native instance of DuckDB. + * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}. + * + * + * @example + * Initializing a duckdb database in memory: + * ``` + * import { DuckDB } from "node-duckdb"; + * const db = new DuckDB(); + * ``` + * + * @example + * Initializing a duckdb database from file: + * ``` + * import { DuckDB } from "node-duckdb"; + * const db = new DuckDB({ path: join(__dirname, "./mydb") }); + * ``` + * + * @example + * Initializing a duckdb database from file and setting some additional options: + * ``` + * import { DuckDB, OrderType } from "node-duckdb"; + * const db = new DuckDB({ path: join(__dirname, "./mydb"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } }); + * ``` + * + * @public + */ constructor(config: IDuckDBConfig = {}) { this.duckdb = new DuckDBBinding(config); } + /** + * Closes the underlying duckdb database, frees associated memory and renders it unusuable. + * @remarks + * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. + * @public + */ public close(): void { return this.duckdb.close(); } + /** + * Returns underlying binding instance. + * @internal + */ public get db() { return this.duckdb; } + /** + * Returns true if the underlying database has been closed, false otherwise. + * @public + */ public get isClosed(): boolean { return this.duckdb.isClosed; } + /** + * Returns the {@link AccessMode | access mode} used by the database. + * @public + */ public get accessMode() { return this.duckdb.accessMode; } + /** + * Returns the checkpoint write ahead log size used by the database. + * @public + */ public get checkPointWALSize() { return this.duckdb.checkPointWALSize; } + /** + * Returns the maximum memory limit for the database. + * @public + */ public get maximumMemory() { return this.duckdb.maximumMemory; } + /** + * Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. + * @public + */ public get useTemporaryDirectory() { return this.duckdb.useTemporaryDirectory; } + /** + * Returns the temporary directory location for the database. + * @public + */ public get temporaryDirectory() { return this.duckdb.temporaryDirectory; } + /** + * Returns the collation used by the database. + * @public + */ public get collation() { return this.duckdb.collation; } + /** + * Returns the default {@link OrderType | sort order}. + * @public + */ public get defaultOrderType() { return this.duckdb.defaultOrderType; } + /** + * Returns the default {@link OrderByNullType | sort order for null values}. + * @public + */ public get defaultNullOrder() { return this.duckdb.defaultNullOrder; } + /** + * Returns true of copying is enabled, false otherwise. + * @public + */ public get enableCopy() { return this.duckdb.enableCopy; } diff --git a/src/addon/result-iterator.ts b/src/addon/result-iterator.ts index b37865c..dd2df88 100644 --- a/src/addon/result-iterator.ts +++ b/src/addon/result-iterator.ts @@ -1,11 +1,32 @@ import { ResultType } from "@addon-types"; import { ResultIteratorClass } from "../addon-bindings"; +/** + * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. + * + * @public + */ export class ResultIterator { + /** + * + * @internal + */ constructor(private resultInterator: ResultIteratorClass) {} + /** + * Fetch the next row + * + * @remarks + * First call returns the first row, when no more rows left `null` is returned. + */ public fetchRow(): T { return this.resultInterator.fetchRow(); } + /** + * Fetch all rows + * + * @remarks + * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. + */ public fetchAllRows(): T[] { const allRows: T[] = []; for (let element = this.fetchRow(); element !== null; element = this.fetchRow()) { @@ -13,15 +34,29 @@ export class ResultIterator { } return allRows; } + /** + * Describe the result set schema. + */ public describe(): string[][] { return this.resultInterator.describe(); } + /** + * Close the ResultIterator + * @remarks + * `close` on the connection automatically closes all associated ResultIterators. + */ public close(): void { return this.resultInterator.close(); } + /** + * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`. + */ public get type(): ResultType { return this.resultInterator.type; } + /** + * Returns true if ResultIterator is closed, false otherwise. + */ public get isClosed(): boolean { return this.resultInterator.isClosed; } diff --git a/src/addon/result-stream.ts b/src/addon/result-stream.ts index a4e0e7e..5763554 100644 --- a/src/addon/result-stream.ts +++ b/src/addon/result-stream.ts @@ -1,12 +1,21 @@ import { Readable } from "stream"; import { ResultIterator } from "./result-iterator"; - +/** + * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. + * @public + */ export class ResultStream extends Readable { + /** + * @internal + */ constructor(private resultIterator: ResultIterator) { super({ objectMode: true }); } + /** + * @internal + */ public _read(): void { try { const element = this.resultIterator.fetchRow(); @@ -18,7 +27,10 @@ export class ResultStream extends Readable { this.destroy(e); } } - + /** + * + * @internal + */ public _destroy(error: Error | null, callback: (error?: Error | null) => void): void { this.close(); callback(error); diff --git a/src/index.ts b/src/index.ts index 45fe433..a09a5d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,35 @@ +/** + * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}. + * + * @packageDocumentation + * + * @example + * Do some simple querying and print the result + * ``` + * import { Connection, DuckDB } from "node-duckdb"; + * + * async function queryDatabaseWithIterator() { + * // create new database in memory + * const db = new DuckDB(); + * // create a new connection to the database + * const connection = new Connection(db); + * + * // perform some queries + * await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + * await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + * const result = await connection.executeIterator("SELECT * FROM people;"); + * + * // fetch and print result + * console.log(result.fetchAllRows()); + + * // release resources + * connection.close(); + * db.close(); + * } + * + * queryDatabaseWithIterator(); + * ``` + */ + export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; -export { ResultType, RowResultFormat } from "./addon-types"; +export * from "./addon-types"; diff --git a/temp/node-duckdb.api.json b/temp/node-duckdb.api.json new file mode 100644 index 0000000..553c9d7 --- /dev/null +++ b/temp/node-duckdb.api.json @@ -0,0 +1,1718 @@ +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.12.0", + "schemaVersion": 1003, + "oldestForwardsCompatibleVersion": 1001 + }, + "kind": "Package", + "canonicalReference": "node-duckdb!", + "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", + "name": "node-duckdb", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "node-duckdb!", + "name": "", + "members": [ + { + "kind": "Enum", + "canonicalReference": "node-duckdb!AccessMode:enum", + "docComment": "/**\n * Access mode specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum AccessMode " + } + ], + "releaseTag": "Public", + "name": "AccessMode", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.Automatic:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Automatic = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Automatic", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.ReadOnly:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ReadOnly = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "ReadOnly", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.ReadWrite:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ReadWrite = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "ReadWrite", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.Undefined:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Undefined = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Undefined", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!Connection:class", + "docComment": "/**\n * The Connection class represents a DuckDB connection.\n *\n * @remarks\n *\n * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Connection " + } + ], + "releaseTag": "Public", + "name": "Connection", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "node-duckdb!Connection:constructor(1)", + "docComment": "/**\n * Connection constructor.\n *\n * @param duckdb - {@link DuckDB | DuckDB} instance to connect to.\n *\n * @example\n *\n * Initializing a connection:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(duckdb: " + }, + { + "kind": "Reference", + "text": "DuckDB", + "canonicalReference": "node-duckdb!DuckDB:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "duckdb", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#close:member(1)", + "docComment": "/**\n * Close the connection (also closes all {@link ResultStream | ResultStream} or {@link ResultIterator | ResultIterator} objects associated with this connection).\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#execute:member(1)", + "docComment": "/**\n * Asynchronously executes the query and returns a node.js stream that wraps the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Streaming results of a DuckDB query into a CSV file:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * import { createWriteStream } from \"fs\";\n * import { Transform } from \"stream\";\n * class ArrayToCsvTransform extends Transform {\n * constructor() {\n * super({objectMode: true})\n * }\n * _transform(chunk: any[], _encoding: string, callback: any) {\n * this.push(chunk.join(\",\") + '\\n');\n * callback();\n * }\n * }\n *\n * async function outputToFileAsCsv() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.execute(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.execute(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const resultStream = await connection.execute(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * const transformToCsvStream = new ArrayToCsvTransform();\n * const writeStream = createWriteStream(\"my-people-output\");\n * resultStream.pipe(transformToCsvStream).pipe(writeStream);\n * }\n * outputToFileAsCsv();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "execute(command: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "IExecuteOptions", + "canonicalReference": "node-duckdb!IExecuteOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResultStream", + "canonicalReference": "node-duckdb!ResultStream:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "command", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "execute" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#executeIterator:member(1)", + "docComment": "/**\n * Asynchronously executes the query and returns an iterator that points to the first result in the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Printing rows:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * async function queryDatabaseWithIterator() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n * // print the first row\n * console.log(result.fetchRow());\n * // print the rest of the rows\n * console.log(result.fetchAllRows());\n * const result2 = await connection.executeIterator(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * console.log(result2.fetchAllRows());\n * connection.close();\n * db.close();\n * }\n * queryDatabaseWithIterator();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "executeIterator(command: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "IExecuteOptions", + "canonicalReference": "node-duckdb!IExecuteOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResultIterator", + "canonicalReference": "node-duckdb!ResultIterator:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "command", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "executeIterator" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!Connection#isClosed:member", + "docComment": "/**\n * If the connection is closed returns true, otherwise false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!DuckDB:class", + "docComment": "/**\n * The DuckDB class represents a DuckDB database instance.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DuckDB " + } + ], + "releaseTag": "Public", + "name": "DuckDB", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "node-duckdb!DuckDB:constructor(1)", + "docComment": "/**\n * DuckDB Database constructor. When called instantiates a native instance of DuckDB.\n *\n * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}.\n *\n * @example\n *\n * Initializing a duckdb database in memory:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\") });\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file and setting some additional options:\n * ```\n * import { DuckDB, OrderType } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } });\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config?: " + }, + { + "kind": "Reference", + "text": "IDuckDBConfig", + "canonicalReference": "node-duckdb!IDuckDBConfig:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#accessMode:member", + "docComment": "/**\n * Returns the {@link AccessMode | access mode} used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get accessMode(): " + }, + { + "kind": "Reference", + "text": "AccessMode", + "canonicalReference": "node-duckdb!AccessMode:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "accessMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#checkPointWALSize:member", + "docComment": "/**\n * Returns the checkpoint write ahead log size used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get checkPointWALSize(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "checkPointWALSize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!DuckDB#close:member(1)", + "docComment": "/**\n * Closes the underlying duckdb database, frees associated memory and renders it unusuable.\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#collation:member", + "docComment": "/**\n * Returns the collation used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get collation(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "collation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#defaultNullOrder:member", + "docComment": "/**\n * Returns the default {@link OrderByNullType | sort order for null values}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get defaultNullOrder(): " + }, + { + "kind": "Reference", + "text": "OrderByNullType", + "canonicalReference": "node-duckdb!OrderByNullType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "defaultNullOrder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#defaultOrderType:member", + "docComment": "/**\n * Returns the default {@link OrderType | sort order}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get defaultOrderType(): " + }, + { + "kind": "Reference", + "text": "OrderType", + "canonicalReference": "node-duckdb!OrderType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "defaultOrderType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#enableCopy:member", + "docComment": "/**\n * Returns true of copying is enabled, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get enableCopy(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "enableCopy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#isClosed:member", + "docComment": "/**\n * Returns true if the underlying database has been closed, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#maximumMemory:member", + "docComment": "/**\n * Returns the maximum memory limit for the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get maximumMemory(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "maximumMemory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#temporaryDirectory:member", + "docComment": "/**\n * Returns the temporary directory location for the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get temporaryDirectory(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "temporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#useTemporaryDirectory:member", + "docComment": "/**\n * Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get useTemporaryDirectory(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "useTemporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IDuckDBConfig:interface", + "docComment": "/**\n * Configuration object for DuckDB\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IDuckDBConfig " + } + ], + "releaseTag": "Public", + "name": "IDuckDBConfig", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBConfig#options:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "options?: " + }, + { + "kind": "Reference", + "text": "IDuckDBOptionsConfig", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBConfig#path:member", + "docComment": "/**\n * Path to the database file. If undefined, in-memory database is created\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "path?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface", + "docComment": "/**\n * Options object type for the DuckDB class\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IDuckDBOptionsConfig " + } + ], + "releaseTag": "Public", + "name": "IDuckDBOptionsConfig", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#accessMode:member", + "docComment": "/**\n * Access Mode\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "accessMode?: " + }, + { + "kind": "Reference", + "text": "AccessMode", + "canonicalReference": "node-duckdb!AccessMode:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "accessMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#checkPointWALSize:member", + "docComment": "/**\n * Checkpoint Write Ahead Log Size (in bytes)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "checkPointWALSize?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "checkPointWALSize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#collation:member", + "docComment": "/**\n * Collation\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "collation?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "collation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultNullOrder:member", + "docComment": "/**\n * Default order for Null values\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultNullOrder?: " + }, + { + "kind": "Reference", + "text": "OrderByNullType", + "canonicalReference": "node-duckdb!OrderByNullType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "defaultNullOrder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultOrderType:member", + "docComment": "/**\n * Default Order\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultOrderType?: " + }, + { + "kind": "Reference", + "text": "OrderType", + "canonicalReference": "node-duckdb!OrderType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "defaultOrderType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#enableCopy:member", + "docComment": "/**\n * Enable Copy\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "enableCopy?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "enableCopy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#maximumMemory:member", + "docComment": "/**\n * Maximum memory limit for the databse (in bytes)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "maximumMemory?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "maximumMemory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#temporaryDirectory:member", + "docComment": "/**\n * Location of the temporary directory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "temporaryDirectory?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "temporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useDirectIO:member", + "docComment": "/**\n * Whether to use Direct IO\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useDirectIO?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "useDirectIO", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useTemporaryDirectory:member", + "docComment": "/**\n * Whether to use temporary directory to store data that doesn't fit in memory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useTemporaryDirectory?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "useTemporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IExecuteOptions:interface", + "docComment": "/**\n * Options for connection.execute\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IExecuteOptions " + } + ], + "releaseTag": "Public", + "name": "IExecuteOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IExecuteOptions#forceMaterialized:member", + "docComment": "/**\n * Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will *attempt* to not load the whole result set into memory at once.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "forceMaterialized?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "forceMaterialized", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IExecuteOptions#rowResultFormat:member", + "docComment": "/**\n * Row format\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "rowResultFormat?: " + }, + { + "kind": "Reference", + "text": "RowResultFormat", + "canonicalReference": "node-duckdb!RowResultFormat:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "rowResultFormat", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!OrderByNullType:enum", + "docComment": "/**\n * Null order specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum OrderByNullType " + } + ], + "releaseTag": "Public", + "name": "OrderByNullType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.Default:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Default = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Default", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.Invalid:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Invalid = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Invalid", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.NullsFirst:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "NullsFirst = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "NullsFirst", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.NullsLast:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "NullsLast = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "NullsLast", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!OrderType:enum", + "docComment": "/**\n * Default sort order specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum OrderType " + } + ], + "releaseTag": "Public", + "name": "OrderType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Ascending:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Ascending = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "Ascending", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Default:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Default = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Default", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Descending:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Descending = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "Descending", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Invalid:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Invalid = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Invalid", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!ResultIterator:class", + "docComment": "/**\n * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ResultIterator " + } + ], + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ResultIterator", + "members": [ + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#close:member(1)", + "docComment": "/**\n * Close the ResultIterator\n *\n * @remarks\n *\n * `close` on the connection automatically closes all associated ResultIterators.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#describe:member(1)", + "docComment": "/**\n * Describe the result set schema.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "describe(): " + }, + { + "kind": "Content", + "text": "string[][]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "describe" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#fetchAllRows:member(1)", + "docComment": "/**\n * Fetch all rows\n *\n * @remarks\n *\n * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetchAllRows(): " + }, + { + "kind": "Content", + "text": "T[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "fetchAllRows" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#fetchRow:member(1)", + "docComment": "/**\n * Fetch the next row\n *\n * @remarks\n *\n * First call returns the first row, when no more rows left `null` is returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetchRow(): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "fetchRow" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!ResultIterator#isClosed:member", + "docComment": "/**\n * Returns true if ResultIterator is closed, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!ResultIterator#type:member", + "docComment": "/**\n * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get type(): " + }, + { + "kind": "Reference", + "text": "ResultType", + "canonicalReference": "node-duckdb!ResultType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!ResultStream:class", + "docComment": "/**\n * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ResultStream extends " + }, + { + "kind": "Reference", + "text": "Readable", + "canonicalReference": "!internal.Readable:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ResultStream", + "members": [], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!ResultType:enum", + "docComment": "/**\n * Specifier for how DuckDB attempts to load the result\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum ResultType " + } + ], + "releaseTag": "Public", + "name": "ResultType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!ResultType.Materialized:member", + "docComment": "/**\n * Load the whole result set into memory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Materialized = " + }, + { + "kind": "Content", + "text": "\"Materialized\"" + } + ], + "releaseTag": "Public", + "name": "Materialized", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!ResultType.Streaming:member", + "docComment": "/**\n * Keep pointer to the first row, don't load the whole result set all at once\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Streaming = " + }, + { + "kind": "Content", + "text": "\"Streaming\"" + } + ], + "releaseTag": "Public", + "name": "Streaming", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!RowResultFormat:enum", + "docComment": "/**\n * Result format specifier for rows\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum RowResultFormat " + } + ], + "releaseTag": "Public", + "name": "RowResultFormat", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!RowResultFormat.Array:member", + "docComment": "/**\n * Array, e.g. [\"Bob\", 23]\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Array = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Array", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!RowResultFormat.Object:member", + "docComment": "/**\n * Object, e.g. \\{name: \"Bob\", age: 23\\}\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Object = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Object", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + } + ] + } + ] +} diff --git a/temp/node-duckdb.api.md b/temp/node-duckdb.api.md new file mode 100644 index 0000000..592f9d8 --- /dev/null +++ b/temp/node-duckdb.api.md @@ -0,0 +1,138 @@ +## API Report File for "node-duckdb" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Readable } from 'stream'; + +// @public +export enum AccessMode { + // (undocumented) + Automatic = 1, + // (undocumented) + ReadOnly = 2, + // (undocumented) + ReadWrite = 3, + // (undocumented) + Undefined = 0 +} + +// @public +export class Connection { + constructor(duckdb: DuckDB); + close(): void; + execute(command: string, options?: IExecuteOptions): Promise>; + executeIterator(command: string, options?: IExecuteOptions): Promise>; + get isClosed(): boolean; +} + +// @public +export class DuckDB { + constructor(config?: IDuckDBConfig); + get accessMode(): AccessMode; + get checkPointWALSize(): number; + close(): void; + get collation(): string; + // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts + // + // @internal + get db(): DuckDBClass; + get defaultNullOrder(): OrderByNullType; + get defaultOrderType(): OrderType; + get enableCopy(): boolean; + get isClosed(): boolean; + get maximumMemory(): number; + get temporaryDirectory(): string; + get useTemporaryDirectory(): boolean; +} + +// @public +export interface IDuckDBConfig { + // (undocumented) + options?: IDuckDBOptionsConfig; + path?: string; +} + +// @public +export interface IDuckDBOptionsConfig { + accessMode?: AccessMode; + checkPointWALSize?: number; + collation?: string; + defaultNullOrder?: OrderByNullType; + defaultOrderType?: OrderType; + enableCopy?: boolean; + maximumMemory?: number; + temporaryDirectory?: string; + useDirectIO?: boolean; + useTemporaryDirectory?: boolean; +} + +// @public +export interface IExecuteOptions { + forceMaterialized?: boolean; + rowResultFormat?: RowResultFormat; +} + +// @public +export enum OrderByNullType { + // (undocumented) + Default = 1, + // (undocumented) + Invalid = 0, + // (undocumented) + NullsFirst = 2, + // (undocumented) + NullsLast = 3 +} + +// @public +export enum OrderType { + // (undocumented) + Ascending = 2, + // (undocumented) + Default = 1, + // (undocumented) + Descending = 3, + // (undocumented) + Invalid = 0 +} + +// @public +export class ResultIterator { + // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts + // + // @internal + constructor(resultInterator: ResultIteratorClass); + close(): void; + describe(): string[][]; + fetchAllRows(): T[]; + fetchRow(): T; + get isClosed(): boolean; + get type(): ResultType; +} + +// @public +export class ResultStream extends Readable { + // @internal + constructor(resultIterator: ResultIterator); + // @internal (undocumented) + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + // @internal (undocumented) + _read(): void; + } + +// @public +export enum ResultType { + Materialized = "Materialized", + Streaming = "Streaming" +} + +// @public +export enum RowResultFormat { + Array = 1, + Object = 0 +} + + +``` diff --git a/tsconfig.json b/tsconfig.json index a082b4c..e0a8cd6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ "declaration": true, /* Generates corresponding '.d.ts' file. */ "declarationMap": true , /* Generates a sourcemap for each corresponding '.d.ts' file. */ "composite": false, /* Enable project compilation */ - "removeComments": true, /* Do not emit comments to output. */ + "removeComments": false, /* Do not emit comments to output. */ "importHelpers": false, /* Import emit helpers from 'tslib'. */ /* Strict Type-Checking Options */ @@ -33,7 +33,7 @@ "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ + "noUnusedLocals": false, /* Report errors on unused locals. */ "noUnusedParameters": true, /* Report errors on unused parameters. */ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ diff --git a/yarn.lock b/yarn.lock index bedae48..601d494 100644 --- a/yarn.lock +++ b/yarn.lock @@ -527,6 +527,49 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@microsoft/api-documenter@^7.11.3": + version "7.11.3" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.11.3.tgz#35ac2eaac9ab5cd31ab53b858937863601bcbc7c" + integrity sha512-tXdd+zWqufKDbbocIgMRB1AyRj0HiAI+gTIvCyAtJX9KOGFYreTt2kFPzFssPBMeNycq58zXl0fXRr+vA7WnNA== + dependencies: + "@microsoft/api-extractor-model" "7.12.0" + "@microsoft/tsdoc" "0.12.19" + "@rushstack/node-core-library" "3.35.1" + "@rushstack/ts-command-line" "4.7.7" + colors "~1.2.1" + js-yaml "~3.13.1" + resolve "~1.17.0" + +"@microsoft/api-extractor-model@7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.12.0.tgz#ad5589c166b31dad3c8669b46b050f8bc4056f1b" + integrity sha512-TxoAbL/lauS3k/brBWVsiQTnyHBwHrAGJhTuiD0tWS/eu4dLNULchcSQfcOaFS91OgDEz4lMMbClgChFuo+53Q== + dependencies: + "@microsoft/tsdoc" "0.12.19" + "@rushstack/node-core-library" "3.35.1" + +"@microsoft/api-extractor@^7.12.0": + version "7.12.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.12.0.tgz#3ab602cebaa18d357afc67471abba484d8dc20d4" + integrity sha512-YDd7AUkIayPLooMasDyV4vle1TLUQhFp2v/tGdRU+WAVbnyVUDXXa20WEfbPEZ4QVlgN+77EX6f2K6GyKd713A== + dependencies: + "@microsoft/api-extractor-model" "7.12.0" + "@microsoft/tsdoc" "0.12.19" + "@rushstack/node-core-library" "3.35.1" + "@rushstack/rig-package" "0.2.8" + "@rushstack/ts-command-line" "4.7.7" + colors "~1.2.1" + lodash "~4.17.15" + resolve "~1.17.0" + semver "~7.3.0" + source-map "~0.6.1" + typescript "~4.0.5" + +"@microsoft/tsdoc@0.12.19": + version "0.12.19" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.19.tgz#2173ccb92469aaf62031fa9499d21b16d07f9b57" + integrity sha512-IpgPxHrNxZiMNUSXqR1l/gePKPkfAmIKoDRP9hp7OwjU29ZR8WCJsOJ8iBKgw0Qk+pFwR+8Y1cy8ImLY6e9m4A== + "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -548,6 +591,40 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@rushstack/node-core-library@3.35.1": + version "3.35.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.35.1.tgz#f228f010c6ec139c2f363a49dde8faed9a7167fe" + integrity sha512-ZwnXp2loZyVUgrZ+fEKKF/EHl0ikcy6SCsd34ewYXoEAs0XWIy2VS9bemrfaFtd2VzJ/G/ZbP3xHkqRnUPKJ4Q== + dependencies: + "@types/node" "10.17.13" + colors "~1.2.1" + fs-extra "~7.0.1" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.17.0" + semver "~7.3.0" + timsort "~0.3.0" + z-schema "~3.18.3" + +"@rushstack/rig-package@0.2.8": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.8.tgz#9ac26f56b3917bfa36f91bfe037e2c3a53977a6c" + integrity sha512-Ltjeg1a5Sx7XTW9oBxmcfhHseBLnH7I/8d6tAtjx5s0r7F6WmNVJdxVmt86qNfXcFRsiGNrzLqjMwlcX3GyldQ== + dependencies: + "@types/node" "10.17.13" + resolve "~1.17.0" + strip-json-comments "~3.1.1" + +"@rushstack/ts-command-line@4.7.7": + version "4.7.7" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.7.tgz#3a983de1895a931e879ecdc8037251af00c4e78b" + integrity sha512-COSDys0WTVCORKam2hsTL32As4fHAf1RqC6FKS98hgR0Z90nh1JX8fGNkvSdxaZ6dOuNTJj3txh+SpWoHJoZJA== + dependencies: + "@types/argparse" "1.0.38" + argparse "~1.0.9" + colors "~1.2.1" + string-argv "~0.3.1" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -574,6 +651,11 @@ dependencies: defer-to-connect "^1.0.1" +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== + "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.9" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d" @@ -675,6 +757,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.27.tgz#a151873af5a5e851b51b3b065c9e63390a9e0eb1" integrity sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g== +"@types/node@10.17.13": + version "10.17.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" + integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -1010,7 +1097,7 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" -argparse@^1.0.7: +argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -1607,6 +1694,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colors@~1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -1621,7 +1713,7 @@ commander@2.9.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.9.0: +commander@^2.7.1, commander@^2.9.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2625,6 +2717,15 @@ fs-extra@^5.0.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@~7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -3038,6 +3139,11 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= +import-lazy@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== + import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -3862,6 +3968,11 @@ jest@^26.2.2: import-local "^3.0.2" jest-cli "^26.2.2" +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3875,6 +3986,14 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@~3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -4116,6 +4235,16 @@ lodash.camelcase@4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= +lodash.get@^4.0.0: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.kebabcase@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" @@ -4156,7 +4285,7 @@ lodash.upperfirst@4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= -lodash@^4, lodash@^4.17.14, lodash@^4.17.15: +lodash@^4, lodash@^4.17.14, lodash@^4.17.15, lodash@~4.17.15: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== @@ -4176,6 +4305,13 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -5331,7 +5467,7 @@ resolve@^1.1.6: is-core-module "^2.1.0" path-parse "^1.0.6" -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2, resolve@~1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -5472,6 +5608,13 @@ semver@~5.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= +semver@~7.3.0: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -5752,6 +5895,11 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +string-argv@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -5878,7 +6026,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -6008,6 +6156,11 @@ through2@~0.6.3: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +timsort@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -6199,6 +6352,11 @@ typescript@^4.0.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== +typescript@~4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" + integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== + undefsafe@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.3.tgz#6b166e7094ad46313b2202da7ecc2cd7cc6e7aae" @@ -6346,6 +6504,11 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +validator@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" + integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -6534,6 +6697,11 @@ yallist@^3.0.0, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -6571,3 +6739,14 @@ yargs@^3.6.0: string-width "^1.0.1" window-size "^0.1.4" y18n "^3.2.0" + +z-schema@~3.18.3: + version "3.18.4" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2" + integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== + dependencies: + lodash.get "^4.0.0" + lodash.isequal "^4.0.0" + validator "^8.0.0" + optionalDependencies: + commander "^2.7.1" From ca6b18289c12b281a427bae6aca881f66f20e554 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 19:05:03 +0300 Subject: [PATCH 03/17] wip --- markdown/index.md | 2 +- markdown/node-duckdb.accessmode.md | 2 +- markdown/node-duckdb.connection._constructor_.md | 2 +- markdown/node-duckdb.connection.close.md | 2 +- markdown/node-duckdb.connection.execute.md | 2 +- markdown/node-duckdb.connection.executeiterator.md | 2 +- markdown/node-duckdb.connection.isclosed.md | 2 +- markdown/node-duckdb.connection.md | 2 +- markdown/node-duckdb.duckdb._constructor_.md | 2 +- markdown/node-duckdb.duckdb.accessmode.md | 2 +- markdown/node-duckdb.duckdb.checkpointwalsize.md | 2 +- markdown/node-duckdb.duckdb.close.md | 2 +- markdown/node-duckdb.duckdb.collation.md | 2 +- markdown/node-duckdb.duckdb.defaultnullorder.md | 2 +- markdown/node-duckdb.duckdb.defaultordertype.md | 2 +- markdown/node-duckdb.duckdb.enablecopy.md | 2 +- markdown/node-duckdb.duckdb.isclosed.md | 2 +- markdown/node-duckdb.duckdb.maximummemory.md | 2 +- markdown/node-duckdb.duckdb.md | 2 +- markdown/node-duckdb.duckdb.temporarydirectory.md | 2 +- markdown/node-duckdb.duckdb.usetemporarydirectory.md | 2 +- markdown/node-duckdb.iduckdbconfig.md | 2 +- markdown/node-duckdb.iduckdbconfig.options.md | 2 +- markdown/node-duckdb.iduckdbconfig.path.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.accessmode.md | 2 +- .../node-duckdb.iduckdboptionsconfig.checkpointwalsize.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.collation.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.md | 2 +- .../node-duckdb.iduckdboptionsconfig.temporarydirectory.md | 2 +- markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md | 2 +- .../node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md | 2 +- markdown/node-duckdb.iexecuteoptions.forcematerialized.md | 2 +- markdown/node-duckdb.iexecuteoptions.md | 2 +- markdown/node-duckdb.iexecuteoptions.rowresultformat.md | 2 +- markdown/node-duckdb.md | 4 ++-- markdown/node-duckdb.orderbynulltype.md | 2 +- markdown/node-duckdb.ordertype.md | 2 +- markdown/node-duckdb.resultiterator.close.md | 2 +- markdown/node-duckdb.resultiterator.describe.md | 2 +- markdown/node-duckdb.resultiterator.fetchallrows.md | 2 +- markdown/node-duckdb.resultiterator.fetchrow.md | 2 +- markdown/node-duckdb.resultiterator.isclosed.md | 2 +- markdown/node-duckdb.resultiterator.md | 2 +- markdown/node-duckdb.resultiterator.type.md | 2 +- markdown/node-duckdb.resultstream.md | 2 +- markdown/node-duckdb.resulttype.md | 2 +- markdown/node-duckdb.rowresultformat.md | 2 +- package.json | 2 +- replace.sh | 3 +++ temp/node-duckdb.api.json | 2 +- 54 files changed, 57 insertions(+), 54 deletions(-) create mode 100755 replace.sh diff --git a/markdown/index.md b/markdown/index.md index 699c49f..6f897d4 100644 --- a/markdown/index.md +++ b/markdown/index.md @@ -8,5 +8,5 @@ | Package | Description | | --- | --- | -| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/) | +| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). | diff --git a/markdown/node-duckdb.accessmode.md b/markdown/node-duckdb.accessmode.md index da39ee9..073d79e 100644 --- a/markdown/node-duckdb.accessmode.md +++ b/markdown/node-duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) ## AccessMode enum diff --git a/markdown/node-duckdb.connection._constructor_.md b/markdown/node-duckdb.connection._constructor_.md index 429381e..bafaf1d 100644 --- a/markdown/node-duckdb.connection._constructor_.md +++ b/markdown/node-duckdb.connection._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) ## Connection.(constructor) diff --git a/markdown/node-duckdb.connection.close.md b/markdown/node-duckdb.connection.close.md index 916461b..3fdf4e8 100644 --- a/markdown/node-duckdb.connection.close.md +++ b/markdown/node-duckdb.connection.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) ## Connection.close() method diff --git a/markdown/node-duckdb.connection.execute.md b/markdown/node-duckdb.connection.execute.md index 504bc9d..87009a6 100644 --- a/markdown/node-duckdb.connection.execute.md +++ b/markdown/node-duckdb.connection.execute.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) ## Connection.execute() method diff --git a/markdown/node-duckdb.connection.executeiterator.md b/markdown/node-duckdb.connection.executeiterator.md index c1c0ad4..8c2af32 100644 --- a/markdown/node-duckdb.connection.executeiterator.md +++ b/markdown/node-duckdb.connection.executeiterator.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) ## Connection.executeIterator() method diff --git a/markdown/node-duckdb.connection.isclosed.md b/markdown/node-duckdb.connection.isclosed.md index f220382..c20d88a 100644 --- a/markdown/node-duckdb.connection.isclosed.md +++ b/markdown/node-duckdb.connection.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) ## Connection.isClosed property diff --git a/markdown/node-duckdb.connection.md b/markdown/node-duckdb.connection.md index e5fa162..fa62b9d 100644 --- a/markdown/node-duckdb.connection.md +++ b/markdown/node-duckdb.connection.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) ## Connection class diff --git a/markdown/node-duckdb.duckdb._constructor_.md b/markdown/node-duckdb.duckdb._constructor_.md index 9df6b2f..d6b7d8d 100644 --- a/markdown/node-duckdb.duckdb._constructor_.md +++ b/markdown/node-duckdb.duckdb._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) ## DuckDB.(constructor) diff --git a/markdown/node-duckdb.duckdb.accessmode.md b/markdown/node-duckdb.duckdb.accessmode.md index a0f30b9..02b7dfb 100644 --- a/markdown/node-duckdb.duckdb.accessmode.md +++ b/markdown/node-duckdb.duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) ## DuckDB.accessMode property diff --git a/markdown/node-duckdb.duckdb.checkpointwalsize.md b/markdown/node-duckdb.duckdb.checkpointwalsize.md index fdaf66d..626714f 100644 --- a/markdown/node-duckdb.duckdb.checkpointwalsize.md +++ b/markdown/node-duckdb.duckdb.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) ## DuckDB.checkPointWALSize property diff --git a/markdown/node-duckdb.duckdb.close.md b/markdown/node-duckdb.duckdb.close.md index 1f85860..b79eb49 100644 --- a/markdown/node-duckdb.duckdb.close.md +++ b/markdown/node-duckdb.duckdb.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) ## DuckDB.close() method diff --git a/markdown/node-duckdb.duckdb.collation.md b/markdown/node-duckdb.duckdb.collation.md index db6d5af..c67beb1 100644 --- a/markdown/node-duckdb.duckdb.collation.md +++ b/markdown/node-duckdb.duckdb.collation.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) ## DuckDB.collation property diff --git a/markdown/node-duckdb.duckdb.defaultnullorder.md b/markdown/node-duckdb.duckdb.defaultnullorder.md index a380c5f..775c50a 100644 --- a/markdown/node-duckdb.duckdb.defaultnullorder.md +++ b/markdown/node-duckdb.duckdb.defaultnullorder.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) ## DuckDB.defaultNullOrder property diff --git a/markdown/node-duckdb.duckdb.defaultordertype.md b/markdown/node-duckdb.duckdb.defaultordertype.md index 581f655..fd0b322 100644 --- a/markdown/node-duckdb.duckdb.defaultordertype.md +++ b/markdown/node-duckdb.duckdb.defaultordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) ## DuckDB.defaultOrderType property diff --git a/markdown/node-duckdb.duckdb.enablecopy.md b/markdown/node-duckdb.duckdb.enablecopy.md index 7a405c3..502e0f2 100644 --- a/markdown/node-duckdb.duckdb.enablecopy.md +++ b/markdown/node-duckdb.duckdb.enablecopy.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) ## DuckDB.enableCopy property diff --git a/markdown/node-duckdb.duckdb.isclosed.md b/markdown/node-duckdb.duckdb.isclosed.md index 5b26d29..6e68270 100644 --- a/markdown/node-duckdb.duckdb.isclosed.md +++ b/markdown/node-duckdb.duckdb.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) ## DuckDB.isClosed property diff --git a/markdown/node-duckdb.duckdb.maximummemory.md b/markdown/node-duckdb.duckdb.maximummemory.md index 1d7fe18..83814f4 100644 --- a/markdown/node-duckdb.duckdb.maximummemory.md +++ b/markdown/node-duckdb.duckdb.maximummemory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) ## DuckDB.maximumMemory property diff --git a/markdown/node-duckdb.duckdb.md b/markdown/node-duckdb.duckdb.md index d084747..0035ece 100644 --- a/markdown/node-duckdb.duckdb.md +++ b/markdown/node-duckdb.duckdb.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) ## DuckDB class diff --git a/markdown/node-duckdb.duckdb.temporarydirectory.md b/markdown/node-duckdb.duckdb.temporarydirectory.md index 95aacb6..0de2cf2 100644 --- a/markdown/node-duckdb.duckdb.temporarydirectory.md +++ b/markdown/node-duckdb.duckdb.temporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) ## DuckDB.temporaryDirectory property diff --git a/markdown/node-duckdb.duckdb.usetemporarydirectory.md b/markdown/node-duckdb.duckdb.usetemporarydirectory.md index 9621c9b..4675fa9 100644 --- a/markdown/node-duckdb.duckdb.usetemporarydirectory.md +++ b/markdown/node-duckdb.duckdb.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) ## DuckDB.useTemporaryDirectory property diff --git a/markdown/node-duckdb.iduckdbconfig.md b/markdown/node-duckdb.iduckdbconfig.md index 4dfcb87..eac00e9 100644 --- a/markdown/node-duckdb.iduckdbconfig.md +++ b/markdown/node-duckdb.iduckdbconfig.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) ## IDuckDBConfig interface diff --git a/markdown/node-duckdb.iduckdbconfig.options.md b/markdown/node-duckdb.iduckdbconfig.options.md index 0a03ae9..5ebc455 100644 --- a/markdown/node-duckdb.iduckdbconfig.options.md +++ b/markdown/node-duckdb.iduckdbconfig.options.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) ## IDuckDBConfig.options property diff --git a/markdown/node-duckdb.iduckdbconfig.path.md b/markdown/node-duckdb.iduckdbconfig.path.md index 0875ab4..6bade0e 100644 --- a/markdown/node-duckdb.iduckdbconfig.path.md +++ b/markdown/node-duckdb.iduckdbconfig.path.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) ## IDuckDBConfig.path property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md b/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md index 529f6d8..d5a1455 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) ## IDuckDBOptionsConfig.accessMode property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md b/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md index db4568f..a2027c4 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) ## IDuckDBOptionsConfig.checkPointWALSize property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.collation.md b/markdown/node-duckdb.iduckdboptionsconfig.collation.md index 333910c..256bd56 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.collation.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.collation.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) ## IDuckDBOptionsConfig.collation property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md b/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md index 1363166..25c91ff 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) ## IDuckDBOptionsConfig.defaultNullOrder property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md b/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md index 8a72e0c..58a4adb 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) ## IDuckDBOptionsConfig.defaultOrderType property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md b/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md index 3786e7c..a0ccb9e 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) ## IDuckDBOptionsConfig.enableCopy property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md b/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md index 4263e01..ecfe2b0 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) ## IDuckDBOptionsConfig.maximumMemory property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.md b/markdown/node-duckdb.iduckdboptionsconfig.md index 70fae22..281799a 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) ## IDuckDBOptionsConfig interface diff --git a/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md b/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md index 40925a5..747ab2a 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) ## IDuckDBOptionsConfig.temporaryDirectory property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md b/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md index 59b74e2..ce657fd 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) ## IDuckDBOptionsConfig.useDirectIO property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md b/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md index edbedf6..be44757 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md +++ b/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) ## IDuckDBOptionsConfig.useTemporaryDirectory property diff --git a/markdown/node-duckdb.iexecuteoptions.forcematerialized.md b/markdown/node-duckdb.iexecuteoptions.forcematerialized.md index 12a957b..2826128 100644 --- a/markdown/node-duckdb.iexecuteoptions.forcematerialized.md +++ b/markdown/node-duckdb.iexecuteoptions.forcematerialized.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) ## IExecuteOptions.forceMaterialized property diff --git a/markdown/node-duckdb.iexecuteoptions.md b/markdown/node-duckdb.iexecuteoptions.md index e9d93a6..2299a3e 100644 --- a/markdown/node-duckdb.iexecuteoptions.md +++ b/markdown/node-duckdb.iexecuteoptions.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) ## IExecuteOptions interface diff --git a/markdown/node-duckdb.iexecuteoptions.rowresultformat.md b/markdown/node-duckdb.iexecuteoptions.rowresultformat.md index f76f735..3518240 100644 --- a/markdown/node-duckdb.iexecuteoptions.rowresultformat.md +++ b/markdown/node-duckdb.iexecuteoptions.rowresultformat.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) ## IExecuteOptions.rowResultFormat property diff --git a/markdown/node-duckdb.md b/markdown/node-duckdb.md index 02aa683..7c9a98a 100644 --- a/markdown/node-duckdb.md +++ b/markdown/node-duckdb.md @@ -1,10 +1,10 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) +[Node-DuckDB API Overview](./node-duckdb.md) ## node-duckdb package -Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/) +Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). ## Example diff --git a/markdown/node-duckdb.orderbynulltype.md b/markdown/node-duckdb.orderbynulltype.md index b14a1cf..c84aa32 100644 --- a/markdown/node-duckdb.orderbynulltype.md +++ b/markdown/node-duckdb.orderbynulltype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) ## OrderByNullType enum diff --git a/markdown/node-duckdb.ordertype.md b/markdown/node-duckdb.ordertype.md index e851a95..1eed341 100644 --- a/markdown/node-duckdb.ordertype.md +++ b/markdown/node-duckdb.ordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) ## OrderType enum diff --git a/markdown/node-duckdb.resultiterator.close.md b/markdown/node-duckdb.resultiterator.close.md index ee18c63..b6b0ae4 100644 --- a/markdown/node-duckdb.resultiterator.close.md +++ b/markdown/node-duckdb.resultiterator.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) ## ResultIterator.close() method diff --git a/markdown/node-duckdb.resultiterator.describe.md b/markdown/node-duckdb.resultiterator.describe.md index 688b6da..52551b6 100644 --- a/markdown/node-duckdb.resultiterator.describe.md +++ b/markdown/node-duckdb.resultiterator.describe.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) ## ResultIterator.describe() method diff --git a/markdown/node-duckdb.resultiterator.fetchallrows.md b/markdown/node-duckdb.resultiterator.fetchallrows.md index c756df7..1daac3d 100644 --- a/markdown/node-duckdb.resultiterator.fetchallrows.md +++ b/markdown/node-duckdb.resultiterator.fetchallrows.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) ## ResultIterator.fetchAllRows() method diff --git a/markdown/node-duckdb.resultiterator.fetchrow.md b/markdown/node-duckdb.resultiterator.fetchrow.md index a8dbddb..2c07d34 100644 --- a/markdown/node-duckdb.resultiterator.fetchrow.md +++ b/markdown/node-duckdb.resultiterator.fetchrow.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) ## ResultIterator.fetchRow() method diff --git a/markdown/node-duckdb.resultiterator.isclosed.md b/markdown/node-duckdb.resultiterator.isclosed.md index 243f340..daa7722 100644 --- a/markdown/node-duckdb.resultiterator.isclosed.md +++ b/markdown/node-duckdb.resultiterator.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) ## ResultIterator.isClosed property diff --git a/markdown/node-duckdb.resultiterator.md b/markdown/node-duckdb.resultiterator.md index 58c6ad6..b20d132 100644 --- a/markdown/node-duckdb.resultiterator.md +++ b/markdown/node-duckdb.resultiterator.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) ## ResultIterator class diff --git a/markdown/node-duckdb.resultiterator.type.md b/markdown/node-duckdb.resultiterator.type.md index 96aa128..f5306c2 100644 --- a/markdown/node-duckdb.resultiterator.type.md +++ b/markdown/node-duckdb.resultiterator.type.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) ## ResultIterator.type property diff --git a/markdown/node-duckdb.resultstream.md b/markdown/node-duckdb.resultstream.md index ec67561..b3c7b23 100644 --- a/markdown/node-duckdb.resultstream.md +++ b/markdown/node-duckdb.resultstream.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) ## ResultStream class diff --git a/markdown/node-duckdb.resulttype.md b/markdown/node-duckdb.resulttype.md index 6abfb56..bc4a048 100644 --- a/markdown/node-duckdb.resulttype.md +++ b/markdown/node-duckdb.resulttype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) ## ResultType enum diff --git a/markdown/node-duckdb.rowresultformat.md b/markdown/node-duckdb.rowresultformat.md index 9180099..914f595 100644 --- a/markdown/node-duckdb.rowresultformat.md +++ b/markdown/node-duckdb.rowresultformat.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) +[Node-DuckDB API Overview](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) ## RowResultFormat enum diff --git a/package.json b/package.json index 349b482..eed0402 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "prettier:fix": "prettier --write '**/*.{js,json,md,ts,yml}'", "postpublish": "yarn cleanup:binaries && yarn prebuild:all-targets && yarn prebuild:upload", "test": "yarn build:ts && jest --runInBand --testTimeout=60000", - "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown --input-folder temp" + "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown --input-folder temp && ./replace.sh" }, "dependencies": { "@microsoft/api-extractor": "^7.12.0", diff --git a/replace.sh b/replace.sh new file mode 100755 index 0000000..695be43 --- /dev/null +++ b/replace.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cd markdown +sed -i '' -- 's/\[Home\](.\/index\.md) > \[node-duckdb\]/[Node-DuckDB API Overview]/g' * diff --git a/temp/node-duckdb.api.json b/temp/node-duckdb.api.json index 553c9d7..7573e4c 100644 --- a/temp/node-duckdb.api.json +++ b/temp/node-duckdb.api.json @@ -7,7 +7,7 @@ }, "kind": "Package", "canonicalReference": "node-duckdb!", - "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", + "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}.\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", "name": "node-duckdb", "members": [ { From 5bcfd0d8fefc8e752eb167ba6453e2c13e2756ce Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 19:41:09 +0300 Subject: [PATCH 04/17] wip --- README.md | 117 +++++++++++++++--- CODE_OF_CONDUCT.md => docs/CODE_OF_CONDUCT.md | 0 CONTRIBUTING.md => docs/CONTRIBUTING.md | 0 docs/DEVELOPING.md | 20 +++ {markdown => docs/api}/index.md | 0 .../api}/node-duckdb.accessmode.md | 2 +- .../node-duckdb.connection._constructor_.md | 2 +- .../api}/node-duckdb.connection.close.md | 2 +- .../api}/node-duckdb.connection.execute.md | 2 +- .../node-duckdb.connection.executeiterator.md | 2 +- .../api}/node-duckdb.connection.isclosed.md | 2 +- .../api}/node-duckdb.connection.md | 2 +- .../api}/node-duckdb.duckdb._constructor_.md | 2 +- .../api}/node-duckdb.duckdb.accessmode.md | 2 +- .../node-duckdb.duckdb.checkpointwalsize.md | 2 +- .../api}/node-duckdb.duckdb.close.md | 2 +- .../api}/node-duckdb.duckdb.collation.md | 2 +- .../node-duckdb.duckdb.defaultnullorder.md | 2 +- .../node-duckdb.duckdb.defaultordertype.md | 2 +- .../api}/node-duckdb.duckdb.enablecopy.md | 2 +- .../api}/node-duckdb.duckdb.isclosed.md | 2 +- .../api}/node-duckdb.duckdb.maximummemory.md | 2 +- {markdown => docs/api}/node-duckdb.duckdb.md | 2 +- .../node-duckdb.duckdb.temporarydirectory.md | 2 +- ...ode-duckdb.duckdb.usetemporarydirectory.md | 2 +- .../api}/node-duckdb.iduckdbconfig.md | 2 +- .../api}/node-duckdb.iduckdbconfig.options.md | 2 +- .../api}/node-duckdb.iduckdbconfig.path.md | 2 +- ...-duckdb.iduckdboptionsconfig.accessmode.md | 13 ++ ....iduckdboptionsconfig.checkpointwalsize.md | 2 +- ...e-duckdb.iduckdboptionsconfig.collation.md | 13 ++ ...b.iduckdboptionsconfig.defaultnullorder.md | 2 +- ...b.iduckdboptionsconfig.defaultordertype.md | 2 +- ...-duckdb.iduckdboptionsconfig.enablecopy.md | 13 ++ ...ckdb.iduckdboptionsconfig.maximummemory.md | 2 +- .../api}/node-duckdb.iduckdboptionsconfig.md | 2 +- ...iduckdboptionsconfig.temporarydirectory.md | 2 +- ...duckdb.iduckdboptionsconfig.usedirectio.md | 2 +- ...ckdboptionsconfig.usetemporarydirectory.md | 2 +- ...uckdb.iexecuteoptions.forcematerialized.md | 2 +- .../api}/node-duckdb.iexecuteoptions.md | 2 +- ...-duckdb.iexecuteoptions.rowresultformat.md | 2 +- {markdown => docs/api}/node-duckdb.md | 2 +- .../api}/node-duckdb.orderbynulltype.md | 2 +- .../api}/node-duckdb.ordertype.md | 2 +- .../api}/node-duckdb.resultiterator.close.md | 2 +- .../node-duckdb.resultiterator.describe.md | 2 +- ...node-duckdb.resultiterator.fetchallrows.md | 2 +- .../node-duckdb.resultiterator.fetchrow.md | 2 +- .../node-duckdb.resultiterator.isclosed.md | 2 +- .../api}/node-duckdb.resultiterator.md | 2 +- .../api}/node-duckdb.resultiterator.type.md | 2 +- .../api}/node-duckdb.resultstream.md | 2 +- .../api}/node-duckdb.resulttype.md | 2 +- .../api}/node-duckdb.rowresultformat.md | 2 +- ...-duckdb.iduckdboptionsconfig.accessmode.md | 13 -- ...e-duckdb.iduckdboptionsconfig.collation.md | 13 -- ...-duckdb.iduckdboptionsconfig.enablecopy.md | 13 -- package.json | 2 +- 59 files changed, 204 insertions(+), 107 deletions(-) rename CODE_OF_CONDUCT.md => docs/CODE_OF_CONDUCT.md (100%) rename CONTRIBUTING.md => docs/CONTRIBUTING.md (100%) create mode 100644 docs/DEVELOPING.md rename {markdown => docs/api}/index.md (100%) rename {markdown => docs/api}/node-duckdb.accessmode.md (76%) rename {markdown => docs/api}/node-duckdb.connection._constructor_.md (73%) rename {markdown => docs/api}/node-duckdb.connection.close.md (81%) rename {markdown => docs/api}/node-duckdb.connection.execute.md (89%) rename {markdown => docs/api}/node-duckdb.connection.executeiterator.md (87%) rename {markdown => docs/api}/node-duckdb.connection.isclosed.md (58%) rename {markdown => docs/api}/node-duckdb.connection.md (91%) rename {markdown => docs/api}/node-duckdb.duckdb._constructor_.md (84%) rename {markdown => docs/api}/node-duckdb.duckdb.accessmode.md (61%) rename {markdown => docs/api}/node-duckdb.duckdb.checkpointwalsize.md (59%) rename {markdown => docs/api}/node-duckdb.duckdb.close.md (80%) rename {markdown => docs/api}/node-duckdb.duckdb.collation.md (57%) rename {markdown => docs/api}/node-duckdb.duckdb.defaultnullorder.md (62%) rename {markdown => docs/api}/node-duckdb.duckdb.defaultordertype.md (60%) rename {markdown => docs/api}/node-duckdb.duckdb.enablecopy.md (58%) rename {markdown => docs/api}/node-duckdb.duckdb.isclosed.md (61%) rename {markdown => docs/api}/node-duckdb.duckdb.maximummemory.md (58%) rename {markdown => docs/api}/node-duckdb.duckdb.md (94%) rename {markdown => docs/api}/node-duckdb.duckdb.temporarydirectory.md (58%) rename {markdown => docs/api}/node-duckdb.duckdb.usetemporarydirectory.md (63%) rename {markdown => docs/api}/node-duckdb.iduckdbconfig.md (81%) rename {markdown => docs/api}/node-duckdb.iduckdbconfig.options.md (51%) rename {markdown => docs/api}/node-duckdb.iduckdbconfig.path.md (58%) create mode 100644 docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md (52%) create mode 100644 docs/api/node-duckdb.iduckdboptionsconfig.collation.md rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.defaultnullorder.md (52%) rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.defaultordertype.md (50%) create mode 100644 docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.maximummemory.md (53%) rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.md (92%) rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.temporarydirectory.md (52%) rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.usedirectio.md (51%) rename {markdown => docs/api}/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md (55%) rename {markdown => docs/api}/node-duckdb.iexecuteoptions.forcematerialized.md (69%) rename {markdown => docs/api}/node-duckdb.iexecuteoptions.md (85%) rename {markdown => docs/api}/node-duckdb.iexecuteoptions.rowresultformat.md (51%) rename {markdown => docs/api}/node-duckdb.md (95%) rename {markdown => docs/api}/node-duckdb.orderbynulltype.md (75%) rename {markdown => docs/api}/node-duckdb.ordertype.md (77%) rename {markdown => docs/api}/node-duckdb.resultiterator.close.md (62%) rename {markdown => docs/api}/node-duckdb.resultiterator.describe.md (57%) rename {markdown => docs/api}/node-duckdb.resultiterator.fetchallrows.md (68%) rename {markdown => docs/api}/node-duckdb.resultiterator.fetchrow.md (61%) rename {markdown => docs/api}/node-duckdb.resultiterator.isclosed.md (57%) rename {markdown => docs/api}/node-duckdb.resultiterator.md (90%) rename {markdown => docs/api}/node-duckdb.resultiterator.type.md (64%) rename {markdown => docs/api}/node-duckdb.resultstream.md (80%) rename {markdown => docs/api}/node-duckdb.resulttype.md (81%) rename {markdown => docs/api}/node-duckdb.rowresultformat.md (76%) delete mode 100644 markdown/node-duckdb.iduckdboptionsconfig.accessmode.md delete mode 100644 markdown/node-duckdb.iduckdboptionsconfig.collation.md delete mode 100644 markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md diff --git a/README.md b/README.md index 92e19d7..0f5811e 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,114 @@ # Node-DuckDB +--- +###### [API](https://github.com/deepcrawl/node-duckdb/docs/api/node-duckdb.md) | [Code Of Conduct](https://github.com/deepcrawl/node-duckdb/docs/CODE_OF_CONDUCT.md) | [Contributing](https://github.com/deepcrawl/node-duckdb/docs/CONTRIBUTING.md) | [Developing](https://github.com/deepcrawl/node-duckdb/docs/DEVELOPING.md) + +> Production ready DuckDB Node.js library written in TypeScript. +[](https://www.deepcrawl.com/) + + ## Overview - This is a library that adds support for [DuckDB](https://duckdb.org/) to NodeJS. -- It comes preinstalled with DuckDB ver 0.2.2 with the parquet extension included. +- It comes preinstalled with DuckDB ver 0.2.2 with the **parquet** extension included. - Has been tested to work with Linux and MacOS. - Currently supports NodeJS v12.17.0+. - Supports BIGINT and HUGEINT types as [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). -- Provides an async API and a streaming one. +- Provides a **Promise**-based API and a **Stream**-based one. +## Getting Started +### Installation +To use Node-DuckDB in your project: +``` +npm i node-duckdb +``` +or +``` +yarn add node-duckdb +``` +Note: this will download the duckdb binary for your platform (currently Linux and MacOS are supported), or if it's not available will attempt to build it. +### Usage +Using node-duckdb is really simple: +``` +const db = new DuckDB(); +const connection = new Connection(db); +await connection.execute("SELECT * FROM mytable;"); +``` +#### Promise API example +A simple example using promises: -## Using +``` +import { Connection, DuckDB } from "node-duckdb"; -[See examples](https://github.com/deepcrawl/node-duckdb/tree/master/examples) +async function queryDatabaseWithIterator() { + // create new database in memory + const db = new DuckDB(); + // create a new connection to the database + const connection = new Connection(db); -## Developing + // perform some queries + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + + // fetch and print result + console.log(result.fetchAllRows()); + + // release resources + connection.close(); + db.close(); +} + +queryDatabaseWithIterator(); + +``` +#### Streaming API example +A simple demo of reading from DuckDB, transforming to CSV and writing to file using the streaming API: -First build: +``` +import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; +import { createWriteStream } from "fs"; +import { Transform } from "stream"; -1. `yarn install` - installs dependencies including downloading duckdb -2. `yarn build:ts` - builds typescript -3. `yarn test` - runs all tests -Other useful scripts: +class ArrayToCsvTransform extends Transform { + constructor() { + super({objectMode: true}) + } + _transform(chunk: any[], _encoding: string, callback: any) { + this.push(chunk.join(",") + '\n'); + callback(); + } +} -- `yarn build` - build everything -- `yarn build:addon` - build just the bindings code -- `yarn build:duckdb` - build just the duckdb database -- `yarn build:ts` - build just the typescript code -- `yarn lint` - lint the project -- `yarn test` - run all tests -- `yarn test csv` - run just the csv test suite +async function outputToFileAsCsv() { + // create new database in memory + const db = new DuckDB(); + // create a new connection to the database + // note you can execute only one streaming query at a time per one connection + const connection = new Connection(db); -## Publishing + // by default a query is a streaming one, as opposed to being materialized + await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); -- `export GITHUB_TOKEN=` - create a PAT in github that allows uploading artifacts to github releases -- `yarn login && yarn publish` - publish will do a bunch of various stuff, including prebuilding binaries for linux/mac and publishing those + // result is a stream of arrays + const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + + const transformToCsvStream = new ArrayToCsvTransform(); + const writeStream = createWriteStream("my-people-output"); + // objects -> csv strings -> file + resultStream.pipe(transformToCsvStream).pipe(writeStream); +} + +outputToFileAsCsv(); + +``` + +#### Complete sample project +You can see a complete sample project using node-duckdb [here](https://github.com/deepcrawl/node-duckdb/tree/master/examples). + +## API +API documentation is found [here](https://github.com/deepcrawl/node-duckdb/docs/api/node-duckdb.md). + +## Developing +Documentation for developers is found [here](https://github.com/deepcrawl/node-duckdb/docs/DEVELOPING.md). diff --git a/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to docs/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md new file mode 100644 index 0000000..258ab22 --- /dev/null +++ b/docs/DEVELOPING.md @@ -0,0 +1,20 @@ +## Developing +First build: + +1. `yarn install` - installs dependencies including downloading duckdb +2. `yarn build:ts` - builds typescript +3. `yarn test` - runs all tests + +Other useful scripts: +- `yarn build` - build everything +- `yarn build:addon` - build just the bindings code +- `yarn build:duckdb` - build just the duckdb database +- `yarn build:ts` - build just the typescript code +- `yarn lint` - lint the project +- `yarn test` - run all tests +- `yarn test csv` - run just the csv test suite + +## Publishing + +- `export GITHUB_TOKEN=` - create a PAT in github that allows uploading artifacts to github releases +- `yarn login && yarn publish` - publish will do a bunch of various stuff, including prebuilding binaries for linux/mac and publishing those diff --git a/markdown/index.md b/docs/api/index.md similarity index 100% rename from markdown/index.md rename to docs/api/index.md diff --git a/markdown/node-duckdb.accessmode.md b/docs/api/node-duckdb.accessmode.md similarity index 76% rename from markdown/node-duckdb.accessmode.md rename to docs/api/node-duckdb.accessmode.md index 073d79e..da39ee9 100644 --- a/markdown/node-duckdb.accessmode.md +++ b/docs/api/node-duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) ## AccessMode enum diff --git a/markdown/node-duckdb.connection._constructor_.md b/docs/api/node-duckdb.connection._constructor_.md similarity index 73% rename from markdown/node-duckdb.connection._constructor_.md rename to docs/api/node-duckdb.connection._constructor_.md index bafaf1d..429381e 100644 --- a/markdown/node-duckdb.connection._constructor_.md +++ b/docs/api/node-duckdb.connection._constructor_.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) ## Connection.(constructor) diff --git a/markdown/node-duckdb.connection.close.md b/docs/api/node-duckdb.connection.close.md similarity index 81% rename from markdown/node-duckdb.connection.close.md rename to docs/api/node-duckdb.connection.close.md index 3fdf4e8..916461b 100644 --- a/markdown/node-duckdb.connection.close.md +++ b/docs/api/node-duckdb.connection.close.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) ## Connection.close() method diff --git a/markdown/node-duckdb.connection.execute.md b/docs/api/node-duckdb.connection.execute.md similarity index 89% rename from markdown/node-duckdb.connection.execute.md rename to docs/api/node-duckdb.connection.execute.md index 87009a6..504bc9d 100644 --- a/markdown/node-duckdb.connection.execute.md +++ b/docs/api/node-duckdb.connection.execute.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) ## Connection.execute() method diff --git a/markdown/node-duckdb.connection.executeiterator.md b/docs/api/node-duckdb.connection.executeiterator.md similarity index 87% rename from markdown/node-duckdb.connection.executeiterator.md rename to docs/api/node-duckdb.connection.executeiterator.md index 8c2af32..c1c0ad4 100644 --- a/markdown/node-duckdb.connection.executeiterator.md +++ b/docs/api/node-duckdb.connection.executeiterator.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) ## Connection.executeIterator() method diff --git a/markdown/node-duckdb.connection.isclosed.md b/docs/api/node-duckdb.connection.isclosed.md similarity index 58% rename from markdown/node-duckdb.connection.isclosed.md rename to docs/api/node-duckdb.connection.isclosed.md index c20d88a..f220382 100644 --- a/markdown/node-duckdb.connection.isclosed.md +++ b/docs/api/node-duckdb.connection.isclosed.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) ## Connection.isClosed property diff --git a/markdown/node-duckdb.connection.md b/docs/api/node-duckdb.connection.md similarity index 91% rename from markdown/node-duckdb.connection.md rename to docs/api/node-duckdb.connection.md index fa62b9d..e5fa162 100644 --- a/markdown/node-duckdb.connection.md +++ b/docs/api/node-duckdb.connection.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) ## Connection class diff --git a/markdown/node-duckdb.duckdb._constructor_.md b/docs/api/node-duckdb.duckdb._constructor_.md similarity index 84% rename from markdown/node-duckdb.duckdb._constructor_.md rename to docs/api/node-duckdb.duckdb._constructor_.md index d6b7d8d..9df6b2f 100644 --- a/markdown/node-duckdb.duckdb._constructor_.md +++ b/docs/api/node-duckdb.duckdb._constructor_.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) ## DuckDB.(constructor) diff --git a/markdown/node-duckdb.duckdb.accessmode.md b/docs/api/node-duckdb.duckdb.accessmode.md similarity index 61% rename from markdown/node-duckdb.duckdb.accessmode.md rename to docs/api/node-duckdb.duckdb.accessmode.md index 02b7dfb..a0f30b9 100644 --- a/markdown/node-duckdb.duckdb.accessmode.md +++ b/docs/api/node-duckdb.duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) ## DuckDB.accessMode property diff --git a/markdown/node-duckdb.duckdb.checkpointwalsize.md b/docs/api/node-duckdb.duckdb.checkpointwalsize.md similarity index 59% rename from markdown/node-duckdb.duckdb.checkpointwalsize.md rename to docs/api/node-duckdb.duckdb.checkpointwalsize.md index 626714f..fdaf66d 100644 --- a/markdown/node-duckdb.duckdb.checkpointwalsize.md +++ b/docs/api/node-duckdb.duckdb.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) ## DuckDB.checkPointWALSize property diff --git a/markdown/node-duckdb.duckdb.close.md b/docs/api/node-duckdb.duckdb.close.md similarity index 80% rename from markdown/node-duckdb.duckdb.close.md rename to docs/api/node-duckdb.duckdb.close.md index b79eb49..1f85860 100644 --- a/markdown/node-duckdb.duckdb.close.md +++ b/docs/api/node-duckdb.duckdb.close.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) ## DuckDB.close() method diff --git a/markdown/node-duckdb.duckdb.collation.md b/docs/api/node-duckdb.duckdb.collation.md similarity index 57% rename from markdown/node-duckdb.duckdb.collation.md rename to docs/api/node-duckdb.duckdb.collation.md index c67beb1..db6d5af 100644 --- a/markdown/node-duckdb.duckdb.collation.md +++ b/docs/api/node-duckdb.duckdb.collation.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) ## DuckDB.collation property diff --git a/markdown/node-duckdb.duckdb.defaultnullorder.md b/docs/api/node-duckdb.duckdb.defaultnullorder.md similarity index 62% rename from markdown/node-duckdb.duckdb.defaultnullorder.md rename to docs/api/node-duckdb.duckdb.defaultnullorder.md index 775c50a..a380c5f 100644 --- a/markdown/node-duckdb.duckdb.defaultnullorder.md +++ b/docs/api/node-duckdb.duckdb.defaultnullorder.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) ## DuckDB.defaultNullOrder property diff --git a/markdown/node-duckdb.duckdb.defaultordertype.md b/docs/api/node-duckdb.duckdb.defaultordertype.md similarity index 60% rename from markdown/node-duckdb.duckdb.defaultordertype.md rename to docs/api/node-duckdb.duckdb.defaultordertype.md index fd0b322..581f655 100644 --- a/markdown/node-duckdb.duckdb.defaultordertype.md +++ b/docs/api/node-duckdb.duckdb.defaultordertype.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) ## DuckDB.defaultOrderType property diff --git a/markdown/node-duckdb.duckdb.enablecopy.md b/docs/api/node-duckdb.duckdb.enablecopy.md similarity index 58% rename from markdown/node-duckdb.duckdb.enablecopy.md rename to docs/api/node-duckdb.duckdb.enablecopy.md index 502e0f2..7a405c3 100644 --- a/markdown/node-duckdb.duckdb.enablecopy.md +++ b/docs/api/node-duckdb.duckdb.enablecopy.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) ## DuckDB.enableCopy property diff --git a/markdown/node-duckdb.duckdb.isclosed.md b/docs/api/node-duckdb.duckdb.isclosed.md similarity index 61% rename from markdown/node-duckdb.duckdb.isclosed.md rename to docs/api/node-duckdb.duckdb.isclosed.md index 6e68270..5b26d29 100644 --- a/markdown/node-duckdb.duckdb.isclosed.md +++ b/docs/api/node-duckdb.duckdb.isclosed.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) ## DuckDB.isClosed property diff --git a/markdown/node-duckdb.duckdb.maximummemory.md b/docs/api/node-duckdb.duckdb.maximummemory.md similarity index 58% rename from markdown/node-duckdb.duckdb.maximummemory.md rename to docs/api/node-duckdb.duckdb.maximummemory.md index 83814f4..1d7fe18 100644 --- a/markdown/node-duckdb.duckdb.maximummemory.md +++ b/docs/api/node-duckdb.duckdb.maximummemory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) ## DuckDB.maximumMemory property diff --git a/markdown/node-duckdb.duckdb.md b/docs/api/node-duckdb.duckdb.md similarity index 94% rename from markdown/node-duckdb.duckdb.md rename to docs/api/node-duckdb.duckdb.md index 0035ece..d084747 100644 --- a/markdown/node-duckdb.duckdb.md +++ b/docs/api/node-duckdb.duckdb.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) ## DuckDB class diff --git a/markdown/node-duckdb.duckdb.temporarydirectory.md b/docs/api/node-duckdb.duckdb.temporarydirectory.md similarity index 58% rename from markdown/node-duckdb.duckdb.temporarydirectory.md rename to docs/api/node-duckdb.duckdb.temporarydirectory.md index 0de2cf2..95aacb6 100644 --- a/markdown/node-duckdb.duckdb.temporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.temporarydirectory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) ## DuckDB.temporaryDirectory property diff --git a/markdown/node-duckdb.duckdb.usetemporarydirectory.md b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md similarity index 63% rename from markdown/node-duckdb.duckdb.usetemporarydirectory.md rename to docs/api/node-duckdb.duckdb.usetemporarydirectory.md index 4675fa9..9621c9b 100644 --- a/markdown/node-duckdb.duckdb.usetemporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) ## DuckDB.useTemporaryDirectory property diff --git a/markdown/node-duckdb.iduckdbconfig.md b/docs/api/node-duckdb.iduckdbconfig.md similarity index 81% rename from markdown/node-duckdb.iduckdbconfig.md rename to docs/api/node-duckdb.iduckdbconfig.md index eac00e9..4dfcb87 100644 --- a/markdown/node-duckdb.iduckdbconfig.md +++ b/docs/api/node-duckdb.iduckdbconfig.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) ## IDuckDBConfig interface diff --git a/markdown/node-duckdb.iduckdbconfig.options.md b/docs/api/node-duckdb.iduckdbconfig.options.md similarity index 51% rename from markdown/node-duckdb.iduckdbconfig.options.md rename to docs/api/node-duckdb.iduckdbconfig.options.md index 5ebc455..0a03ae9 100644 --- a/markdown/node-duckdb.iduckdbconfig.options.md +++ b/docs/api/node-duckdb.iduckdbconfig.options.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) ## IDuckDBConfig.options property diff --git a/markdown/node-duckdb.iduckdbconfig.path.md b/docs/api/node-duckdb.iduckdbconfig.path.md similarity index 58% rename from markdown/node-duckdb.iduckdbconfig.path.md rename to docs/api/node-duckdb.iduckdbconfig.path.md index 6bade0e..0875ab4 100644 --- a/markdown/node-duckdb.iduckdbconfig.path.md +++ b/docs/api/node-duckdb.iduckdbconfig.path.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) ## IDuckDBConfig.path property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md new file mode 100644 index 0000000..529f6d8 --- /dev/null +++ b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) + +## IDuckDBOptionsConfig.accessMode property + +Access Mode + +Signature: + +```typescript +accessMode?: AccessMode; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md similarity index 52% rename from markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md rename to docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md index a2027c4..db4568f 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) ## IDuckDBOptionsConfig.checkPointWALSize property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.collation.md b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md new file mode 100644 index 0000000..333910c --- /dev/null +++ b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) + +## IDuckDBOptionsConfig.collation property + +Collation + +Signature: + +```typescript +collation?: string; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md similarity index 52% rename from markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md rename to docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md index 25c91ff..1363166 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.defaultnullorder.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) ## IDuckDBOptionsConfig.defaultNullOrder property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md similarity index 50% rename from markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md rename to docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md index 58a4adb..8a72e0c 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.defaultordertype.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) ## IDuckDBOptionsConfig.defaultOrderType property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md new file mode 100644 index 0000000..3786e7c --- /dev/null +++ b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) + +## IDuckDBOptionsConfig.enableCopy property + +Enable Copy + +Signature: + +```typescript +enableCopy?: boolean; +``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md similarity index 53% rename from markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md rename to docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md index ecfe2b0..4263e01 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.maximummemory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) ## IDuckDBOptionsConfig.maximumMemory property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.md b/docs/api/node-duckdb.iduckdboptionsconfig.md similarity index 92% rename from markdown/node-duckdb.iduckdboptionsconfig.md rename to docs/api/node-duckdb.iduckdboptionsconfig.md index 281799a..70fae22 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) ## IDuckDBOptionsConfig interface diff --git a/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md similarity index 52% rename from markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md rename to docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md index 747ab2a..40925a5 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.temporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) ## IDuckDBOptionsConfig.temporaryDirectory property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md similarity index 51% rename from markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md rename to docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md index ce657fd..59b74e2 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.usedirectio.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) ## IDuckDBOptionsConfig.useDirectIO property diff --git a/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md similarity index 55% rename from markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md rename to docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md index be44757..edbedf6 100644 --- a/markdown/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) ## IDuckDBOptionsConfig.useTemporaryDirectory property diff --git a/markdown/node-duckdb.iexecuteoptions.forcematerialized.md b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md similarity index 69% rename from markdown/node-duckdb.iexecuteoptions.forcematerialized.md rename to docs/api/node-duckdb.iexecuteoptions.forcematerialized.md index 2826128..12a957b 100644 --- a/markdown/node-duckdb.iexecuteoptions.forcematerialized.md +++ b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) ## IExecuteOptions.forceMaterialized property diff --git a/markdown/node-duckdb.iexecuteoptions.md b/docs/api/node-duckdb.iexecuteoptions.md similarity index 85% rename from markdown/node-duckdb.iexecuteoptions.md rename to docs/api/node-duckdb.iexecuteoptions.md index 2299a3e..e9d93a6 100644 --- a/markdown/node-duckdb.iexecuteoptions.md +++ b/docs/api/node-duckdb.iexecuteoptions.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) ## IExecuteOptions interface diff --git a/markdown/node-duckdb.iexecuteoptions.rowresultformat.md b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md similarity index 51% rename from markdown/node-duckdb.iexecuteoptions.rowresultformat.md rename to docs/api/node-duckdb.iexecuteoptions.rowresultformat.md index 3518240..f76f735 100644 --- a/markdown/node-duckdb.iexecuteoptions.rowresultformat.md +++ b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) ## IExecuteOptions.rowResultFormat property diff --git a/markdown/node-duckdb.md b/docs/api/node-duckdb.md similarity index 95% rename from markdown/node-duckdb.md rename to docs/api/node-duckdb.md index 7c9a98a..96a6bec 100644 --- a/markdown/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) ## node-duckdb package diff --git a/markdown/node-duckdb.orderbynulltype.md b/docs/api/node-duckdb.orderbynulltype.md similarity index 75% rename from markdown/node-duckdb.orderbynulltype.md rename to docs/api/node-duckdb.orderbynulltype.md index c84aa32..b14a1cf 100644 --- a/markdown/node-duckdb.orderbynulltype.md +++ b/docs/api/node-duckdb.orderbynulltype.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) ## OrderByNullType enum diff --git a/markdown/node-duckdb.ordertype.md b/docs/api/node-duckdb.ordertype.md similarity index 77% rename from markdown/node-duckdb.ordertype.md rename to docs/api/node-duckdb.ordertype.md index 1eed341..e851a95 100644 --- a/markdown/node-duckdb.ordertype.md +++ b/docs/api/node-duckdb.ordertype.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) ## OrderType enum diff --git a/markdown/node-duckdb.resultiterator.close.md b/docs/api/node-duckdb.resultiterator.close.md similarity index 62% rename from markdown/node-duckdb.resultiterator.close.md rename to docs/api/node-duckdb.resultiterator.close.md index b6b0ae4..ee18c63 100644 --- a/markdown/node-duckdb.resultiterator.close.md +++ b/docs/api/node-duckdb.resultiterator.close.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) ## ResultIterator.close() method diff --git a/markdown/node-duckdb.resultiterator.describe.md b/docs/api/node-duckdb.resultiterator.describe.md similarity index 57% rename from markdown/node-duckdb.resultiterator.describe.md rename to docs/api/node-duckdb.resultiterator.describe.md index 52551b6..688b6da 100644 --- a/markdown/node-duckdb.resultiterator.describe.md +++ b/docs/api/node-duckdb.resultiterator.describe.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) ## ResultIterator.describe() method diff --git a/markdown/node-duckdb.resultiterator.fetchallrows.md b/docs/api/node-duckdb.resultiterator.fetchallrows.md similarity index 68% rename from markdown/node-duckdb.resultiterator.fetchallrows.md rename to docs/api/node-duckdb.resultiterator.fetchallrows.md index 1daac3d..c756df7 100644 --- a/markdown/node-duckdb.resultiterator.fetchallrows.md +++ b/docs/api/node-duckdb.resultiterator.fetchallrows.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) ## ResultIterator.fetchAllRows() method diff --git a/markdown/node-duckdb.resultiterator.fetchrow.md b/docs/api/node-duckdb.resultiterator.fetchrow.md similarity index 61% rename from markdown/node-duckdb.resultiterator.fetchrow.md rename to docs/api/node-duckdb.resultiterator.fetchrow.md index 2c07d34..a8dbddb 100644 --- a/markdown/node-duckdb.resultiterator.fetchrow.md +++ b/docs/api/node-duckdb.resultiterator.fetchrow.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) ## ResultIterator.fetchRow() method diff --git a/markdown/node-duckdb.resultiterator.isclosed.md b/docs/api/node-duckdb.resultiterator.isclosed.md similarity index 57% rename from markdown/node-duckdb.resultiterator.isclosed.md rename to docs/api/node-duckdb.resultiterator.isclosed.md index daa7722..243f340 100644 --- a/markdown/node-duckdb.resultiterator.isclosed.md +++ b/docs/api/node-duckdb.resultiterator.isclosed.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) ## ResultIterator.isClosed property diff --git a/markdown/node-duckdb.resultiterator.md b/docs/api/node-duckdb.resultiterator.md similarity index 90% rename from markdown/node-duckdb.resultiterator.md rename to docs/api/node-duckdb.resultiterator.md index b20d132..58c6ad6 100644 --- a/markdown/node-duckdb.resultiterator.md +++ b/docs/api/node-duckdb.resultiterator.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) ## ResultIterator class diff --git a/markdown/node-duckdb.resultiterator.type.md b/docs/api/node-duckdb.resultiterator.type.md similarity index 64% rename from markdown/node-duckdb.resultiterator.type.md rename to docs/api/node-duckdb.resultiterator.type.md index f5306c2..96aa128 100644 --- a/markdown/node-duckdb.resultiterator.type.md +++ b/docs/api/node-duckdb.resultiterator.type.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) ## ResultIterator.type property diff --git a/markdown/node-duckdb.resultstream.md b/docs/api/node-duckdb.resultstream.md similarity index 80% rename from markdown/node-duckdb.resultstream.md rename to docs/api/node-duckdb.resultstream.md index b3c7b23..ec67561 100644 --- a/markdown/node-duckdb.resultstream.md +++ b/docs/api/node-duckdb.resultstream.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) ## ResultStream class diff --git a/markdown/node-duckdb.resulttype.md b/docs/api/node-duckdb.resulttype.md similarity index 81% rename from markdown/node-duckdb.resulttype.md rename to docs/api/node-duckdb.resulttype.md index bc4a048..6abfb56 100644 --- a/markdown/node-duckdb.resulttype.md +++ b/docs/api/node-duckdb.resulttype.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) ## ResultType enum diff --git a/markdown/node-duckdb.rowresultformat.md b/docs/api/node-duckdb.rowresultformat.md similarity index 76% rename from markdown/node-duckdb.rowresultformat.md rename to docs/api/node-duckdb.rowresultformat.md index 914f595..9180099 100644 --- a/markdown/node-duckdb.rowresultformat.md +++ b/docs/api/node-duckdb.rowresultformat.md @@ -1,6 +1,6 @@ -[Node-DuckDB API Overview](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) ## RowResultFormat enum diff --git a/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md b/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md deleted file mode 100644 index d5a1455..0000000 --- a/markdown/node-duckdb.iduckdboptionsconfig.accessmode.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) - -## IDuckDBOptionsConfig.accessMode property - -Access Mode - -Signature: - -```typescript -accessMode?: AccessMode; -``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.collation.md b/markdown/node-duckdb.iduckdboptionsconfig.collation.md deleted file mode 100644 index 256bd56..0000000 --- a/markdown/node-duckdb.iduckdboptionsconfig.collation.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) - -## IDuckDBOptionsConfig.collation property - -Collation - -Signature: - -```typescript -collation?: string; -``` diff --git a/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md b/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md deleted file mode 100644 index a0ccb9e..0000000 --- a/markdown/node-duckdb.iduckdboptionsconfig.enablecopy.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Node-DuckDB API Overview](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) - -## IDuckDBOptionsConfig.enableCopy property - -Enable Copy - -Signature: - -```typescript -enableCopy?: boolean; -``` diff --git a/package.json b/package.json index eed0402..d88140a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "prettier:fix": "prettier --write '**/*.{js,json,md,ts,yml}'", "postpublish": "yarn cleanup:binaries && yarn prebuild:all-targets && yarn prebuild:upload", "test": "yarn build:ts && jest --runInBand --testTimeout=60000", - "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown --input-folder temp && ./replace.sh" + "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp -o docs/api && ./replace.sh" }, "dependencies": { "@microsoft/api-extractor": "^7.12.0", From 37da06a802ca4581e3cb22bd76a00d8873ff3eae Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 19:44:23 +0300 Subject: [PATCH 05/17] wip --- README.md | 23 +- api-extractor.json | 397 +- docs/DEVELOPING.md | 2 + docs/api/index.md | 23 +- docs/api/node-duckdb.accessmode.md | 45 +- .../node-duckdb.connection._constructor_.md | 61 +- docs/api/node-duckdb.connection.close.md | 42 +- docs/api/node-duckdb.connection.execute.md | 113 +- .../node-duckdb.connection.executeiterator.md | 99 +- docs/api/node-duckdb.connection.isclosed.md | 26 +- docs/api/node-duckdb.connection.md | 75 +- docs/api/node-duckdb.duckdb._constructor_.md | 99 +- docs/api/node-duckdb.duckdb.accessmode.md | 26 +- .../node-duckdb.duckdb.checkpointwalsize.md | 26 +- docs/api/node-duckdb.duckdb.close.md | 42 +- docs/api/node-duckdb.duckdb.collation.md | 26 +- .../node-duckdb.duckdb.defaultnullorder.md | 26 +- .../node-duckdb.duckdb.defaultordertype.md | 26 +- docs/api/node-duckdb.duckdb.enablecopy.md | 26 +- docs/api/node-duckdb.duckdb.isclosed.md | 26 +- docs/api/node-duckdb.duckdb.maximummemory.md | 26 +- docs/api/node-duckdb.duckdb.md | 81 +- .../node-duckdb.duckdb.temporarydirectory.md | 26 +- ...ode-duckdb.duckdb.usetemporarydirectory.md | 26 +- docs/api/node-duckdb.iduckdbconfig.md | 41 +- docs/api/node-duckdb.iduckdbconfig.options.md | 22 +- docs/api/node-duckdb.iduckdbconfig.path.md | 26 +- ...-duckdb.iduckdboptionsconfig.accessmode.md | 26 +- ....iduckdboptionsconfig.checkpointwalsize.md | 26 +- ...e-duckdb.iduckdboptionsconfig.collation.md | 26 +- ...b.iduckdboptionsconfig.defaultnullorder.md | 26 +- ...b.iduckdboptionsconfig.defaultordertype.md | 26 +- ...-duckdb.iduckdboptionsconfig.enablecopy.md | 26 +- ...ckdb.iduckdboptionsconfig.maximummemory.md | 26 +- docs/api/node-duckdb.iduckdboptionsconfig.md | 57 +- ...iduckdboptionsconfig.temporarydirectory.md | 26 +- ...duckdb.iduckdboptionsconfig.usedirectio.md | 26 +- ...ckdboptionsconfig.usetemporarydirectory.md | 26 +- ...uckdb.iexecuteoptions.forcematerialized.md | 26 +- docs/api/node-duckdb.iexecuteoptions.md | 41 +- ...-duckdb.iexecuteoptions.rowresultformat.md | 26 +- docs/api/node-duckdb.md | 129 +- docs/api/node-duckdb.orderbynulltype.md | 45 +- docs/api/node-duckdb.ordertype.md | 45 +- docs/api/node-duckdb.resultiterator.close.md | 42 +- .../node-duckdb.resultiterator.describe.md | 34 +- ...node-duckdb.resultiterator.fetchallrows.md | 42 +- .../node-duckdb.resultiterator.fetchrow.md | 42 +- .../node-duckdb.resultiterator.isclosed.md | 26 +- docs/api/node-duckdb.resultiterator.md | 67 +- docs/api/node-duckdb.resultiterator.type.md | 26 +- docs/api/node-duckdb.resultstream.md | 38 +- docs/api/node-duckdb.resulttype.md | 41 +- docs/api/node-duckdb.rowresultformat.md | 41 +- etc/node-duckdb.api.md | 273 +- package.json | 4 +- src/addon-types/duckdb-config.ts | 2 +- temp/node-duckdb.api.json | 3436 ++++++++--------- temp/node-duckdb.api.md | 273 +- 59 files changed, 3079 insertions(+), 3414 deletions(-) diff --git a/README.md b/README.md index 0f5811e..a16c0d9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Node-DuckDB --- + ###### [API](https://github.com/deepcrawl/node-duckdb/docs/api/node-duckdb.md) | [Code Of Conduct](https://github.com/deepcrawl/node-duckdb/docs/CODE_OF_CONDUCT.md) | [Contributing](https://github.com/deepcrawl/node-duckdb/docs/CONTRIBUTING.md) | [Developing](https://github.com/deepcrawl/node-duckdb/docs/DEVELOPING.md) > Production ready DuckDB Node.js library written in TypeScript. -[](https://www.deepcrawl.com/) - +> [](https://www.deepcrawl.com/) ## Overview @@ -15,25 +15,37 @@ - Currently supports NodeJS v12.17.0+. - Supports BIGINT and HUGEINT types as [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). - Provides a **Promise**-based API and a **Stream**-based one. + ## Getting Started + ### Installation + To use Node-DuckDB in your project: + ``` npm i node-duckdb ``` + or + ``` yarn add node-duckdb ``` + Note: this will download the duckdb binary for your platform (currently Linux and MacOS are supported), or if it's not available will attempt to build it. + ### Usage + Using node-duckdb is really simple: + ``` const db = new DuckDB(); const connection = new Connection(db); await connection.execute("SELECT * FROM mytable;"); ``` + #### Promise API example + A simple example using promises: ``` @@ -61,7 +73,9 @@ async function queryDatabaseWithIterator() { queryDatabaseWithIterator(); ``` + #### Streaming API example + A simple demo of reading from DuckDB, transforming to CSV and writing to file using the streaming API: ``` @@ -84,7 +98,7 @@ async function outputToFileAsCsv() { // create new database in memory const db = new DuckDB(); // create a new connection to the database - // note you can execute only one streaming query at a time per one connection + // note you can execute only one streaming query at a time per one connection const connection = new Connection(db); // by default a query is a streaming one, as opposed to being materialized @@ -105,10 +119,13 @@ outputToFileAsCsv(); ``` #### Complete sample project + You can see a complete sample project using node-duckdb [here](https://github.com/deepcrawl/node-duckdb/tree/master/examples). ## API + API documentation is found [here](https://github.com/deepcrawl/node-duckdb/docs/api/node-duckdb.md). ## Developing + Documentation for developers is found [here](https://github.com/deepcrawl/node-duckdb/docs/DEVELOPING.md). diff --git a/api-extractor.json b/api-extractor.json index 9886efb..91439f6 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -1,364 +1,33 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/dist/index.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning" - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - } - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning" - // "addToApiReportFile": false - } - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } -} +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "/dist/index.d.ts", + "bundledPackages": [], + "compiler": {}, + "apiReport": { + "enabled": true + }, + "docModel": { + "enabled": true + }, + "dtsRollup": { + "enabled": true + }, + "tsdocMetadata": {}, + "messages": { + "compilerMessageReporting": { + "default": { + "logLevel": "warning" + } + }, + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + } + }, + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + } + } + } +} diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.md index 258ab22..972e81b 100644 --- a/docs/DEVELOPING.md +++ b/docs/DEVELOPING.md @@ -1,4 +1,5 @@ ## Developing + First build: 1. `yarn install` - installs dependencies including downloading duckdb @@ -6,6 +7,7 @@ First build: 3. `yarn test` - runs all tests Other useful scripts: + - `yarn build` - build everything - `yarn build:addon` - build just the bindings code - `yarn build:duckdb` - build just the duckdb database diff --git a/docs/api/index.md b/docs/api/index.md index 6f897d4..248acc9 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,12 +1,11 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| --- | --- | -| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). | - + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| ------------------------------- | --------------------------------------------------------------------------------- | +| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). | diff --git a/docs/api/node-duckdb.accessmode.md b/docs/api/node-duckdb.accessmode.md index da39ee9..49fc11f 100644 --- a/docs/api/node-duckdb.accessmode.md +++ b/docs/api/node-duckdb.accessmode.md @@ -1,23 +1,22 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) - -## AccessMode enum - -Access mode specifier - -Signature: - -```typescript -export declare enum AccessMode -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Automatic | 1 | | -| ReadOnly | 2 | | -| ReadWrite | 3 | | -| Undefined | 0 | | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) + +## AccessMode enum + +Access mode specifier + +Signature: + +```typescript +export declare enum AccessMode +``` + +## Enumeration Members + +| Member | Value | Description | +| --------- | -------------- | ----------- | +| Automatic | 1 | | +| ReadOnly | 2 | | +| ReadWrite | 3 | | +| Undefined | 0 | | diff --git a/docs/api/node-duckdb.connection._constructor_.md b/docs/api/node-duckdb.connection._constructor_.md index 429381e..6ce5a3f 100644 --- a/docs/api/node-duckdb.connection._constructor_.md +++ b/docs/api/node-duckdb.connection._constructor_.md @@ -1,31 +1,30 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) - -## Connection.(constructor) - -Connection constructor. - -Signature: - -```typescript -constructor(duckdb: DuckDB); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| duckdb | [DuckDB](./node-duckdb.duckdb.md) | [DuckDB](./node-duckdb.duckdb.md) instance to connect to. | - -## Example - -Initializing a connection: - -``` -import { DuckDB } from "node-duckdb"; -const db = new DuckDB(); -const connection = new Connection(db); - -``` - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) + +## Connection.(constructor) + +Connection constructor. + +Signature: + +```typescript +constructor(duckdb: DuckDB); +``` + +## Parameters + +| Parameter | Type | Description | +| --------- | --------------------------------- | --------------------------------------------------------- | +| duckdb | [DuckDB](./node-duckdb.duckdb.md) | [DuckDB](./node-duckdb.duckdb.md) instance to connect to. | + +## Example + +Initializing a connection: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB(); +const connection = new Connection(db); + +``` diff --git a/docs/api/node-duckdb.connection.close.md b/docs/api/node-duckdb.connection.close.md index 916461b..92168ac 100644 --- a/docs/api/node-duckdb.connection.close.md +++ b/docs/api/node-duckdb.connection.close.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) - -## Connection.close() method - -Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). - -Signature: - -```typescript -close(): void; -``` -Returns: - -void - -## Remarks - -Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) + +## Connection.close() method + +Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). + +Signature: + +```typescript +close(): void; +``` + +Returns: + +void + +## Remarks + +Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. diff --git a/docs/api/node-duckdb.connection.execute.md b/docs/api/node-duckdb.connection.execute.md index 504bc9d..b89ae7f 100644 --- a/docs/api/node-duckdb.connection.execute.md +++ b/docs/api/node-duckdb.connection.execute.md @@ -1,57 +1,56 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) - -## Connection.execute() method - -Asynchronously executes the query and returns a node.js stream that wraps the result set. - -Signature: - -```typescript -execute(command: string, options?: IExecuteOptions): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| command | string | SQL command to execute | -| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | - -Returns: - -Promise<[ResultStream](./node-duckdb.resultstream.md)<T>> - -## Example - -Streaming results of a DuckDB query into a CSV file: - -``` -import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; -import { createWriteStream } from "fs"; -import { Transform } from "stream"; -class ArrayToCsvTransform extends Transform { - constructor() { - super({objectMode: true}) - } - _transform(chunk: any[], _encoding: string, callback: any) { - this.push(chunk.join(",") + '\n'); - callback(); - } -} - -async function outputToFileAsCsv() { - const db = new DuckDB(); - const connection = new Connection(db); - await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); - const transformToCsvStream = new ArrayToCsvTransform(); - const writeStream = createWriteStream("my-people-output"); - resultStream.pipe(transformToCsvStream).pipe(writeStream); -} -outputToFileAsCsv(); - -``` - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) + +## Connection.execute() method + +Asynchronously executes the query and returns a node.js stream that wraps the result set. + +Signature: + +```typescript +execute(command: string, options?: IExecuteOptions): Promise>; +``` + +## Parameters + +| Parameter | Type | Description | +| --------- | --------------------------------------------------- | ----------------------------------------------------------------------------------- | +| command | string | SQL command to execute | +| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | + +Returns: + +Promise<[ResultStream](./node-duckdb.resultstream.md)<T>> + +## Example + +Streaming results of a DuckDB query into a CSV file: + +``` +import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; +import { createWriteStream } from "fs"; +import { Transform } from "stream"; +class ArrayToCsvTransform extends Transform { + constructor() { + super({objectMode: true}) + } + _transform(chunk: any[], _encoding: string, callback: any) { + this.push(chunk.join(",") + '\n'); + callback(); + } +} + +async function outputToFileAsCsv() { + const db = new DuckDB(); + const connection = new Connection(db); + await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + const transformToCsvStream = new ArrayToCsvTransform(); + const writeStream = createWriteStream("my-people-output"); + resultStream.pipe(transformToCsvStream).pipe(writeStream); +} +outputToFileAsCsv(); + +``` diff --git a/docs/api/node-duckdb.connection.executeiterator.md b/docs/api/node-duckdb.connection.executeiterator.md index c1c0ad4..c8b496a 100644 --- a/docs/api/node-duckdb.connection.executeiterator.md +++ b/docs/api/node-duckdb.connection.executeiterator.md @@ -1,50 +1,49 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) - -## Connection.executeIterator() method - -Asynchronously executes the query and returns an iterator that points to the first result in the result set. - -Signature: - -```typescript -executeIterator(command: string, options?: IExecuteOptions): Promise>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| command | string | SQL command to execute | -| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | - -Returns: - -Promise<[ResultIterator](./node-duckdb.resultiterator.md)<T>> - -## Example - -Printing rows: - -``` -import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; -async function queryDatabaseWithIterator() { - const db = new DuckDB(); - const connection = new Connection(db); - await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - const result = await connection.executeIterator("SELECT * FROM people;"); - // print the first row - console.log(result.fetchRow()); - // print the rest of the rows - console.log(result.fetchAllRows()); - const result2 = await connection.executeIterator("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); - console.log(result2.fetchAllRows()); - connection.close(); - db.close(); -} -queryDatabaseWithIterator(); - -``` - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) + +## Connection.executeIterator() method + +Asynchronously executes the query and returns an iterator that points to the first result in the result set. + +Signature: + +```typescript +executeIterator(command: string, options?: IExecuteOptions): Promise>; +``` + +## Parameters + +| Parameter | Type | Description | +| --------- | --------------------------------------------------- | ----------------------------------------------------------------------------------- | +| command | string | SQL command to execute | +| options | [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | optional options object of type [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | + +Returns: + +Promise<[ResultIterator](./node-duckdb.resultiterator.md)<T>> + +## Example + +Printing rows: + +``` +import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; +async function queryDatabaseWithIterator() { + const db = new DuckDB(); + const connection = new Connection(db); + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + // print the first row + console.log(result.fetchRow()); + // print the rest of the rows + console.log(result.fetchAllRows()); + const result2 = await connection.executeIterator("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); + console.log(result2.fetchAllRows()); + connection.close(); + db.close(); +} +queryDatabaseWithIterator(); + +``` diff --git a/docs/api/node-duckdb.connection.isclosed.md b/docs/api/node-duckdb.connection.isclosed.md index f220382..5b7e2f4 100644 --- a/docs/api/node-duckdb.connection.isclosed.md +++ b/docs/api/node-duckdb.connection.isclosed.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) - -## Connection.isClosed property - -If the connection is closed returns true, otherwise false. - -Signature: - -```typescript -get isClosed(): boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) + +## Connection.isClosed property + +If the connection is closed returns true, otherwise false. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/docs/api/node-duckdb.connection.md b/docs/api/node-duckdb.connection.md index e5fa162..f238110 100644 --- a/docs/api/node-duckdb.connection.md +++ b/docs/api/node-duckdb.connection.md @@ -1,38 +1,37 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) - -## Connection class - -The Connection class represents a DuckDB connection. - -Signature: - -```typescript -export declare class Connection -``` - -## Remarks - -The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(duckdb)](./node-duckdb.connection._constructor_.md) | | Connection constructor. | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [isClosed](./node-duckdb.connection.isclosed.md) | | boolean | If the connection is closed returns true, otherwise false. | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [close()](./node-duckdb.connection.close.md) | | Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). | -| [execute(command, options)](./node-duckdb.connection.execute.md) | | Asynchronously executes the query and returns a node.js stream that wraps the result set. | -| [executeIterator(command, options)](./node-duckdb.connection.executeiterator.md) | | Asynchronously executes the query and returns an iterator that points to the first result in the result set. | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) + +## Connection class + +The Connection class represents a DuckDB connection. + +Signature: + +```typescript +export declare class Connection +``` + +## Remarks + +The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. + +## Constructors + +| Constructor | Modifiers | Description | +| ------------------------------------------------------------------ | --------- | ----------------------- | +| [(constructor)(duckdb)](./node-duckdb.connection._constructor_.md) | | Connection constructor. | + +## Properties + +| Property | Modifiers | Type | Description | +| ------------------------------------------------ | --------- | ------- | ---------------------------------------------------------- | +| [isClosed](./node-duckdb.connection.isclosed.md) | | boolean | If the connection is closed returns true, otherwise false. | + +## Methods + +| Method | Modifiers | Description | +| -------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [close()](./node-duckdb.connection.close.md) | | Close the connection (also closes all [ResultStream](./node-duckdb.resultstream.md) or [ResultIterator](./node-duckdb.resultiterator.md) objects associated with this connection). | +| [execute(command, options)](./node-duckdb.connection.execute.md) | | Asynchronously executes the query and returns a node.js stream that wraps the result set. | +| [executeIterator(command, options)](./node-duckdb.connection.executeiterator.md) | | Asynchronously executes the query and returns an iterator that points to the first result in the result set. | diff --git a/docs/api/node-duckdb.duckdb._constructor_.md b/docs/api/node-duckdb.duckdb._constructor_.md index 9df6b2f..527bc4d 100644 --- a/docs/api/node-duckdb.duckdb._constructor_.md +++ b/docs/api/node-duckdb.duckdb._constructor_.md @@ -1,50 +1,49 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) - -## DuckDB.(constructor) - -DuckDB Database constructor. When called instantiates a native instance of DuckDB. - -Signature: - -```typescript -constructor(config?: IDuckDBConfig); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| config | [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | optional configuration object of type [IDuckDBConfig](./node-duckdb.iduckdbconfig.md). | - -## Example 1 - -Initializing a duckdb database in memory: - -``` -import { DuckDB } from "node-duckdb"; -const db = new DuckDB(); - -``` - -## Example 2 - -Initializing a duckdb database from file: - -``` -import { DuckDB } from "node-duckdb"; -const db = new DuckDB({ path: join(__dirname, "./mydb") }); - -``` - -## Example 3 - -Initializing a duckdb database from file and setting some additional options: - -``` -import { DuckDB, OrderType } from "node-duckdb"; -const db = new DuckDB({ path: join(__dirname, "./mydb"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } }); - -``` - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) + +## DuckDB.(constructor) + +DuckDB Database constructor. When called instantiates a native instance of DuckDB. + +Signature: + +```typescript +constructor(config?: IDuckDBConfig); +``` + +## Parameters + +| Parameter | Type | Description | +| --------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| config | [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | optional configuration object of type [IDuckDBConfig](./node-duckdb.iduckdbconfig.md). | + +## Example 1 + +Initializing a duckdb database in memory: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB(); + +``` + +## Example 2 + +Initializing a duckdb database from file: + +``` +import { DuckDB } from "node-duckdb"; +const db = new DuckDB({ path: join(__dirname, "./mydb") }); + +``` + +## Example 3 + +Initializing a duckdb database from file and setting some additional options: + +``` +import { DuckDB, OrderType } from "node-duckdb"; +const db = new DuckDB({ path: join(__dirname, "./mydb"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } }); + +``` diff --git a/docs/api/node-duckdb.duckdb.accessmode.md b/docs/api/node-duckdb.duckdb.accessmode.md index a0f30b9..24f5ff8 100644 --- a/docs/api/node-duckdb.duckdb.accessmode.md +++ b/docs/api/node-duckdb.duckdb.accessmode.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) - -## DuckDB.accessMode property - -Returns the [access mode](./node-duckdb.accessmode.md) used by the database. - -Signature: - -```typescript -get accessMode(): AccessMode; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) + +## DuckDB.accessMode property + +Returns the [access mode](./node-duckdb.accessmode.md) used by the database. + +Signature: + +```typescript +get accessMode(): AccessMode; +``` diff --git a/docs/api/node-duckdb.duckdb.checkpointwalsize.md b/docs/api/node-duckdb.duckdb.checkpointwalsize.md index fdaf66d..6b69c04 100644 --- a/docs/api/node-duckdb.duckdb.checkpointwalsize.md +++ b/docs/api/node-duckdb.duckdb.checkpointwalsize.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) - -## DuckDB.checkPointWALSize property - -Returns the checkpoint write ahead log size used by the database. - -Signature: - -```typescript -get checkPointWALSize(): number; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) + +## DuckDB.checkPointWALSize property + +Returns the checkpoint write ahead log size used by the database. + +Signature: + +```typescript +get checkPointWALSize(): number; +``` diff --git a/docs/api/node-duckdb.duckdb.close.md b/docs/api/node-duckdb.duckdb.close.md index 1f85860..f08d3db 100644 --- a/docs/api/node-duckdb.duckdb.close.md +++ b/docs/api/node-duckdb.duckdb.close.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) - -## DuckDB.close() method - -Closes the underlying duckdb database, frees associated memory and renders it unusuable. - -Signature: - -```typescript -close(): void; -``` -Returns: - -void - -## Remarks - -Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) + +## DuckDB.close() method + +Closes the underlying duckdb database, frees associated memory and renders it unusuable. + +Signature: + +```typescript +close(): void; +``` + +Returns: + +void + +## Remarks + +Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. diff --git a/docs/api/node-duckdb.duckdb.collation.md b/docs/api/node-duckdb.duckdb.collation.md index db6d5af..fa8a1b4 100644 --- a/docs/api/node-duckdb.duckdb.collation.md +++ b/docs/api/node-duckdb.duckdb.collation.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) - -## DuckDB.collation property - -Returns the collation used by the database. - -Signature: - -```typescript -get collation(): string; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) + +## DuckDB.collation property + +Returns the collation used by the database. + +Signature: + +```typescript +get collation(): string; +``` diff --git a/docs/api/node-duckdb.duckdb.defaultnullorder.md b/docs/api/node-duckdb.duckdb.defaultnullorder.md index a380c5f..8412c5e 100644 --- a/docs/api/node-duckdb.duckdb.defaultnullorder.md +++ b/docs/api/node-duckdb.duckdb.defaultnullorder.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) - -## DuckDB.defaultNullOrder property - -Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). - -Signature: - -```typescript -get defaultNullOrder(): OrderByNullType; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) + +## DuckDB.defaultNullOrder property + +Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). + +Signature: + +```typescript +get defaultNullOrder(): OrderByNullType; +``` diff --git a/docs/api/node-duckdb.duckdb.defaultordertype.md b/docs/api/node-duckdb.duckdb.defaultordertype.md index 581f655..f4dde07 100644 --- a/docs/api/node-duckdb.duckdb.defaultordertype.md +++ b/docs/api/node-duckdb.duckdb.defaultordertype.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) - -## DuckDB.defaultOrderType property - -Returns the default [sort order](./node-duckdb.ordertype.md). - -Signature: - -```typescript -get defaultOrderType(): OrderType; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) + +## DuckDB.defaultOrderType property + +Returns the default [sort order](./node-duckdb.ordertype.md). + +Signature: + +```typescript +get defaultOrderType(): OrderType; +``` diff --git a/docs/api/node-duckdb.duckdb.enablecopy.md b/docs/api/node-duckdb.duckdb.enablecopy.md index 7a405c3..5484a82 100644 --- a/docs/api/node-duckdb.duckdb.enablecopy.md +++ b/docs/api/node-duckdb.duckdb.enablecopy.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) - -## DuckDB.enableCopy property - -Returns true of copying is enabled, false otherwise. - -Signature: - -```typescript -get enableCopy(): boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) + +## DuckDB.enableCopy property + +Returns true of copying is enabled, false otherwise. + +Signature: + +```typescript +get enableCopy(): boolean; +``` diff --git a/docs/api/node-duckdb.duckdb.isclosed.md b/docs/api/node-duckdb.duckdb.isclosed.md index 5b26d29..689f591 100644 --- a/docs/api/node-duckdb.duckdb.isclosed.md +++ b/docs/api/node-duckdb.duckdb.isclosed.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) - -## DuckDB.isClosed property - -Returns true if the underlying database has been closed, false otherwise. - -Signature: - -```typescript -get isClosed(): boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) + +## DuckDB.isClosed property + +Returns true if the underlying database has been closed, false otherwise. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/docs/api/node-duckdb.duckdb.maximummemory.md b/docs/api/node-duckdb.duckdb.maximummemory.md index 1d7fe18..afe9855 100644 --- a/docs/api/node-duckdb.duckdb.maximummemory.md +++ b/docs/api/node-duckdb.duckdb.maximummemory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) - -## DuckDB.maximumMemory property - -Returns the maximum memory limit for the database. - -Signature: - -```typescript -get maximumMemory(): number; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) + +## DuckDB.maximumMemory property + +Returns the maximum memory limit for the database. + +Signature: + +```typescript +get maximumMemory(): number; +``` diff --git a/docs/api/node-duckdb.duckdb.md b/docs/api/node-duckdb.duckdb.md index d084747..7f0af5f 100644 --- a/docs/api/node-duckdb.duckdb.md +++ b/docs/api/node-duckdb.duckdb.md @@ -1,41 +1,40 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) - -## DuckDB class - -The DuckDB class represents a DuckDB database instance. - -Signature: - -```typescript -export declare class DuckDB -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(config)](./node-duckdb.duckdb._constructor_.md) | | DuckDB Database constructor. When called instantiates a native instance of DuckDB. | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [accessMode](./node-duckdb.duckdb.accessmode.md) | | [AccessMode](./node-duckdb.accessmode.md) | Returns the [access mode](./node-duckdb.accessmode.md) used by the database. | -| [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) | | number | Returns the checkpoint write ahead log size used by the database. | -| [collation](./node-duckdb.duckdb.collation.md) | | string | Returns the collation used by the database. | -| [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) | | [OrderByNullType](./node-duckdb.orderbynulltype.md) | Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). | -| [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) | | [OrderType](./node-duckdb.ordertype.md) | Returns the default [sort order](./node-duckdb.ordertype.md). | -| [enableCopy](./node-duckdb.duckdb.enablecopy.md) | | boolean | Returns true of copying is enabled, false otherwise. | -| [isClosed](./node-duckdb.duckdb.isclosed.md) | | boolean | Returns true if the underlying database has been closed, false otherwise. | -| [maximumMemory](./node-duckdb.duckdb.maximummemory.md) | | number | Returns the maximum memory limit for the database. | -| [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) | | string | Returns the temporary directory location for the database. | -| [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) | | boolean | Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [close()](./node-duckdb.duckdb.close.md) | | Closes the underlying duckdb database, frees associated memory and renders it unusuable. | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) + +## DuckDB class + +The DuckDB class represents a DuckDB database instance. + +Signature: + +```typescript +export declare class DuckDB +``` + +## Constructors + +| Constructor | Modifiers | Description | +| -------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------- | +| [(constructor)(config)](./node-duckdb.duckdb._constructor_.md) | | DuckDB Database constructor. When called instantiates a native instance of DuckDB. | + +## Properties + +| Property | Modifiers | Type | Description | +| ---------------------------------------------------------------------- | --------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| [accessMode](./node-duckdb.duckdb.accessmode.md) | | [AccessMode](./node-duckdb.accessmode.md) | Returns the [access mode](./node-duckdb.accessmode.md) used by the database. | +| [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) | | number | Returns the checkpoint write ahead log size used by the database. | +| [collation](./node-duckdb.duckdb.collation.md) | | string | Returns the collation used by the database. | +| [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) | | [OrderByNullType](./node-duckdb.orderbynulltype.md) | Returns the default [sort order for null values](./node-duckdb.orderbynulltype.md). | +| [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) | | [OrderType](./node-duckdb.ordertype.md) | Returns the default [sort order](./node-duckdb.ordertype.md). | +| [enableCopy](./node-duckdb.duckdb.enablecopy.md) | | boolean | Returns true of copying is enabled, false otherwise. | +| [isClosed](./node-duckdb.duckdb.isclosed.md) | | boolean | Returns true if the underlying database has been closed, false otherwise. | +| [maximumMemory](./node-duckdb.duckdb.maximummemory.md) | | number | Returns the maximum memory limit for the database. | +| [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) | | string | Returns the temporary directory location for the database. | +| [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) | | boolean | Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. | + +## Methods + +| Method | Modifiers | Description | +| ---------------------------------------- | --------- | ---------------------------------------------------------------------------------------- | +| [close()](./node-duckdb.duckdb.close.md) | | Closes the underlying duckdb database, frees associated memory and renders it unusuable. | diff --git a/docs/api/node-duckdb.duckdb.temporarydirectory.md b/docs/api/node-duckdb.duckdb.temporarydirectory.md index 95aacb6..a89d51b 100644 --- a/docs/api/node-duckdb.duckdb.temporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.temporarydirectory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) - -## DuckDB.temporaryDirectory property - -Returns the temporary directory location for the database. - -Signature: - -```typescript -get temporaryDirectory(): string; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) + +## DuckDB.temporaryDirectory property + +Returns the temporary directory location for the database. + +Signature: + +```typescript +get temporaryDirectory(): string; +``` diff --git a/docs/api/node-duckdb.duckdb.usetemporarydirectory.md b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md index 9621c9b..8a6cf7d 100644 --- a/docs/api/node-duckdb.duckdb.usetemporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) - -## DuckDB.useTemporaryDirectory property - -Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. - -Signature: - -```typescript -get useTemporaryDirectory(): boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) + +## DuckDB.useTemporaryDirectory property + +Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise. + +Signature: + +```typescript +get useTemporaryDirectory(): boolean; +``` diff --git a/docs/api/node-duckdb.iduckdbconfig.md b/docs/api/node-duckdb.iduckdbconfig.md index 4dfcb87..0b45fa7 100644 --- a/docs/api/node-duckdb.iduckdbconfig.md +++ b/docs/api/node-duckdb.iduckdbconfig.md @@ -1,21 +1,20 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) - -## IDuckDBConfig interface - -Configuration object for DuckDB - -Signature: - -```typescript -export interface IDuckDBConfig -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [options?](./node-duckdb.iduckdbconfig.options.md) | [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | (Optional) | -| [path?](./node-duckdb.iduckdbconfig.path.md) | string | (Optional) Path to the database file. If undefined, in-memory database is created | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) + +## IDuckDBConfig interface + +Configuration object for DuckDB + +Signature: + +```typescript +export interface IDuckDBConfig +``` + +## Properties + +| Property | Type | Description | +| -------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| [options?](./node-duckdb.iduckdbconfig.options.md) | [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | (Optional) | +| [path?](./node-duckdb.iduckdbconfig.path.md) | string | (Optional) Path to the database file. If undefined, in-memory database is created | diff --git a/docs/api/node-duckdb.iduckdbconfig.options.md b/docs/api/node-duckdb.iduckdbconfig.options.md index 0a03ae9..8e66011 100644 --- a/docs/api/node-duckdb.iduckdbconfig.options.md +++ b/docs/api/node-duckdb.iduckdbconfig.options.md @@ -1,11 +1,11 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) - -## IDuckDBConfig.options property - -Signature: - -```typescript -options?: IDuckDBOptionsConfig; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) + +## IDuckDBConfig.options property + +Signature: + +```typescript +options?: IDuckDBOptionsConfig; +``` diff --git a/docs/api/node-duckdb.iduckdbconfig.path.md b/docs/api/node-duckdb.iduckdbconfig.path.md index 0875ab4..1637fcb 100644 --- a/docs/api/node-duckdb.iduckdbconfig.path.md +++ b/docs/api/node-duckdb.iduckdbconfig.path.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) - -## IDuckDBConfig.path property - -Path to the database file. If undefined, in-memory database is created - -Signature: - -```typescript -path?: string; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) + +## IDuckDBConfig.path property + +Path to the database file. If undefined, in-memory database is created + +Signature: + +```typescript +path?: string; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md index 529f6d8..8d4cbca 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) - -## IDuckDBOptionsConfig.accessMode property - -Access Mode - -Signature: - -```typescript -accessMode?: AccessMode; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) + +## IDuckDBOptionsConfig.accessMode property + +Access Mode + +Signature: + +```typescript +accessMode?: AccessMode; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md index db4568f..ee659c3 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) - -## IDuckDBOptionsConfig.checkPointWALSize property - -Checkpoint Write Ahead Log Size (in bytes) - -Signature: - -```typescript -checkPointWALSize?: number; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) + +## IDuckDBOptionsConfig.checkPointWALSize property + +Checkpoint Write Ahead Log Size (in bytes) + +Signature: + +```typescript +checkPointWALSize?: number; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.collation.md b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md index 333910c..36e70e3 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.collation.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) - -## IDuckDBOptionsConfig.collation property - -Collation - -Signature: - -```typescript -collation?: string; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) + +## IDuckDBOptionsConfig.collation property + +Collation + +Signature: + +```typescript +collation?: string; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md index 1363166..0edd47f 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) - -## IDuckDBOptionsConfig.defaultNullOrder property - -Default order for Null values - -Signature: - -```typescript -defaultNullOrder?: OrderByNullType; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) + +## IDuckDBOptionsConfig.defaultNullOrder property + +Default order for Null values + +Signature: + +```typescript +defaultNullOrder?: OrderByNullType; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md index 8a72e0c..87b6094 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) - -## IDuckDBOptionsConfig.defaultOrderType property - -Default Order - -Signature: - -```typescript -defaultOrderType?: OrderType; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) + +## IDuckDBOptionsConfig.defaultOrderType property + +Default Order + +Signature: + +```typescript +defaultOrderType?: OrderType; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md index 3786e7c..78c63f9 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) - -## IDuckDBOptionsConfig.enableCopy property - -Enable Copy - -Signature: - -```typescript -enableCopy?: boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) + +## IDuckDBOptionsConfig.enableCopy property + +Enable Copy + +Signature: + +```typescript +enableCopy?: boolean; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md index 4263e01..32223bf 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) - -## IDuckDBOptionsConfig.maximumMemory property - -Maximum memory limit for the databse (in bytes) - -Signature: - -```typescript -maximumMemory?: number; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) + +## IDuckDBOptionsConfig.maximumMemory property + +Maximum memory limit for the databse (in bytes) + +Signature: + +```typescript +maximumMemory?: number; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.md b/docs/api/node-duckdb.iduckdboptionsconfig.md index 70fae22..189edaf 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.md @@ -1,29 +1,28 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) - -## IDuckDBOptionsConfig interface - -Options object type for the DuckDB class - -Signature: - -```typescript -export interface IDuckDBOptionsConfig -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [accessMode?](./node-duckdb.iduckdboptionsconfig.accessmode.md) | [AccessMode](./node-duckdb.accessmode.md) | (Optional) Access Mode | -| [checkPointWALSize?](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) | number | (Optional) Checkpoint Write Ahead Log Size (in bytes) | -| [collation?](./node-duckdb.iduckdboptionsconfig.collation.md) | string | (Optional) Collation | -| [defaultNullOrder?](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) | [OrderByNullType](./node-duckdb.orderbynulltype.md) | (Optional) Default order for Null values | -| [defaultOrderType?](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) | [OrderType](./node-duckdb.ordertype.md) | (Optional) Default Order | -| [enableCopy?](./node-duckdb.iduckdboptionsconfig.enablecopy.md) | boolean | (Optional) Enable Copy | -| [maximumMemory?](./node-duckdb.iduckdboptionsconfig.maximummemory.md) | number | (Optional) Maximum memory limit for the databse (in bytes) | -| [temporaryDirectory?](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) | string | (Optional) Location of the temporary directory | -| [useDirectIO?](./node-duckdb.iduckdboptionsconfig.usedirectio.md) | boolean | (Optional) Whether to use Direct IO | -| [useTemporaryDirectory?](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) | boolean | (Optional) Whether to use temporary directory to store data that doesn't fit in memory | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) + +## IDuckDBOptionsConfig interface + +Options object type for the DuckDB class + +Signature: + +```typescript +export interface IDuckDBOptionsConfig +``` + +## Properties + +| Property | Type | Description | +| ------------------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| [accessMode?](./node-duckdb.iduckdboptionsconfig.accessmode.md) | [AccessMode](./node-duckdb.accessmode.md) | (Optional) Access Mode | +| [checkPointWALSize?](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) | number | (Optional) Checkpoint Write Ahead Log Size (in bytes) | +| [collation?](./node-duckdb.iduckdboptionsconfig.collation.md) | string | (Optional) Collation | +| [defaultNullOrder?](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) | [OrderByNullType](./node-duckdb.orderbynulltype.md) | (Optional) Default order for Null values | +| [defaultOrderType?](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) | [OrderType](./node-duckdb.ordertype.md) | (Optional) Default Order | +| [enableCopy?](./node-duckdb.iduckdboptionsconfig.enablecopy.md) | boolean | (Optional) Enable Copy | +| [maximumMemory?](./node-duckdb.iduckdboptionsconfig.maximummemory.md) | number | (Optional) Maximum memory limit for the databse (in bytes) | +| [temporaryDirectory?](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) | string | (Optional) Location of the temporary directory | +| [useDirectIO?](./node-duckdb.iduckdboptionsconfig.usedirectio.md) | boolean | (Optional) Whether to use Direct IO | +| [useTemporaryDirectory?](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) | boolean | (Optional) Whether to use temporary directory to store data that doesn't fit in memory | diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md index 40925a5..555e4f7 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) - -## IDuckDBOptionsConfig.temporaryDirectory property - -Location of the temporary directory - -Signature: - -```typescript -temporaryDirectory?: string; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) + +## IDuckDBOptionsConfig.temporaryDirectory property + +Location of the temporary directory + +Signature: + +```typescript +temporaryDirectory?: string; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md index 59b74e2..f662943 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) - -## IDuckDBOptionsConfig.useDirectIO property - -Whether to use Direct IO - -Signature: - -```typescript -useDirectIO?: boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) + +## IDuckDBOptionsConfig.useDirectIO property + +Whether to use Direct IO + +Signature: + +```typescript +useDirectIO?: boolean; +``` diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md index edbedf6..7c06097 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) - -## IDuckDBOptionsConfig.useTemporaryDirectory property - -Whether to use temporary directory to store data that doesn't fit in memory - -Signature: - -```typescript -useTemporaryDirectory?: boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) + +## IDuckDBOptionsConfig.useTemporaryDirectory property + +Whether to use temporary directory to store data that doesn't fit in memory + +Signature: + +```typescript +useTemporaryDirectory?: boolean; +``` diff --git a/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md index 12a957b..467b952 100644 --- a/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md +++ b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) - -## IExecuteOptions.forceMaterialized property - -Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. - -Signature: - -```typescript -forceMaterialized?: boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) + +## IExecuteOptions.forceMaterialized property + +Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. + +Signature: + +```typescript +forceMaterialized?: boolean; +``` diff --git a/docs/api/node-duckdb.iexecuteoptions.md b/docs/api/node-duckdb.iexecuteoptions.md index e9d93a6..644358c 100644 --- a/docs/api/node-duckdb.iexecuteoptions.md +++ b/docs/api/node-duckdb.iexecuteoptions.md @@ -1,21 +1,20 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) - -## IExecuteOptions interface - -Options for connection.execute - -Signature: - -```typescript -export interface IExecuteOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [forceMaterialized?](./node-duckdb.iexecuteoptions.forcematerialized.md) | boolean | (Optional) Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. | -| [rowResultFormat?](./node-duckdb.iexecuteoptions.rowresultformat.md) | [RowResultFormat](./node-duckdb.rowresultformat.md) | (Optional) Row format | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) + +## IExecuteOptions interface + +Options for connection.execute + +Signature: + +```typescript +export interface IExecuteOptions +``` + +## Properties + +| Property | Type | Description | +| ------------------------------------------------------------------------ | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [forceMaterialized?](./node-duckdb.iexecuteoptions.forcematerialized.md) | boolean | (Optional) Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will \*attempt\* to not load the whole result set into memory at once. | +| [rowResultFormat?](./node-duckdb.iexecuteoptions.rowresultformat.md) | [RowResultFormat](./node-duckdb.rowresultformat.md) | (Optional) Row format | diff --git a/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md index f76f735..4a9acd0 100644 --- a/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md +++ b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) - -## IExecuteOptions.rowResultFormat property - -Row format - -Signature: - -```typescript -rowResultFormat?: RowResultFormat; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) + +## IExecuteOptions.rowResultFormat property + +Row format + +Signature: + +```typescript +rowResultFormat?: RowResultFormat; +``` diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index 96a6bec..b8331a2 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -1,65 +1,64 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) - -## node-duckdb package - -Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). - -## Example - -Do some simple querying and print the result - -``` -import { Connection, DuckDB } from "node-duckdb"; - -async function queryDatabaseWithIterator() { - // create new database in memory - const db = new DuckDB(); - // create a new connection to the database - const connection = new Connection(db); - - // perform some queries - await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - const result = await connection.executeIterator("SELECT * FROM people;"); - - // fetch and print result - console.log(result.fetchAllRows()); - - // release resources - connection.close(); - db.close(); -} - -queryDatabaseWithIterator(); - -``` - -## Classes - -| Class | Description | -| --- | --- | -| [Connection](./node-duckdb.connection.md) | The Connection class represents a DuckDB connection. | -| [DuckDB](./node-duckdb.duckdb.md) | The DuckDB class represents a DuckDB database instance. | -| [ResultIterator](./node-duckdb.resultiterator.md) | ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. | -| [ResultStream](./node-duckdb.resultstream.md) | This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by execute. | - -## Enumerations - -| Enumeration | Description | -| --- | --- | -| [AccessMode](./node-duckdb.accessmode.md) | Access mode specifier | -| [OrderByNullType](./node-duckdb.orderbynulltype.md) | Null order specifier | -| [OrderType](./node-duckdb.ordertype.md) | Default sort order specifier | -| [ResultType](./node-duckdb.resulttype.md) | Specifier for how DuckDB attempts to load the result | -| [RowResultFormat](./node-duckdb.rowresultformat.md) | Result format specifier for rows | - -## Interfaces - -| Interface | Description | -| --- | --- | -| [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | Configuration object for DuckDB | -| [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | Options object type for the DuckDB class | -| [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | Options for connection.execute | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) + +## node-duckdb package + +Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). + +## Example + +Do some simple querying and print the result + +``` +import { Connection, DuckDB } from "node-duckdb"; + +async function queryDatabaseWithIterator() { + // create new database in memory + const db = new DuckDB(); + // create a new connection to the database + const connection = new Connection(db); + + // perform some queries + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + + // fetch and print result + console.log(result.fetchAllRows()); + + // release resources + connection.close(); + db.close(); +} + +queryDatabaseWithIterator(); + +``` + +## Classes + +| Class | Description | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Connection](./node-duckdb.connection.md) | The Connection class represents a DuckDB connection. | +| [DuckDB](./node-duckdb.duckdb.md) | The DuckDB class represents a DuckDB database instance. | +| [ResultIterator](./node-duckdb.resultiterator.md) | ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. | +| [ResultStream](./node-duckdb.resultstream.md) | This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by execute. | + +## Enumerations + +| Enumeration | Description | +| --------------------------------------------------- | ---------------------------------------------------- | +| [AccessMode](./node-duckdb.accessmode.md) | Access mode specifier | +| [OrderByNullType](./node-duckdb.orderbynulltype.md) | Null order specifier | +| [OrderType](./node-duckdb.ordertype.md) | Default sort order specifier | +| [ResultType](./node-duckdb.resulttype.md) | Specifier for how DuckDB attempts to load the result | +| [RowResultFormat](./node-duckdb.rowresultformat.md) | Result format specifier for rows | + +## Interfaces + +| Interface | Description | +| ------------------------------------------------------------- | ---------------------------------------- | +| [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) | Configuration object for DuckDB | +| [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) | Options object type for the DuckDB class | +| [IExecuteOptions](./node-duckdb.iexecuteoptions.md) | Options for connection.execute | diff --git a/docs/api/node-duckdb.orderbynulltype.md b/docs/api/node-duckdb.orderbynulltype.md index b14a1cf..ae54cb2 100644 --- a/docs/api/node-duckdb.orderbynulltype.md +++ b/docs/api/node-duckdb.orderbynulltype.md @@ -1,23 +1,22 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) - -## OrderByNullType enum - -Null order specifier - -Signature: - -```typescript -export declare enum OrderByNullType -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Default | 1 | | -| Invalid | 0 | | -| NullsFirst | 2 | | -| NullsLast | 3 | | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) + +## OrderByNullType enum + +Null order specifier + +Signature: + +```typescript +export declare enum OrderByNullType +``` + +## Enumeration Members + +| Member | Value | Description | +| ---------- | -------------- | ----------- | +| Default | 1 | | +| Invalid | 0 | | +| NullsFirst | 2 | | +| NullsLast | 3 | | diff --git a/docs/api/node-duckdb.ordertype.md b/docs/api/node-duckdb.ordertype.md index e851a95..2764cf8 100644 --- a/docs/api/node-duckdb.ordertype.md +++ b/docs/api/node-duckdb.ordertype.md @@ -1,23 +1,22 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) - -## OrderType enum - -Default sort order specifier - -Signature: - -```typescript -export declare enum OrderType -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Ascending | 2 | | -| Default | 1 | | -| Descending | 3 | | -| Invalid | 0 | | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) + +## OrderType enum + +Default sort order specifier + +Signature: + +```typescript +export declare enum OrderType +``` + +## Enumeration Members + +| Member | Value | Description | +| ---------- | -------------- | ----------- | +| Ascending | 2 | | +| Default | 1 | | +| Descending | 3 | | +| Invalid | 0 | | diff --git a/docs/api/node-duckdb.resultiterator.close.md b/docs/api/node-duckdb.resultiterator.close.md index ee18c63..f4b0918 100644 --- a/docs/api/node-duckdb.resultiterator.close.md +++ b/docs/api/node-duckdb.resultiterator.close.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) - -## ResultIterator.close() method - -Close the ResultIterator - -Signature: - -```typescript -close(): void; -``` -Returns: - -void - -## Remarks - -`close` on the connection automatically closes all associated ResultIterators. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) + +## ResultIterator.close() method + +Close the ResultIterator + +Signature: + +```typescript +close(): void; +``` + +Returns: + +void + +## Remarks + +`close` on the connection automatically closes all associated ResultIterators. diff --git a/docs/api/node-duckdb.resultiterator.describe.md b/docs/api/node-duckdb.resultiterator.describe.md index 688b6da..8bf640c 100644 --- a/docs/api/node-duckdb.resultiterator.describe.md +++ b/docs/api/node-duckdb.resultiterator.describe.md @@ -1,17 +1,17 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) - -## ResultIterator.describe() method - -Describe the result set schema. - -Signature: - -```typescript -describe(): string[][]; -``` -Returns: - -string\[\]\[\] - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) + +## ResultIterator.describe() method + +Describe the result set schema. + +Signature: + +```typescript +describe(): string[][]; +``` + +Returns: + +string\[\]\[\] diff --git a/docs/api/node-duckdb.resultiterator.fetchallrows.md b/docs/api/node-duckdb.resultiterator.fetchallrows.md index c756df7..cd39cde 100644 --- a/docs/api/node-duckdb.resultiterator.fetchallrows.md +++ b/docs/api/node-duckdb.resultiterator.fetchallrows.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) - -## ResultIterator.fetchAllRows() method - -Fetch all rows - -Signature: - -```typescript -fetchAllRows(): T[]; -``` -Returns: - -T\[\] - -## Remarks - -Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) + +## ResultIterator.fetchAllRows() method + +Fetch all rows + +Signature: + +```typescript +fetchAllRows(): T[]; +``` + +Returns: + +T\[\] + +## Remarks + +Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. diff --git a/docs/api/node-duckdb.resultiterator.fetchrow.md b/docs/api/node-duckdb.resultiterator.fetchrow.md index a8dbddb..85e83d3 100644 --- a/docs/api/node-duckdb.resultiterator.fetchrow.md +++ b/docs/api/node-duckdb.resultiterator.fetchrow.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) - -## ResultIterator.fetchRow() method - -Fetch the next row - -Signature: - -```typescript -fetchRow(): T; -``` -Returns: - -T - -## Remarks - -First call returns the first row, when no more rows left `null` is returned. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) + +## ResultIterator.fetchRow() method + +Fetch the next row + +Signature: + +```typescript +fetchRow(): T; +``` + +Returns: + +T + +## Remarks + +First call returns the first row, when no more rows left `null` is returned. diff --git a/docs/api/node-duckdb.resultiterator.isclosed.md b/docs/api/node-duckdb.resultiterator.isclosed.md index 243f340..c296d18 100644 --- a/docs/api/node-duckdb.resultiterator.isclosed.md +++ b/docs/api/node-duckdb.resultiterator.isclosed.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) - -## ResultIterator.isClosed property - -Returns true if ResultIterator is closed, false otherwise. - -Signature: - -```typescript -get isClosed(): boolean; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) + +## ResultIterator.isClosed property + +Returns true if ResultIterator is closed, false otherwise. + +Signature: + +```typescript +get isClosed(): boolean; +``` diff --git a/docs/api/node-duckdb.resultiterator.md b/docs/api/node-duckdb.resultiterator.md index 58c6ad6..c1aed73 100644 --- a/docs/api/node-duckdb.resultiterator.md +++ b/docs/api/node-duckdb.resultiterator.md @@ -1,34 +1,33 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) - -## ResultIterator class - -ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. - -Signature: - -```typescript -export declare class ResultIterator -``` - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class. - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [isClosed](./node-duckdb.resultiterator.isclosed.md) | | boolean | Returns true if ResultIterator is closed, false otherwise. | -| [type](./node-duckdb.resultiterator.type.md) | | [ResultType](./node-duckdb.resulttype.md) | Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on executeIterator. | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [close()](./node-duckdb.resultiterator.close.md) | | Close the ResultIterator | -| [describe()](./node-duckdb.resultiterator.describe.md) | | Describe the result set schema. | -| [fetchAllRows()](./node-duckdb.resultiterator.fetchallrows.md) | | Fetch all rows | -| [fetchRow()](./node-duckdb.resultiterator.fetchrow.md) | | Fetch the next row | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) + +## ResultIterator class + +ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. + +Signature: + +```typescript +export declare class ResultIterator +``` + +## Remarks + +The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class. + +## Properties + +| Property | Modifiers | Type | Description | +| ---------------------------------------------------- | --------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| [isClosed](./node-duckdb.resultiterator.isclosed.md) | | boolean | Returns true if ResultIterator is closed, false otherwise. | +| [type](./node-duckdb.resultiterator.type.md) | | [ResultType](./node-duckdb.resulttype.md) | Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on executeIterator. | + +## Methods + +| Method | Modifiers | Description | +| -------------------------------------------------------------- | --------- | ------------------------------- | +| [close()](./node-duckdb.resultiterator.close.md) | | Close the ResultIterator | +| [describe()](./node-duckdb.resultiterator.describe.md) | | Describe the result set schema. | +| [fetchAllRows()](./node-duckdb.resultiterator.fetchallrows.md) | | Fetch all rows | +| [fetchRow()](./node-duckdb.resultiterator.fetchrow.md) | | Fetch the next row | diff --git a/docs/api/node-duckdb.resultiterator.type.md b/docs/api/node-duckdb.resultiterator.type.md index 96aa128..f2f94b1 100644 --- a/docs/api/node-duckdb.resultiterator.type.md +++ b/docs/api/node-duckdb.resultiterator.type.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) - -## ResultIterator.type property - -Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on `executeIterator`. - -Signature: - -```typescript -get type(): ResultType; -``` + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) + +## ResultIterator.type property + +Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on `executeIterator`. + +Signature: + +```typescript +get type(): ResultType; +``` diff --git a/docs/api/node-duckdb.resultstream.md b/docs/api/node-duckdb.resultstream.md index ec67561..68774d6 100644 --- a/docs/api/node-duckdb.resultstream.md +++ b/docs/api/node-duckdb.resultstream.md @@ -1,19 +1,19 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) - -## ResultStream class - -This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. - -Signature: - -```typescript -export declare class ResultStream extends Readable -``` -Extends: Readable - -## Remarks - -The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class. - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) + +## ResultStream class + +This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. + +Signature: + +```typescript +export declare class ResultStream extends Readable +``` + +Extends: Readable + +## Remarks + +The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class. diff --git a/docs/api/node-duckdb.resulttype.md b/docs/api/node-duckdb.resulttype.md index 6abfb56..96691c6 100644 --- a/docs/api/node-duckdb.resulttype.md +++ b/docs/api/node-duckdb.resulttype.md @@ -1,21 +1,20 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) - -## ResultType enum - -Specifier for how DuckDB attempts to load the result - -Signature: - -```typescript -export declare enum ResultType -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Materialized | "Materialized" | Load the whole result set into memory | -| Streaming | "Streaming" | Keep pointer to the first row, don't load the whole result set all at once | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) + +## ResultType enum + +Specifier for how DuckDB attempts to load the result + +Signature: + +```typescript +export declare enum ResultType +``` + +## Enumeration Members + +| Member | Value | Description | +| ------------ | ------------------------------------- | -------------------------------------------------------------------------- | +| Materialized | "Materialized" | Load the whole result set into memory | +| Streaming | "Streaming" | Keep pointer to the first row, don't load the whole result set all at once | diff --git a/docs/api/node-duckdb.rowresultformat.md b/docs/api/node-duckdb.rowresultformat.md index 9180099..25c0ec5 100644 --- a/docs/api/node-duckdb.rowresultformat.md +++ b/docs/api/node-duckdb.rowresultformat.md @@ -1,21 +1,20 @@ - - -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) - -## RowResultFormat enum - -Result format specifier for rows - -Signature: - -```typescript -export declare enum RowResultFormat -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| Array | 1 | Array, e.g. \["Bob", 23\] | -| Object | 0 | Object, e.g. {name: "Bob", age: 23} | - + + +[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) + +## RowResultFormat enum + +Result format specifier for rows + +Signature: + +```typescript +export declare enum RowResultFormat +``` + +## Enumeration Members + +| Member | Value | Description | +| ------ | -------------- | --------------------------------------------------- | +| Array | 1 | Array, e.g. \["Bob", 23\] | +| Object | 0 | Object, e.g. {name: "Bob", age: 23} | diff --git a/etc/node-duckdb.api.md b/etc/node-duckdb.api.md index 592f9d8..a2d2ea9 100644 --- a/etc/node-duckdb.api.md +++ b/etc/node-duckdb.api.md @@ -1,138 +1,135 @@ -## API Report File for "node-duckdb" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { Readable } from 'stream'; - -// @public -export enum AccessMode { - // (undocumented) - Automatic = 1, - // (undocumented) - ReadOnly = 2, - // (undocumented) - ReadWrite = 3, - // (undocumented) - Undefined = 0 -} - -// @public -export class Connection { - constructor(duckdb: DuckDB); - close(): void; - execute(command: string, options?: IExecuteOptions): Promise>; - executeIterator(command: string, options?: IExecuteOptions): Promise>; - get isClosed(): boolean; -} - -// @public -export class DuckDB { - constructor(config?: IDuckDBConfig); - get accessMode(): AccessMode; - get checkPointWALSize(): number; - close(): void; - get collation(): string; - // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts - // - // @internal - get db(): DuckDBClass; - get defaultNullOrder(): OrderByNullType; - get defaultOrderType(): OrderType; - get enableCopy(): boolean; - get isClosed(): boolean; - get maximumMemory(): number; - get temporaryDirectory(): string; - get useTemporaryDirectory(): boolean; -} - -// @public -export interface IDuckDBConfig { - // (undocumented) - options?: IDuckDBOptionsConfig; - path?: string; -} - -// @public -export interface IDuckDBOptionsConfig { - accessMode?: AccessMode; - checkPointWALSize?: number; - collation?: string; - defaultNullOrder?: OrderByNullType; - defaultOrderType?: OrderType; - enableCopy?: boolean; - maximumMemory?: number; - temporaryDirectory?: string; - useDirectIO?: boolean; - useTemporaryDirectory?: boolean; -} - -// @public -export interface IExecuteOptions { - forceMaterialized?: boolean; - rowResultFormat?: RowResultFormat; -} - -// @public -export enum OrderByNullType { - // (undocumented) - Default = 1, - // (undocumented) - Invalid = 0, - // (undocumented) - NullsFirst = 2, - // (undocumented) - NullsLast = 3 -} - -// @public -export enum OrderType { - // (undocumented) - Ascending = 2, - // (undocumented) - Default = 1, - // (undocumented) - Descending = 3, - // (undocumented) - Invalid = 0 -} - -// @public -export class ResultIterator { - // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts - // - // @internal - constructor(resultInterator: ResultIteratorClass); - close(): void; - describe(): string[][]; - fetchAllRows(): T[]; - fetchRow(): T; - get isClosed(): boolean; - get type(): ResultType; -} - -// @public -export class ResultStream extends Readable { - // @internal - constructor(resultIterator: ResultIterator); - // @internal (undocumented) - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - // @internal (undocumented) - _read(): void; - } - -// @public -export enum ResultType { - Materialized = "Materialized", - Streaming = "Streaming" -} - -// @public -export enum RowResultFormat { - Array = 1, - Object = 0 -} - - -``` +## API Report File for "node-duckdb" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { Readable } from "stream"; + +// @public +export enum AccessMode { + // (undocumented) + Automatic = 1, + // (undocumented) + ReadOnly = 2, + // (undocumented) + ReadWrite = 3, + // (undocumented) + Undefined = 0, +} + +// @public +export class Connection { + constructor(duckdb: DuckDB); + close(): void; + execute(command: string, options?: IExecuteOptions): Promise>; + executeIterator(command: string, options?: IExecuteOptions): Promise>; + get isClosed(): boolean; +} + +// @public +export class DuckDB { + constructor(config?: IDuckDBConfig); + get accessMode(): AccessMode; + get checkPointWALSize(): number; + close(): void; + get collation(): string; + // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts + // + // @internal + get db(): DuckDBClass; + get defaultNullOrder(): OrderByNullType; + get defaultOrderType(): OrderType; + get enableCopy(): boolean; + get isClosed(): boolean; + get maximumMemory(): number; + get temporaryDirectory(): string; + get useTemporaryDirectory(): boolean; +} + +// @public +export interface IDuckDBConfig { + // (undocumented) + options?: IDuckDBOptionsConfig; + path?: string; +} + +// @public +export interface IDuckDBOptionsConfig { + accessMode?: AccessMode; + checkPointWALSize?: number; + collation?: string; + defaultNullOrder?: OrderByNullType; + defaultOrderType?: OrderType; + enableCopy?: boolean; + maximumMemory?: number; + temporaryDirectory?: string; + useDirectIO?: boolean; + useTemporaryDirectory?: boolean; +} + +// @public +export interface IExecuteOptions { + forceMaterialized?: boolean; + rowResultFormat?: RowResultFormat; +} + +// @public +export enum OrderByNullType { + // (undocumented) + Default = 1, + // (undocumented) + Invalid = 0, + // (undocumented) + NullsFirst = 2, + // (undocumented) + NullsLast = 3, +} + +// @public +export enum OrderType { + // (undocumented) + Ascending = 2, + // (undocumented) + Default = 1, + // (undocumented) + Descending = 3, + // (undocumented) + Invalid = 0, +} + +// @public +export class ResultIterator { + // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts + // + // @internal + constructor(resultInterator: ResultIteratorClass); + close(): void; + describe(): string[][]; + fetchAllRows(): T[]; + fetchRow(): T; + get isClosed(): boolean; + get type(): ResultType; +} + +// @public +export class ResultStream extends Readable { + // @internal + constructor(resultIterator: ResultIterator); + // @internal (undocumented) + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + // @internal (undocumented) + _read(): void; +} + +// @public +export enum ResultType { + Materialized = "Materialized", + Streaming = "Streaming", +} + +// @public +export enum RowResultFormat { + Array = 1, + Object = 0, +} +``` diff --git a/package.json b/package.json index d88140a..21a8755 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "download-duckdb": "rm -rf duckdb && curl -L https://github.com/cwida/duckdb/archive/v0.2.2.tar.gz > duckdb.tar.gz && tar xf duckdb.tar.gz && mv duckdb-0.2.2 duckdb && rm duckdb.tar.gz", "eslint:check": "eslint --ext .js,.json,.ts ./", "eslint:fix": "eslint --fix --ext .js,.json,.ts ./", + "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp -o docs/api && ./replace.sh", "install": "prebuild-install --verbose -d -r napi || (yarn download-duckdb && yarn build:duckdb && yarn prebuild:current-target)", "lint:check": "yarn prettier:check && yarn eslint:check && yarn clang:check", "lint:fix": "yarn prettier:fix && yarn eslint:fix && yarn clang:fix", @@ -53,8 +54,7 @@ "prettier:check": "prettier --check '**/*.{js,json,md,ts,yml}'", "prettier:fix": "prettier --write '**/*.{js,json,md,ts,yml}'", "postpublish": "yarn cleanup:binaries && yarn prebuild:all-targets && yarn prebuild:upload", - "test": "yarn build:ts && jest --runInBand --testTimeout=60000", - "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp -o docs/api && ./replace.sh" + "test": "yarn build:ts && jest --runInBand --testTimeout=60000" }, "dependencies": { "@microsoft/api-extractor": "^7.12.0", diff --git a/src/addon-types/duckdb-config.ts b/src/addon-types/duckdb-config.ts index 9c7a19d..08f3c7c 100644 --- a/src/addon-types/duckdb-config.ts +++ b/src/addon-types/duckdb-config.ts @@ -19,7 +19,7 @@ export enum OrderType { Descending = 3, } /** - * Null order specifier + * Null order specifier * @public */ export enum OrderByNullType { diff --git a/temp/node-duckdb.api.json b/temp/node-duckdb.api.json index 7573e4c..d07f119 100644 --- a/temp/node-duckdb.api.json +++ b/temp/node-duckdb.api.json @@ -1,1718 +1,1718 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.12.0", - "schemaVersion": 1003, - "oldestForwardsCompatibleVersion": 1001 - }, - "kind": "Package", - "canonicalReference": "node-duckdb!", - "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}.\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", - "name": "node-duckdb", - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "node-duckdb!", - "name": "", - "members": [ - { - "kind": "Enum", - "canonicalReference": "node-duckdb!AccessMode:enum", - "docComment": "/**\n * Access mode specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum AccessMode " - } - ], - "releaseTag": "Public", - "name": "AccessMode", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.Automatic:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Automatic = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Automatic", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.ReadOnly:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ReadOnly = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "ReadOnly", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.ReadWrite:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ReadWrite = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "ReadWrite", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.Undefined:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Undefined = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Undefined", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!Connection:class", - "docComment": "/**\n * The Connection class represents a DuckDB connection.\n *\n * @remarks\n *\n * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Connection " - } - ], - "releaseTag": "Public", - "name": "Connection", - "members": [ - { - "kind": "Constructor", - "canonicalReference": "node-duckdb!Connection:constructor(1)", - "docComment": "/**\n * Connection constructor.\n *\n * @param duckdb - {@link DuckDB | DuckDB} instance to connect to.\n *\n * @example\n *\n * Initializing a connection:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(duckdb: " - }, - { - "kind": "Reference", - "text": "DuckDB", - "canonicalReference": "node-duckdb!DuckDB:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "duckdb", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#close:member(1)", - "docComment": "/**\n * Close the connection (also closes all {@link ResultStream | ResultStream} or {@link ResultIterator | ResultIterator} objects associated with this connection).\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#execute:member(1)", - "docComment": "/**\n * Asynchronously executes the query and returns a node.js stream that wraps the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Streaming results of a DuckDB query into a CSV file:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * import { createWriteStream } from \"fs\";\n * import { Transform } from \"stream\";\n * class ArrayToCsvTransform extends Transform {\n * constructor() {\n * super({objectMode: true})\n * }\n * _transform(chunk: any[], _encoding: string, callback: any) {\n * this.push(chunk.join(\",\") + '\\n');\n * callback();\n * }\n * }\n *\n * async function outputToFileAsCsv() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.execute(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.execute(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const resultStream = await connection.execute(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * const transformToCsvStream = new ArrayToCsvTransform();\n * const writeStream = createWriteStream(\"my-people-output\");\n * resultStream.pipe(transformToCsvStream).pipe(writeStream);\n * }\n * outputToFileAsCsv();\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "execute(command: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "IExecuteOptions", - "canonicalReference": "node-duckdb!IExecuteOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResultStream", - "canonicalReference": "node-duckdb!ResultStream:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "command", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "execute" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#executeIterator:member(1)", - "docComment": "/**\n * Asynchronously executes the query and returns an iterator that points to the first result in the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Printing rows:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * async function queryDatabaseWithIterator() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n * // print the first row\n * console.log(result.fetchRow());\n * // print the rest of the rows\n * console.log(result.fetchAllRows());\n * const result2 = await connection.executeIterator(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * console.log(result2.fetchAllRows());\n * connection.close();\n * db.close();\n * }\n * queryDatabaseWithIterator();\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "executeIterator(command: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "IExecuteOptions", - "canonicalReference": "node-duckdb!IExecuteOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResultIterator", - "canonicalReference": "node-duckdb!ResultIterator:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "command", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "executeIterator" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!Connection#isClosed:member", - "docComment": "/**\n * If the connection is closed returns true, otherwise false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!DuckDB:class", - "docComment": "/**\n * The DuckDB class represents a DuckDB database instance.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DuckDB " - } - ], - "releaseTag": "Public", - "name": "DuckDB", - "members": [ - { - "kind": "Constructor", - "canonicalReference": "node-duckdb!DuckDB:constructor(1)", - "docComment": "/**\n * DuckDB Database constructor. When called instantiates a native instance of DuckDB.\n *\n * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}.\n *\n * @example\n *\n * Initializing a duckdb database in memory:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\") });\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file and setting some additional options:\n * ```\n * import { DuckDB, OrderType } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } });\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config?: " - }, - { - "kind": "Reference", - "text": "IDuckDBConfig", - "canonicalReference": "node-duckdb!IDuckDBConfig:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#accessMode:member", - "docComment": "/**\n * Returns the {@link AccessMode | access mode} used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get accessMode(): " - }, - { - "kind": "Reference", - "text": "AccessMode", - "canonicalReference": "node-duckdb!AccessMode:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "accessMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#checkPointWALSize:member", - "docComment": "/**\n * Returns the checkpoint write ahead log size used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get checkPointWALSize(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "checkPointWALSize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!DuckDB#close:member(1)", - "docComment": "/**\n * Closes the underlying duckdb database, frees associated memory and renders it unusuable.\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#collation:member", - "docComment": "/**\n * Returns the collation used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get collation(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "collation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#defaultNullOrder:member", - "docComment": "/**\n * Returns the default {@link OrderByNullType | sort order for null values}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get defaultNullOrder(): " - }, - { - "kind": "Reference", - "text": "OrderByNullType", - "canonicalReference": "node-duckdb!OrderByNullType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "defaultNullOrder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#defaultOrderType:member", - "docComment": "/**\n * Returns the default {@link OrderType | sort order}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get defaultOrderType(): " - }, - { - "kind": "Reference", - "text": "OrderType", - "canonicalReference": "node-duckdb!OrderType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "defaultOrderType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#enableCopy:member", - "docComment": "/**\n * Returns true of copying is enabled, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get enableCopy(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "enableCopy", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#isClosed:member", - "docComment": "/**\n * Returns true if the underlying database has been closed, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#maximumMemory:member", - "docComment": "/**\n * Returns the maximum memory limit for the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get maximumMemory(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "maximumMemory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#temporaryDirectory:member", - "docComment": "/**\n * Returns the temporary directory location for the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get temporaryDirectory(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "temporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#useTemporaryDirectory:member", - "docComment": "/**\n * Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get useTemporaryDirectory(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "useTemporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IDuckDBConfig:interface", - "docComment": "/**\n * Configuration object for DuckDB\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IDuckDBConfig " - } - ], - "releaseTag": "Public", - "name": "IDuckDBConfig", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBConfig#options:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "options?: " - }, - { - "kind": "Reference", - "text": "IDuckDBOptionsConfig", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBConfig#path:member", - "docComment": "/**\n * Path to the database file. If undefined, in-memory database is created\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "path?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "path", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface", - "docComment": "/**\n * Options object type for the DuckDB class\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IDuckDBOptionsConfig " - } - ], - "releaseTag": "Public", - "name": "IDuckDBOptionsConfig", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#accessMode:member", - "docComment": "/**\n * Access Mode\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "accessMode?: " - }, - { - "kind": "Reference", - "text": "AccessMode", - "canonicalReference": "node-duckdb!AccessMode:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "accessMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#checkPointWALSize:member", - "docComment": "/**\n * Checkpoint Write Ahead Log Size (in bytes)\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "checkPointWALSize?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "checkPointWALSize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#collation:member", - "docComment": "/**\n * Collation\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "collation?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "collation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultNullOrder:member", - "docComment": "/**\n * Default order for Null values\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultNullOrder?: " - }, - { - "kind": "Reference", - "text": "OrderByNullType", - "canonicalReference": "node-duckdb!OrderByNullType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "defaultNullOrder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultOrderType:member", - "docComment": "/**\n * Default Order\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultOrderType?: " - }, - { - "kind": "Reference", - "text": "OrderType", - "canonicalReference": "node-duckdb!OrderType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "defaultOrderType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#enableCopy:member", - "docComment": "/**\n * Enable Copy\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "enableCopy?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "enableCopy", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#maximumMemory:member", - "docComment": "/**\n * Maximum memory limit for the databse (in bytes)\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "maximumMemory?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "maximumMemory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#temporaryDirectory:member", - "docComment": "/**\n * Location of the temporary directory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "temporaryDirectory?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "temporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useDirectIO:member", - "docComment": "/**\n * Whether to use Direct IO\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useDirectIO?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "useDirectIO", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useTemporaryDirectory:member", - "docComment": "/**\n * Whether to use temporary directory to store data that doesn't fit in memory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useTemporaryDirectory?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "useTemporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IExecuteOptions:interface", - "docComment": "/**\n * Options for connection.execute\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IExecuteOptions " - } - ], - "releaseTag": "Public", - "name": "IExecuteOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IExecuteOptions#forceMaterialized:member", - "docComment": "/**\n * Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will *attempt* to not load the whole result set into memory at once.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "forceMaterialized?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "forceMaterialized", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IExecuteOptions#rowResultFormat:member", - "docComment": "/**\n * Row format\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "rowResultFormat?: " - }, - { - "kind": "Reference", - "text": "RowResultFormat", - "canonicalReference": "node-duckdb!RowResultFormat:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "rowResultFormat", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!OrderByNullType:enum", - "docComment": "/**\n * Null order specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum OrderByNullType " - } - ], - "releaseTag": "Public", - "name": "OrderByNullType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.Default:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Default = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Default", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.Invalid:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Invalid = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Invalid", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.NullsFirst:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "NullsFirst = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "NullsFirst", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.NullsLast:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "NullsLast = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "NullsLast", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!OrderType:enum", - "docComment": "/**\n * Default sort order specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum OrderType " - } - ], - "releaseTag": "Public", - "name": "OrderType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Ascending:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Ascending = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "Ascending", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Default:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Default = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Default", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Descending:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Descending = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "Descending", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Invalid:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Invalid = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Invalid", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!ResultIterator:class", - "docComment": "/**\n * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ResultIterator " - } - ], - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ResultIterator", - "members": [ - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#close:member(1)", - "docComment": "/**\n * Close the ResultIterator\n *\n * @remarks\n *\n * `close` on the connection automatically closes all associated ResultIterators.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#describe:member(1)", - "docComment": "/**\n * Describe the result set schema.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "describe(): " - }, - { - "kind": "Content", - "text": "string[][]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "describe" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#fetchAllRows:member(1)", - "docComment": "/**\n * Fetch all rows\n *\n * @remarks\n *\n * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetchAllRows(): " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "fetchAllRows" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#fetchRow:member(1)", - "docComment": "/**\n * Fetch the next row\n *\n * @remarks\n *\n * First call returns the first row, when no more rows left `null` is returned.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetchRow(): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "fetchRow" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!ResultIterator#isClosed:member", - "docComment": "/**\n * Returns true if ResultIterator is closed, false otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!ResultIterator#type:member", - "docComment": "/**\n * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get type(): " - }, - { - "kind": "Reference", - "text": "ResultType", - "canonicalReference": "node-duckdb!ResultType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!ResultStream:class", - "docComment": "/**\n * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ResultStream extends " - }, - { - "kind": "Reference", - "text": "Readable", - "canonicalReference": "!internal.Readable:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ResultStream", - "members": [], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!ResultType:enum", - "docComment": "/**\n * Specifier for how DuckDB attempts to load the result\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum ResultType " - } - ], - "releaseTag": "Public", - "name": "ResultType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!ResultType.Materialized:member", - "docComment": "/**\n * Load the whole result set into memory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Materialized = " - }, - { - "kind": "Content", - "text": "\"Materialized\"" - } - ], - "releaseTag": "Public", - "name": "Materialized", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!ResultType.Streaming:member", - "docComment": "/**\n * Keep pointer to the first row, don't load the whole result set all at once\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Streaming = " - }, - { - "kind": "Content", - "text": "\"Streaming\"" - } - ], - "releaseTag": "Public", - "name": "Streaming", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!RowResultFormat:enum", - "docComment": "/**\n * Result format specifier for rows\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum RowResultFormat " - } - ], - "releaseTag": "Public", - "name": "RowResultFormat", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!RowResultFormat.Array:member", - "docComment": "/**\n * Array, e.g. [\"Bob\", 23]\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Array = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Array", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!RowResultFormat.Object:member", - "docComment": "/**\n * Object, e.g. \\{name: \"Bob\", age: 23\\}\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Object = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Object", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - } - ] - } - ] -} +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.12.0", + "schemaVersion": 1003, + "oldestForwardsCompatibleVersion": 1001 + }, + "kind": "Package", + "canonicalReference": "node-duckdb!", + "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}.\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", + "name": "node-duckdb", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "node-duckdb!", + "name": "", + "members": [ + { + "kind": "Enum", + "canonicalReference": "node-duckdb!AccessMode:enum", + "docComment": "/**\n * Access mode specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum AccessMode " + } + ], + "releaseTag": "Public", + "name": "AccessMode", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.Automatic:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Automatic = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Automatic", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.ReadOnly:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ReadOnly = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "ReadOnly", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.ReadWrite:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ReadWrite = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "ReadWrite", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!AccessMode.Undefined:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Undefined = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Undefined", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!Connection:class", + "docComment": "/**\n * The Connection class represents a DuckDB connection.\n *\n * @remarks\n *\n * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Connection " + } + ], + "releaseTag": "Public", + "name": "Connection", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "node-duckdb!Connection:constructor(1)", + "docComment": "/**\n * Connection constructor.\n *\n * @param duckdb - {@link DuckDB | DuckDB} instance to connect to.\n *\n * @example\n *\n * Initializing a connection:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(duckdb: " + }, + { + "kind": "Reference", + "text": "DuckDB", + "canonicalReference": "node-duckdb!DuckDB:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "duckdb", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#close:member(1)", + "docComment": "/**\n * Close the connection (also closes all {@link ResultStream | ResultStream} or {@link ResultIterator | ResultIterator} objects associated with this connection).\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#execute:member(1)", + "docComment": "/**\n * Asynchronously executes the query and returns a node.js stream that wraps the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Streaming results of a DuckDB query into a CSV file:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * import { createWriteStream } from \"fs\";\n * import { Transform } from \"stream\";\n * class ArrayToCsvTransform extends Transform {\n * constructor() {\n * super({objectMode: true})\n * }\n * _transform(chunk: any[], _encoding: string, callback: any) {\n * this.push(chunk.join(\",\") + '\\n');\n * callback();\n * }\n * }\n *\n * async function outputToFileAsCsv() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.execute(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.execute(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const resultStream = await connection.execute(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * const transformToCsvStream = new ArrayToCsvTransform();\n * const writeStream = createWriteStream(\"my-people-output\");\n * resultStream.pipe(transformToCsvStream).pipe(writeStream);\n * }\n * outputToFileAsCsv();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "execute(command: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "IExecuteOptions", + "canonicalReference": "node-duckdb!IExecuteOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResultStream", + "canonicalReference": "node-duckdb!ResultStream:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "command", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "execute" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!Connection#executeIterator:member(1)", + "docComment": "/**\n * Asynchronously executes the query and returns an iterator that points to the first result in the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Printing rows:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * async function queryDatabaseWithIterator() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n * // print the first row\n * console.log(result.fetchRow());\n * // print the rest of the rows\n * console.log(result.fetchAllRows());\n * const result2 = await connection.executeIterator(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * console.log(result2.fetchAllRows());\n * connection.close();\n * db.close();\n * }\n * queryDatabaseWithIterator();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "executeIterator(command: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "IExecuteOptions", + "canonicalReference": "node-duckdb!IExecuteOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResultIterator", + "canonicalReference": "node-duckdb!ResultIterator:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "command", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "executeIterator" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!Connection#isClosed:member", + "docComment": "/**\n * If the connection is closed returns true, otherwise false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!DuckDB:class", + "docComment": "/**\n * The DuckDB class represents a DuckDB database instance.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DuckDB " + } + ], + "releaseTag": "Public", + "name": "DuckDB", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "node-duckdb!DuckDB:constructor(1)", + "docComment": "/**\n * DuckDB Database constructor. When called instantiates a native instance of DuckDB.\n *\n * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}.\n *\n * @example\n *\n * Initializing a duckdb database in memory:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\") });\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file and setting some additional options:\n * ```\n * import { DuckDB, OrderType } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } });\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(config?: " + }, + { + "kind": "Reference", + "text": "IDuckDBConfig", + "canonicalReference": "node-duckdb!IDuckDBConfig:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "config", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#accessMode:member", + "docComment": "/**\n * Returns the {@link AccessMode | access mode} used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get accessMode(): " + }, + { + "kind": "Reference", + "text": "AccessMode", + "canonicalReference": "node-duckdb!AccessMode:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "accessMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#checkPointWALSize:member", + "docComment": "/**\n * Returns the checkpoint write ahead log size used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get checkPointWALSize(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "checkPointWALSize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!DuckDB#close:member(1)", + "docComment": "/**\n * Closes the underlying duckdb database, frees associated memory and renders it unusuable.\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#collation:member", + "docComment": "/**\n * Returns the collation used by the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get collation(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "collation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#defaultNullOrder:member", + "docComment": "/**\n * Returns the default {@link OrderByNullType | sort order for null values}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get defaultNullOrder(): " + }, + { + "kind": "Reference", + "text": "OrderByNullType", + "canonicalReference": "node-duckdb!OrderByNullType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "defaultNullOrder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#defaultOrderType:member", + "docComment": "/**\n * Returns the default {@link OrderType | sort order}.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get defaultOrderType(): " + }, + { + "kind": "Reference", + "text": "OrderType", + "canonicalReference": "node-duckdb!OrderType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "defaultOrderType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#enableCopy:member", + "docComment": "/**\n * Returns true of copying is enabled, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get enableCopy(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "enableCopy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#isClosed:member", + "docComment": "/**\n * Returns true if the underlying database has been closed, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#maximumMemory:member", + "docComment": "/**\n * Returns the maximum memory limit for the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get maximumMemory(): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "maximumMemory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#temporaryDirectory:member", + "docComment": "/**\n * Returns the temporary directory location for the database.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get temporaryDirectory(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "temporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!DuckDB#useTemporaryDirectory:member", + "docComment": "/**\n * Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get useTemporaryDirectory(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "useTemporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IDuckDBConfig:interface", + "docComment": "/**\n * Configuration object for DuckDB\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IDuckDBConfig " + } + ], + "releaseTag": "Public", + "name": "IDuckDBConfig", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBConfig#options:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "options?: " + }, + { + "kind": "Reference", + "text": "IDuckDBOptionsConfig", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBConfig#path:member", + "docComment": "/**\n * Path to the database file. If undefined, in-memory database is created\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "path?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface", + "docComment": "/**\n * Options object type for the DuckDB class\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IDuckDBOptionsConfig " + } + ], + "releaseTag": "Public", + "name": "IDuckDBOptionsConfig", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#accessMode:member", + "docComment": "/**\n * Access Mode\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "accessMode?: " + }, + { + "kind": "Reference", + "text": "AccessMode", + "canonicalReference": "node-duckdb!AccessMode:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "accessMode", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#checkPointWALSize:member", + "docComment": "/**\n * Checkpoint Write Ahead Log Size (in bytes)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "checkPointWALSize?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "checkPointWALSize", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#collation:member", + "docComment": "/**\n * Collation\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "collation?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "collation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultNullOrder:member", + "docComment": "/**\n * Default order for Null values\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultNullOrder?: " + }, + { + "kind": "Reference", + "text": "OrderByNullType", + "canonicalReference": "node-duckdb!OrderByNullType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "defaultNullOrder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultOrderType:member", + "docComment": "/**\n * Default Order\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultOrderType?: " + }, + { + "kind": "Reference", + "text": "OrderType", + "canonicalReference": "node-duckdb!OrderType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "defaultOrderType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#enableCopy:member", + "docComment": "/**\n * Enable Copy\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "enableCopy?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "enableCopy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#maximumMemory:member", + "docComment": "/**\n * Maximum memory limit for the databse (in bytes)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "maximumMemory?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "maximumMemory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#temporaryDirectory:member", + "docComment": "/**\n * Location of the temporary directory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "temporaryDirectory?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "temporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useDirectIO:member", + "docComment": "/**\n * Whether to use Direct IO\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useDirectIO?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "useDirectIO", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useTemporaryDirectory:member", + "docComment": "/**\n * Whether to use temporary directory to store data that doesn't fit in memory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useTemporaryDirectory?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "useTemporaryDirectory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "node-duckdb!IExecuteOptions:interface", + "docComment": "/**\n * Options for connection.execute\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IExecuteOptions " + } + ], + "releaseTag": "Public", + "name": "IExecuteOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IExecuteOptions#forceMaterialized:member", + "docComment": "/**\n * Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will *attempt* to not load the whole result set into memory at once.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "forceMaterialized?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "forceMaterialized", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "node-duckdb!IExecuteOptions#rowResultFormat:member", + "docComment": "/**\n * Row format\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "rowResultFormat?: " + }, + { + "kind": "Reference", + "text": "RowResultFormat", + "canonicalReference": "node-duckdb!RowResultFormat:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "rowResultFormat", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!OrderByNullType:enum", + "docComment": "/**\n * Null order specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum OrderByNullType " + } + ], + "releaseTag": "Public", + "name": "OrderByNullType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.Default:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Default = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Default", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.Invalid:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Invalid = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Invalid", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.NullsFirst:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "NullsFirst = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "NullsFirst", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderByNullType.NullsLast:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "NullsLast = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "NullsLast", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!OrderType:enum", + "docComment": "/**\n * Default sort order specifier\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum OrderType " + } + ], + "releaseTag": "Public", + "name": "OrderType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Ascending:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Ascending = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "releaseTag": "Public", + "name": "Ascending", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Default:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Default = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Default", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Descending:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Descending = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "releaseTag": "Public", + "name": "Descending", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!OrderType.Invalid:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Invalid = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Invalid", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!ResultIterator:class", + "docComment": "/**\n * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ResultIterator " + } + ], + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ResultIterator", + "members": [ + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#close:member(1)", + "docComment": "/**\n * Close the ResultIterator\n *\n * @remarks\n *\n * `close` on the connection automatically closes all associated ResultIterators.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#describe:member(1)", + "docComment": "/**\n * Describe the result set schema.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "describe(): " + }, + { + "kind": "Content", + "text": "string[][]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "describe" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#fetchAllRows:member(1)", + "docComment": "/**\n * Fetch all rows\n *\n * @remarks\n *\n * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetchAllRows(): " + }, + { + "kind": "Content", + "text": "T[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "fetchAllRows" + }, + { + "kind": "Method", + "canonicalReference": "node-duckdb!ResultIterator#fetchRow:member(1)", + "docComment": "/**\n * Fetch the next row\n *\n * @remarks\n *\n * First call returns the first row, when no more rows left `null` is returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetchRow(): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "fetchRow" + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!ResultIterator#isClosed:member", + "docComment": "/**\n * Returns true if ResultIterator is closed, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isClosed(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "isClosed", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "node-duckdb!ResultIterator#type:member", + "docComment": "/**\n * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get type(): " + }, + { + "kind": "Reference", + "text": "ResultType", + "canonicalReference": "node-duckdb!ResultType:enum" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "node-duckdb!ResultStream:class", + "docComment": "/**\n * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ResultStream extends " + }, + { + "kind": "Reference", + "text": "Readable", + "canonicalReference": "!internal.Readable:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ResultStream", + "members": [], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!ResultType:enum", + "docComment": "/**\n * Specifier for how DuckDB attempts to load the result\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum ResultType " + } + ], + "releaseTag": "Public", + "name": "ResultType", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!ResultType.Materialized:member", + "docComment": "/**\n * Load the whole result set into memory\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Materialized = " + }, + { + "kind": "Content", + "text": "\"Materialized\"" + } + ], + "releaseTag": "Public", + "name": "Materialized", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!ResultType.Streaming:member", + "docComment": "/**\n * Keep pointer to the first row, don't load the whole result set all at once\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Streaming = " + }, + { + "kind": "Content", + "text": "\"Streaming\"" + } + ], + "releaseTag": "Public", + "name": "Streaming", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Enum", + "canonicalReference": "node-duckdb!RowResultFormat:enum", + "docComment": "/**\n * Result format specifier for rows\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum RowResultFormat " + } + ], + "releaseTag": "Public", + "name": "RowResultFormat", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!RowResultFormat.Array:member", + "docComment": "/**\n * Array, e.g. [\"Bob\", 23]\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Array = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "Array", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "node-duckdb!RowResultFormat.Object:member", + "docComment": "/**\n * Object, e.g. \\{name: \"Bob\", age: 23\\}\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Object = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Object", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + } + ] + } + ] +} diff --git a/temp/node-duckdb.api.md b/temp/node-duckdb.api.md index 592f9d8..a2d2ea9 100644 --- a/temp/node-duckdb.api.md +++ b/temp/node-duckdb.api.md @@ -1,138 +1,135 @@ -## API Report File for "node-duckdb" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { Readable } from 'stream'; - -// @public -export enum AccessMode { - // (undocumented) - Automatic = 1, - // (undocumented) - ReadOnly = 2, - // (undocumented) - ReadWrite = 3, - // (undocumented) - Undefined = 0 -} - -// @public -export class Connection { - constructor(duckdb: DuckDB); - close(): void; - execute(command: string, options?: IExecuteOptions): Promise>; - executeIterator(command: string, options?: IExecuteOptions): Promise>; - get isClosed(): boolean; -} - -// @public -export class DuckDB { - constructor(config?: IDuckDBConfig); - get accessMode(): AccessMode; - get checkPointWALSize(): number; - close(): void; - get collation(): string; - // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts - // - // @internal - get db(): DuckDBClass; - get defaultNullOrder(): OrderByNullType; - get defaultOrderType(): OrderType; - get enableCopy(): boolean; - get isClosed(): boolean; - get maximumMemory(): number; - get temporaryDirectory(): string; - get useTemporaryDirectory(): boolean; -} - -// @public -export interface IDuckDBConfig { - // (undocumented) - options?: IDuckDBOptionsConfig; - path?: string; -} - -// @public -export interface IDuckDBOptionsConfig { - accessMode?: AccessMode; - checkPointWALSize?: number; - collation?: string; - defaultNullOrder?: OrderByNullType; - defaultOrderType?: OrderType; - enableCopy?: boolean; - maximumMemory?: number; - temporaryDirectory?: string; - useDirectIO?: boolean; - useTemporaryDirectory?: boolean; -} - -// @public -export interface IExecuteOptions { - forceMaterialized?: boolean; - rowResultFormat?: RowResultFormat; -} - -// @public -export enum OrderByNullType { - // (undocumented) - Default = 1, - // (undocumented) - Invalid = 0, - // (undocumented) - NullsFirst = 2, - // (undocumented) - NullsLast = 3 -} - -// @public -export enum OrderType { - // (undocumented) - Ascending = 2, - // (undocumented) - Default = 1, - // (undocumented) - Descending = 3, - // (undocumented) - Invalid = 0 -} - -// @public -export class ResultIterator { - // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts - // - // @internal - constructor(resultInterator: ResultIteratorClass); - close(): void; - describe(): string[][]; - fetchAllRows(): T[]; - fetchRow(): T; - get isClosed(): boolean; - get type(): ResultType; -} - -// @public -export class ResultStream extends Readable { - // @internal - constructor(resultIterator: ResultIterator); - // @internal (undocumented) - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - // @internal (undocumented) - _read(): void; - } - -// @public -export enum ResultType { - Materialized = "Materialized", - Streaming = "Streaming" -} - -// @public -export enum RowResultFormat { - Array = 1, - Object = 0 -} - - -``` +## API Report File for "node-duckdb" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { Readable } from "stream"; + +// @public +export enum AccessMode { + // (undocumented) + Automatic = 1, + // (undocumented) + ReadOnly = 2, + // (undocumented) + ReadWrite = 3, + // (undocumented) + Undefined = 0, +} + +// @public +export class Connection { + constructor(duckdb: DuckDB); + close(): void; + execute(command: string, options?: IExecuteOptions): Promise>; + executeIterator(command: string, options?: IExecuteOptions): Promise>; + get isClosed(): boolean; +} + +// @public +export class DuckDB { + constructor(config?: IDuckDBConfig); + get accessMode(): AccessMode; + get checkPointWALSize(): number; + close(): void; + get collation(): string; + // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts + // + // @internal + get db(): DuckDBClass; + get defaultNullOrder(): OrderByNullType; + get defaultOrderType(): OrderType; + get enableCopy(): boolean; + get isClosed(): boolean; + get maximumMemory(): number; + get temporaryDirectory(): string; + get useTemporaryDirectory(): boolean; +} + +// @public +export interface IDuckDBConfig { + // (undocumented) + options?: IDuckDBOptionsConfig; + path?: string; +} + +// @public +export interface IDuckDBOptionsConfig { + accessMode?: AccessMode; + checkPointWALSize?: number; + collation?: string; + defaultNullOrder?: OrderByNullType; + defaultOrderType?: OrderType; + enableCopy?: boolean; + maximumMemory?: number; + temporaryDirectory?: string; + useDirectIO?: boolean; + useTemporaryDirectory?: boolean; +} + +// @public +export interface IExecuteOptions { + forceMaterialized?: boolean; + rowResultFormat?: RowResultFormat; +} + +// @public +export enum OrderByNullType { + // (undocumented) + Default = 1, + // (undocumented) + Invalid = 0, + // (undocumented) + NullsFirst = 2, + // (undocumented) + NullsLast = 3, +} + +// @public +export enum OrderType { + // (undocumented) + Ascending = 2, + // (undocumented) + Default = 1, + // (undocumented) + Descending = 3, + // (undocumented) + Invalid = 0, +} + +// @public +export class ResultIterator { + // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts + // + // @internal + constructor(resultInterator: ResultIteratorClass); + close(): void; + describe(): string[][]; + fetchAllRows(): T[]; + fetchRow(): T; + get isClosed(): boolean; + get type(): ResultType; +} + +// @public +export class ResultStream extends Readable { + // @internal + constructor(resultIterator: ResultIterator); + // @internal (undocumented) + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + // @internal (undocumented) + _read(): void; +} + +// @public +export enum ResultType { + Materialized = "Materialized", + Streaming = "Streaming", +} + +// @public +export enum RowResultFormat { + Array = 1, + Object = 0, +} +``` From b57d810e4808557edd789fda7f604cdf808a9501 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 19:44:46 +0300 Subject: [PATCH 06/17] wip --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index a16c0d9..c051825 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Node-DuckDB ---- - ###### [API](https://github.com/deepcrawl/node-duckdb/docs/api/node-duckdb.md) | [Code Of Conduct](https://github.com/deepcrawl/node-duckdb/docs/CODE_OF_CONDUCT.md) | [Contributing](https://github.com/deepcrawl/node-duckdb/docs/CONTRIBUTING.md) | [Developing](https://github.com/deepcrawl/node-duckdb/docs/DEVELOPING.md) > Production ready DuckDB Node.js library written in TypeScript. From ae487f01ba631e410030c4fd31e6a3488d1dc6fa Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 19:46:10 +0300 Subject: [PATCH 07/17] fix --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c051825..0fe5f34 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Note: this will download the duckdb binary for your platform (currently Linux an ### Usage -Using node-duckdb is really simple: +Using node-duckdb is easy: ``` const db = new DuckDB(); @@ -44,7 +44,7 @@ await connection.execute("SELECT * FROM mytable;"); #### Promise API example -A simple example using promises: +An example using promises: ``` import { Connection, DuckDB } from "node-duckdb"; @@ -74,7 +74,7 @@ queryDatabaseWithIterator(); #### Streaming API example -A simple demo of reading from DuckDB, transforming to CSV and writing to file using the streaming API: +A demo of reading from DuckDB, transforming to CSV and writing to file using the streaming API: ``` import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; From 4222bd84f9c248ab22b39cf199179de007e092aa Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Wed, 9 Dec 2020 20:53:47 +0300 Subject: [PATCH 08/17] wip --- .gitignore | 2 + docs/api/node-duckdb.accessmode.md | 2 +- .../node-duckdb.connection._constructor_.md | 2 +- docs/api/node-duckdb.connection.close.md | 2 +- docs/api/node-duckdb.connection.execute.md | 2 +- .../node-duckdb.connection.executeiterator.md | 2 +- docs/api/node-duckdb.connection.isclosed.md | 2 +- docs/api/node-duckdb.connection.md | 2 +- docs/api/node-duckdb.duckdb._constructor_.md | 2 +- docs/api/node-duckdb.duckdb.accessmode.md | 2 +- .../node-duckdb.duckdb.checkpointwalsize.md | 2 +- docs/api/node-duckdb.duckdb.close.md | 2 +- docs/api/node-duckdb.duckdb.collation.md | 2 +- .../node-duckdb.duckdb.defaultnullorder.md | 2 +- .../node-duckdb.duckdb.defaultordertype.md | 2 +- docs/api/node-duckdb.duckdb.enablecopy.md | 2 +- docs/api/node-duckdb.duckdb.isclosed.md | 2 +- docs/api/node-duckdb.duckdb.maximummemory.md | 2 +- docs/api/node-duckdb.duckdb.md | 2 +- .../node-duckdb.duckdb.temporarydirectory.md | 2 +- ...ode-duckdb.duckdb.usetemporarydirectory.md | 2 +- docs/api/node-duckdb.iduckdbconfig.md | 2 +- docs/api/node-duckdb.iduckdbconfig.options.md | 2 +- docs/api/node-duckdb.iduckdbconfig.path.md | 2 +- ...-duckdb.iduckdboptionsconfig.accessmode.md | 2 +- ....iduckdboptionsconfig.checkpointwalsize.md | 2 +- ...e-duckdb.iduckdboptionsconfig.collation.md | 2 +- ...b.iduckdboptionsconfig.defaultnullorder.md | 2 +- ...b.iduckdboptionsconfig.defaultordertype.md | 2 +- ...-duckdb.iduckdboptionsconfig.enablecopy.md | 2 +- ...ckdb.iduckdboptionsconfig.maximummemory.md | 2 +- docs/api/node-duckdb.iduckdboptionsconfig.md | 2 +- ...iduckdboptionsconfig.temporarydirectory.md | 2 +- ...duckdb.iduckdboptionsconfig.usedirectio.md | 2 +- ...ckdboptionsconfig.usetemporarydirectory.md | 2 +- ...uckdb.iexecuteoptions.forcematerialized.md | 2 +- docs/api/node-duckdb.iexecuteoptions.md | 2 +- ...-duckdb.iexecuteoptions.rowresultformat.md | 2 +- docs/api/node-duckdb.md | 2 +- docs/api/node-duckdb.orderbynulltype.md | 2 +- docs/api/node-duckdb.ordertype.md | 2 +- docs/api/node-duckdb.resultiterator.close.md | 2 +- .../node-duckdb.resultiterator.describe.md | 2 +- ...node-duckdb.resultiterator.fetchallrows.md | 2 +- .../node-duckdb.resultiterator.fetchrow.md | 2 +- .../node-duckdb.resultiterator.isclosed.md | 2 +- docs/api/node-duckdb.resultiterator.md | 2 +- docs/api/node-duckdb.resultiterator.type.md | 2 +- docs/api/node-duckdb.resultstream.md | 2 +- docs/api/node-duckdb.resulttype.md | 2 +- docs/api/node-duckdb.rowresultformat.md | 2 +- replace.sh => docs/replace.sh | 4 +- etc/node-duckdb.api.md | 135 -- package.json | 2 +- temp/node-duckdb.api.json | 1718 ----------------- temp/node-duckdb.api.md | 135 -- 56 files changed, 55 insertions(+), 2041 deletions(-) rename replace.sh => docs/replace.sh (64%) delete mode 100644 etc/node-duckdb.api.md delete mode 100644 temp/node-duckdb.api.json delete mode 100644 temp/node-duckdb.api.md diff --git a/.gitignore b/.gitignore index d050a43..013ad27 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ coverage duckdb duckdb.tar.gz prebuilds +temp +etc diff --git a/docs/api/node-duckdb.accessmode.md b/docs/api/node-duckdb.accessmode.md index 49fc11f..9606d18 100644 --- a/docs/api/node-duckdb.accessmode.md +++ b/docs/api/node-duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) +[Node-DuckDB API](./node-duckdb.md) > [AccessMode](./node-duckdb.accessmode.md) ## AccessMode enum diff --git a/docs/api/node-duckdb.connection._constructor_.md b/docs/api/node-duckdb.connection._constructor_.md index 6ce5a3f..91840e1 100644 --- a/docs/api/node-duckdb.connection._constructor_.md +++ b/docs/api/node-duckdb.connection._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [(constructor)](./node-duckdb.connection._constructor_.md) ## Connection.(constructor) diff --git a/docs/api/node-duckdb.connection.close.md b/docs/api/node-duckdb.connection.close.md index 92168ac..48c6f31 100644 --- a/docs/api/node-duckdb.connection.close.md +++ b/docs/api/node-duckdb.connection.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [close](./node-duckdb.connection.close.md) ## Connection.close() method diff --git a/docs/api/node-duckdb.connection.execute.md b/docs/api/node-duckdb.connection.execute.md index b89ae7f..5df3a45 100644 --- a/docs/api/node-duckdb.connection.execute.md +++ b/docs/api/node-duckdb.connection.execute.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [execute](./node-duckdb.connection.execute.md) ## Connection.execute() method diff --git a/docs/api/node-duckdb.connection.executeiterator.md b/docs/api/node-duckdb.connection.executeiterator.md index c8b496a..80412b6 100644 --- a/docs/api/node-duckdb.connection.executeiterator.md +++ b/docs/api/node-duckdb.connection.executeiterator.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [executeIterator](./node-duckdb.connection.executeiterator.md) ## Connection.executeIterator() method diff --git a/docs/api/node-duckdb.connection.isclosed.md b/docs/api/node-duckdb.connection.isclosed.md index 5b7e2f4..0e90045 100644 --- a/docs/api/node-duckdb.connection.isclosed.md +++ b/docs/api/node-duckdb.connection.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) > [isClosed](./node-duckdb.connection.isclosed.md) ## Connection.isClosed property diff --git a/docs/api/node-duckdb.connection.md b/docs/api/node-duckdb.connection.md index f238110..52f5a67 100644 --- a/docs/api/node-duckdb.connection.md +++ b/docs/api/node-duckdb.connection.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) +[Node-DuckDB API](./node-duckdb.md) > [Connection](./node-duckdb.connection.md) ## Connection class diff --git a/docs/api/node-duckdb.duckdb._constructor_.md b/docs/api/node-duckdb.duckdb._constructor_.md index 527bc4d..e450f4f 100644 --- a/docs/api/node-duckdb.duckdb._constructor_.md +++ b/docs/api/node-duckdb.duckdb._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [(constructor)](./node-duckdb.duckdb._constructor_.md) ## DuckDB.(constructor) diff --git a/docs/api/node-duckdb.duckdb.accessmode.md b/docs/api/node-duckdb.duckdb.accessmode.md index 24f5ff8..ef5b545 100644 --- a/docs/api/node-duckdb.duckdb.accessmode.md +++ b/docs/api/node-duckdb.duckdb.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [accessMode](./node-duckdb.duckdb.accessmode.md) ## DuckDB.accessMode property diff --git a/docs/api/node-duckdb.duckdb.checkpointwalsize.md b/docs/api/node-duckdb.duckdb.checkpointwalsize.md index 6b69c04..07842a6 100644 --- a/docs/api/node-duckdb.duckdb.checkpointwalsize.md +++ b/docs/api/node-duckdb.duckdb.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [checkPointWALSize](./node-duckdb.duckdb.checkpointwalsize.md) ## DuckDB.checkPointWALSize property diff --git a/docs/api/node-duckdb.duckdb.close.md b/docs/api/node-duckdb.duckdb.close.md index f08d3db..c511d20 100644 --- a/docs/api/node-duckdb.duckdb.close.md +++ b/docs/api/node-duckdb.duckdb.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [close](./node-duckdb.duckdb.close.md) ## DuckDB.close() method diff --git a/docs/api/node-duckdb.duckdb.collation.md b/docs/api/node-duckdb.duckdb.collation.md index fa8a1b4..1beec12 100644 --- a/docs/api/node-duckdb.duckdb.collation.md +++ b/docs/api/node-duckdb.duckdb.collation.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [collation](./node-duckdb.duckdb.collation.md) ## DuckDB.collation property diff --git a/docs/api/node-duckdb.duckdb.defaultnullorder.md b/docs/api/node-duckdb.duckdb.defaultnullorder.md index 8412c5e..0a68bbc 100644 --- a/docs/api/node-duckdb.duckdb.defaultnullorder.md +++ b/docs/api/node-duckdb.duckdb.defaultnullorder.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultNullOrder](./node-duckdb.duckdb.defaultnullorder.md) ## DuckDB.defaultNullOrder property diff --git a/docs/api/node-duckdb.duckdb.defaultordertype.md b/docs/api/node-duckdb.duckdb.defaultordertype.md index f4dde07..2942809 100644 --- a/docs/api/node-duckdb.duckdb.defaultordertype.md +++ b/docs/api/node-duckdb.duckdb.defaultordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [defaultOrderType](./node-duckdb.duckdb.defaultordertype.md) ## DuckDB.defaultOrderType property diff --git a/docs/api/node-duckdb.duckdb.enablecopy.md b/docs/api/node-duckdb.duckdb.enablecopy.md index 5484a82..0860e2f 100644 --- a/docs/api/node-duckdb.duckdb.enablecopy.md +++ b/docs/api/node-duckdb.duckdb.enablecopy.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [enableCopy](./node-duckdb.duckdb.enablecopy.md) ## DuckDB.enableCopy property diff --git a/docs/api/node-duckdb.duckdb.isclosed.md b/docs/api/node-duckdb.duckdb.isclosed.md index 689f591..88197c2 100644 --- a/docs/api/node-duckdb.duckdb.isclosed.md +++ b/docs/api/node-duckdb.duckdb.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [isClosed](./node-duckdb.duckdb.isclosed.md) ## DuckDB.isClosed property diff --git a/docs/api/node-duckdb.duckdb.maximummemory.md b/docs/api/node-duckdb.duckdb.maximummemory.md index afe9855..ad05ab6 100644 --- a/docs/api/node-duckdb.duckdb.maximummemory.md +++ b/docs/api/node-duckdb.duckdb.maximummemory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [maximumMemory](./node-duckdb.duckdb.maximummemory.md) ## DuckDB.maximumMemory property diff --git a/docs/api/node-duckdb.duckdb.md b/docs/api/node-duckdb.duckdb.md index 7f0af5f..019aa7a 100644 --- a/docs/api/node-duckdb.duckdb.md +++ b/docs/api/node-duckdb.duckdb.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) ## DuckDB class diff --git a/docs/api/node-duckdb.duckdb.temporarydirectory.md b/docs/api/node-duckdb.duckdb.temporarydirectory.md index a89d51b..3da5d6b 100644 --- a/docs/api/node-duckdb.duckdb.temporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.temporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [temporaryDirectory](./node-duckdb.duckdb.temporarydirectory.md) ## DuckDB.temporaryDirectory property diff --git a/docs/api/node-duckdb.duckdb.usetemporarydirectory.md b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md index 8a6cf7d..f9597bb 100644 --- a/docs/api/node-duckdb.duckdb.usetemporarydirectory.md +++ b/docs/api/node-duckdb.duckdb.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) +[Node-DuckDB API](./node-duckdb.md) > [DuckDB](./node-duckdb.duckdb.md) > [useTemporaryDirectory](./node-duckdb.duckdb.usetemporarydirectory.md) ## DuckDB.useTemporaryDirectory property diff --git a/docs/api/node-duckdb.iduckdbconfig.md b/docs/api/node-duckdb.iduckdbconfig.md index 0b45fa7..569675d 100644 --- a/docs/api/node-duckdb.iduckdbconfig.md +++ b/docs/api/node-duckdb.iduckdbconfig.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) ## IDuckDBConfig interface diff --git a/docs/api/node-duckdb.iduckdbconfig.options.md b/docs/api/node-duckdb.iduckdbconfig.options.md index 8e66011..1fea208 100644 --- a/docs/api/node-duckdb.iduckdbconfig.options.md +++ b/docs/api/node-duckdb.iduckdbconfig.options.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [options](./node-duckdb.iduckdbconfig.options.md) ## IDuckDBConfig.options property diff --git a/docs/api/node-duckdb.iduckdbconfig.path.md b/docs/api/node-duckdb.iduckdbconfig.path.md index 1637fcb..bb9dafe 100644 --- a/docs/api/node-duckdb.iduckdbconfig.path.md +++ b/docs/api/node-duckdb.iduckdbconfig.path.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBConfig](./node-duckdb.iduckdbconfig.md) > [path](./node-duckdb.iduckdbconfig.path.md) ## IDuckDBConfig.path property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md index 8d4cbca..f1d23e8 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.accessmode.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [accessMode](./node-duckdb.iduckdboptionsconfig.accessmode.md) ## IDuckDBOptionsConfig.accessMode property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md index ee659c3..0aae849 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.checkpointwalsize.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [checkPointWALSize](./node-duckdb.iduckdboptionsconfig.checkpointwalsize.md) ## IDuckDBOptionsConfig.checkPointWALSize property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.collation.md b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md index 36e70e3..c76189d 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.collation.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.collation.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [collation](./node-duckdb.iduckdboptionsconfig.collation.md) ## IDuckDBOptionsConfig.collation property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md index 0edd47f..0ab3d4b 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultnullorder.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultNullOrder](./node-duckdb.iduckdboptionsconfig.defaultnullorder.md) ## IDuckDBOptionsConfig.defaultNullOrder property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md index 87b6094..694f4d4 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.defaultordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [defaultOrderType](./node-duckdb.iduckdboptionsconfig.defaultordertype.md) ## IDuckDBOptionsConfig.defaultOrderType property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md index 78c63f9..b56fc43 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.enablecopy.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [enableCopy](./node-duckdb.iduckdboptionsconfig.enablecopy.md) ## IDuckDBOptionsConfig.enableCopy property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md index 32223bf..92977b8 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.maximummemory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [maximumMemory](./node-duckdb.iduckdboptionsconfig.maximummemory.md) ## IDuckDBOptionsConfig.maximumMemory property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.md b/docs/api/node-duckdb.iduckdboptionsconfig.md index 189edaf..2205121 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) ## IDuckDBOptionsConfig interface diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md index 555e4f7..b904098 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.temporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [temporaryDirectory](./node-duckdb.iduckdboptionsconfig.temporarydirectory.md) ## IDuckDBOptionsConfig.temporaryDirectory property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md index f662943..b0539cf 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usedirectio.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useDirectIO](./node-duckdb.iduckdboptionsconfig.usedirectio.md) ## IDuckDBOptionsConfig.useDirectIO property diff --git a/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md index 7c06097..18780f9 100644 --- a/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md +++ b/docs/api/node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) +[Node-DuckDB API](./node-duckdb.md) > [IDuckDBOptionsConfig](./node-duckdb.iduckdboptionsconfig.md) > [useTemporaryDirectory](./node-duckdb.iduckdboptionsconfig.usetemporarydirectory.md) ## IDuckDBOptionsConfig.useTemporaryDirectory property diff --git a/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md index 467b952..70f8211 100644 --- a/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md +++ b/docs/api/node-duckdb.iexecuteoptions.forcematerialized.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) +[Node-DuckDB API](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [forceMaterialized](./node-duckdb.iexecuteoptions.forcematerialized.md) ## IExecuteOptions.forceMaterialized property diff --git a/docs/api/node-duckdb.iexecuteoptions.md b/docs/api/node-duckdb.iexecuteoptions.md index 644358c..7b8484e 100644 --- a/docs/api/node-duckdb.iexecuteoptions.md +++ b/docs/api/node-duckdb.iexecuteoptions.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) +[Node-DuckDB API](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) ## IExecuteOptions interface diff --git a/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md index 4a9acd0..7d304fe 100644 --- a/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md +++ b/docs/api/node-duckdb.iexecuteoptions.rowresultformat.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) +[Node-DuckDB API](./node-duckdb.md) > [IExecuteOptions](./node-duckdb.iexecuteoptions.md) > [rowResultFormat](./node-duckdb.iexecuteoptions.rowresultformat.md) ## IExecuteOptions.rowResultFormat property diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index b8331a2..9aeeb23 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) +[Node-DuckDB API](./node-duckdb.md) ## node-duckdb package diff --git a/docs/api/node-duckdb.orderbynulltype.md b/docs/api/node-duckdb.orderbynulltype.md index ae54cb2..a26b9d3 100644 --- a/docs/api/node-duckdb.orderbynulltype.md +++ b/docs/api/node-duckdb.orderbynulltype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) +[Node-DuckDB API](./node-duckdb.md) > [OrderByNullType](./node-duckdb.orderbynulltype.md) ## OrderByNullType enum diff --git a/docs/api/node-duckdb.ordertype.md b/docs/api/node-duckdb.ordertype.md index 2764cf8..87b5851 100644 --- a/docs/api/node-duckdb.ordertype.md +++ b/docs/api/node-duckdb.ordertype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) +[Node-DuckDB API](./node-duckdb.md) > [OrderType](./node-duckdb.ordertype.md) ## OrderType enum diff --git a/docs/api/node-duckdb.resultiterator.close.md b/docs/api/node-duckdb.resultiterator.close.md index f4b0918..174d577 100644 --- a/docs/api/node-duckdb.resultiterator.close.md +++ b/docs/api/node-duckdb.resultiterator.close.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [close](./node-duckdb.resultiterator.close.md) ## ResultIterator.close() method diff --git a/docs/api/node-duckdb.resultiterator.describe.md b/docs/api/node-duckdb.resultiterator.describe.md index 8bf640c..e60ee63 100644 --- a/docs/api/node-duckdb.resultiterator.describe.md +++ b/docs/api/node-duckdb.resultiterator.describe.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [describe](./node-duckdb.resultiterator.describe.md) ## ResultIterator.describe() method diff --git a/docs/api/node-duckdb.resultiterator.fetchallrows.md b/docs/api/node-duckdb.resultiterator.fetchallrows.md index cd39cde..2de4f88 100644 --- a/docs/api/node-duckdb.resultiterator.fetchallrows.md +++ b/docs/api/node-duckdb.resultiterator.fetchallrows.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchAllRows](./node-duckdb.resultiterator.fetchallrows.md) ## ResultIterator.fetchAllRows() method diff --git a/docs/api/node-duckdb.resultiterator.fetchrow.md b/docs/api/node-duckdb.resultiterator.fetchrow.md index 85e83d3..9cd56c7 100644 --- a/docs/api/node-duckdb.resultiterator.fetchrow.md +++ b/docs/api/node-duckdb.resultiterator.fetchrow.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [fetchRow](./node-duckdb.resultiterator.fetchrow.md) ## ResultIterator.fetchRow() method diff --git a/docs/api/node-duckdb.resultiterator.isclosed.md b/docs/api/node-duckdb.resultiterator.isclosed.md index c296d18..c4a4198 100644 --- a/docs/api/node-duckdb.resultiterator.isclosed.md +++ b/docs/api/node-duckdb.resultiterator.isclosed.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [isClosed](./node-duckdb.resultiterator.isclosed.md) ## ResultIterator.isClosed property diff --git a/docs/api/node-duckdb.resultiterator.md b/docs/api/node-duckdb.resultiterator.md index c1aed73..a6fd330 100644 --- a/docs/api/node-duckdb.resultiterator.md +++ b/docs/api/node-duckdb.resultiterator.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) ## ResultIterator class diff --git a/docs/api/node-duckdb.resultiterator.type.md b/docs/api/node-duckdb.resultiterator.type.md index f2f94b1..ea1633c 100644 --- a/docs/api/node-duckdb.resultiterator.type.md +++ b/docs/api/node-duckdb.resultiterator.type.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultIterator](./node-duckdb.resultiterator.md) > [type](./node-duckdb.resultiterator.type.md) ## ResultIterator.type property diff --git a/docs/api/node-duckdb.resultstream.md b/docs/api/node-duckdb.resultstream.md index 68774d6..d954b35 100644 --- a/docs/api/node-duckdb.resultstream.md +++ b/docs/api/node-duckdb.resultstream.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultStream](./node-duckdb.resultstream.md) ## ResultStream class diff --git a/docs/api/node-duckdb.resulttype.md b/docs/api/node-duckdb.resulttype.md index 96691c6..9b8cbc5 100644 --- a/docs/api/node-duckdb.resulttype.md +++ b/docs/api/node-duckdb.resulttype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) +[Node-DuckDB API](./node-duckdb.md) > [ResultType](./node-duckdb.resulttype.md) ## ResultType enum diff --git a/docs/api/node-duckdb.rowresultformat.md b/docs/api/node-duckdb.rowresultformat.md index 25c0ec5..e810633 100644 --- a/docs/api/node-duckdb.rowresultformat.md +++ b/docs/api/node-duckdb.rowresultformat.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [node-duckdb](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) +[Node-DuckDB API](./node-duckdb.md) > [RowResultFormat](./node-duckdb.rowresultformat.md) ## RowResultFormat enum diff --git a/replace.sh b/docs/replace.sh similarity index 64% rename from replace.sh rename to docs/replace.sh index 695be43..a80f41b 100755 --- a/replace.sh +++ b/docs/replace.sh @@ -1,3 +1,3 @@ #!/bin/sh -cd markdown -sed -i '' -- 's/\[Home\](.\/index\.md) > \[node-duckdb\]/[Node-DuckDB API Overview]/g' * +cd docs/api +sed -i '' -- 's/\[Home\](.\/index\.md) > \[node-duckdb\]/[Node-DuckDB API]/g' * diff --git a/etc/node-duckdb.api.md b/etc/node-duckdb.api.md deleted file mode 100644 index a2d2ea9..0000000 --- a/etc/node-duckdb.api.md +++ /dev/null @@ -1,135 +0,0 @@ -## API Report File for "node-duckdb" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -import { Readable } from "stream"; - -// @public -export enum AccessMode { - // (undocumented) - Automatic = 1, - // (undocumented) - ReadOnly = 2, - // (undocumented) - ReadWrite = 3, - // (undocumented) - Undefined = 0, -} - -// @public -export class Connection { - constructor(duckdb: DuckDB); - close(): void; - execute(command: string, options?: IExecuteOptions): Promise>; - executeIterator(command: string, options?: IExecuteOptions): Promise>; - get isClosed(): boolean; -} - -// @public -export class DuckDB { - constructor(config?: IDuckDBConfig); - get accessMode(): AccessMode; - get checkPointWALSize(): number; - close(): void; - get collation(): string; - // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts - // - // @internal - get db(): DuckDBClass; - get defaultNullOrder(): OrderByNullType; - get defaultOrderType(): OrderType; - get enableCopy(): boolean; - get isClosed(): boolean; - get maximumMemory(): number; - get temporaryDirectory(): string; - get useTemporaryDirectory(): boolean; -} - -// @public -export interface IDuckDBConfig { - // (undocumented) - options?: IDuckDBOptionsConfig; - path?: string; -} - -// @public -export interface IDuckDBOptionsConfig { - accessMode?: AccessMode; - checkPointWALSize?: number; - collation?: string; - defaultNullOrder?: OrderByNullType; - defaultOrderType?: OrderType; - enableCopy?: boolean; - maximumMemory?: number; - temporaryDirectory?: string; - useDirectIO?: boolean; - useTemporaryDirectory?: boolean; -} - -// @public -export interface IExecuteOptions { - forceMaterialized?: boolean; - rowResultFormat?: RowResultFormat; -} - -// @public -export enum OrderByNullType { - // (undocumented) - Default = 1, - // (undocumented) - Invalid = 0, - // (undocumented) - NullsFirst = 2, - // (undocumented) - NullsLast = 3, -} - -// @public -export enum OrderType { - // (undocumented) - Ascending = 2, - // (undocumented) - Default = 1, - // (undocumented) - Descending = 3, - // (undocumented) - Invalid = 0, -} - -// @public -export class ResultIterator { - // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts - // - // @internal - constructor(resultInterator: ResultIteratorClass); - close(): void; - describe(): string[][]; - fetchAllRows(): T[]; - fetchRow(): T; - get isClosed(): boolean; - get type(): ResultType; -} - -// @public -export class ResultStream extends Readable { - // @internal - constructor(resultIterator: ResultIterator); - // @internal (undocumented) - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - // @internal (undocumented) - _read(): void; -} - -// @public -export enum ResultType { - Materialized = "Materialized", - Streaming = "Streaming", -} - -// @public -export enum RowResultFormat { - Array = 1, - Object = 0, -} -``` diff --git a/package.json b/package.json index 21a8755..d2f1721 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "download-duckdb": "rm -rf duckdb && curl -L https://github.com/cwida/duckdb/archive/v0.2.2.tar.gz > duckdb.tar.gz && tar xf duckdb.tar.gz && mv duckdb-0.2.2 duckdb && rm duckdb.tar.gz", "eslint:check": "eslint --ext .js,.json,.ts ./", "eslint:fix": "eslint --fix --ext .js,.json,.ts ./", - "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp -o docs/api && ./replace.sh", + "generate-doc": "yarn build:ts && rm -rf temp etc && mkdir etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp -o docs/api && ./docs/replace.sh", "install": "prebuild-install --verbose -d -r napi || (yarn download-duckdb && yarn build:duckdb && yarn prebuild:current-target)", "lint:check": "yarn prettier:check && yarn eslint:check && yarn clang:check", "lint:fix": "yarn prettier:fix && yarn eslint:fix && yarn clang:fix", diff --git a/temp/node-duckdb.api.json b/temp/node-duckdb.api.json deleted file mode 100644 index d07f119..0000000 --- a/temp/node-duckdb.api.json +++ /dev/null @@ -1,1718 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.12.0", - "schemaVersion": 1003, - "oldestForwardsCompatibleVersion": 1001 - }, - "kind": "Package", - "canonicalReference": "node-duckdb!", - "docComment": "/**\n * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}.\n *\n * @example\n *\n * Do some simple querying and print the result\n * ```\n * import { Connection, DuckDB } from \"node-duckdb\";\n *\n * async function queryDatabaseWithIterator() {\n * // create new database in memory\n * const db = new DuckDB();\n * // create a new connection to the database\n * const connection = new Connection(db);\n *\n * // perform some queries\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n *\n * // fetch and print result\n * console.log(result.fetchAllRows());\n *\n * // release resources\n * connection.close();\n * db.close();\n * }\n *\n * queryDatabaseWithIterator();\n * ```\n *\n * @packageDocumentation\n */\n", - "name": "node-duckdb", - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "node-duckdb!", - "name": "", - "members": [ - { - "kind": "Enum", - "canonicalReference": "node-duckdb!AccessMode:enum", - "docComment": "/**\n * Access mode specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum AccessMode " - } - ], - "releaseTag": "Public", - "name": "AccessMode", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.Automatic:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Automatic = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Automatic", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.ReadOnly:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ReadOnly = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "ReadOnly", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.ReadWrite:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ReadWrite = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "ReadWrite", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!AccessMode.Undefined:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Undefined = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Undefined", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!Connection:class", - "docComment": "/**\n * The Connection class represents a DuckDB connection.\n *\n * @remarks\n *\n * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Connection " - } - ], - "releaseTag": "Public", - "name": "Connection", - "members": [ - { - "kind": "Constructor", - "canonicalReference": "node-duckdb!Connection:constructor(1)", - "docComment": "/**\n * Connection constructor.\n *\n * @param duckdb - {@link DuckDB | DuckDB} instance to connect to.\n *\n * @example\n *\n * Initializing a connection:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(duckdb: " - }, - { - "kind": "Reference", - "text": "DuckDB", - "canonicalReference": "node-duckdb!DuckDB:class" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "duckdb", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#close:member(1)", - "docComment": "/**\n * Close the connection (also closes all {@link ResultStream | ResultStream} or {@link ResultIterator | ResultIterator} objects associated with this connection).\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#execute:member(1)", - "docComment": "/**\n * Asynchronously executes the query and returns a node.js stream that wraps the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Streaming results of a DuckDB query into a CSV file:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * import { createWriteStream } from \"fs\";\n * import { Transform } from \"stream\";\n * class ArrayToCsvTransform extends Transform {\n * constructor() {\n * super({objectMode: true})\n * }\n * _transform(chunk: any[], _encoding: string, callback: any) {\n * this.push(chunk.join(\",\") + '\\n');\n * callback();\n * }\n * }\n *\n * async function outputToFileAsCsv() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.execute(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.execute(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const resultStream = await connection.execute(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * const transformToCsvStream = new ArrayToCsvTransform();\n * const writeStream = createWriteStream(\"my-people-output\");\n * resultStream.pipe(transformToCsvStream).pipe(writeStream);\n * }\n * outputToFileAsCsv();\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "execute(command: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "IExecuteOptions", - "canonicalReference": "node-duckdb!IExecuteOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResultStream", - "canonicalReference": "node-duckdb!ResultStream:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "command", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "execute" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!Connection#executeIterator:member(1)", - "docComment": "/**\n * Asynchronously executes the query and returns an iterator that points to the first result in the result set.\n *\n * @param command - SQL command to execute\n *\n * @param options - optional options object of type {@link IExecuteOptions | IExecuteOptions}\n *\n * @example\n *\n * Printing rows:\n * ```\n * import { Connection, DuckDB, RowResultFormat } from \"node-duckdb\";\n * async function queryDatabaseWithIterator() {\n * const db = new DuckDB();\n * const connection = new Connection(db);\n * await connection.executeIterator(\"CREATE TABLE people(id INTEGER, name VARCHAR);\");\n * await connection.executeIterator(\"INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');\");\n * const result = await connection.executeIterator(\"SELECT * FROM people;\");\n * // print the first row\n * console.log(result.fetchRow());\n * // print the rest of the rows\n * console.log(result.fetchAllRows());\n * const result2 = await connection.executeIterator(\"SELECT * FROM people;\", {rowResultFormat: RowResultFormat.Array});\n * console.log(result2.fetchAllRows());\n * connection.close();\n * db.close();\n * }\n * queryDatabaseWithIterator();\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "executeIterator(command: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "IExecuteOptions", - "canonicalReference": "node-duckdb!IExecuteOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResultIterator", - "canonicalReference": "node-duckdb!ResultIterator:class" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "command", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "executeIterator" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!Connection#isClosed:member", - "docComment": "/**\n * If the connection is closed returns true, otherwise false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!DuckDB:class", - "docComment": "/**\n * The DuckDB class represents a DuckDB database instance.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DuckDB " - } - ], - "releaseTag": "Public", - "name": "DuckDB", - "members": [ - { - "kind": "Constructor", - "canonicalReference": "node-duckdb!DuckDB:constructor(1)", - "docComment": "/**\n * DuckDB Database constructor. When called instantiates a native instance of DuckDB.\n *\n * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}.\n *\n * @example\n *\n * Initializing a duckdb database in memory:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB();\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file:\n * ```\n * import { DuckDB } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\") });\n * ```\n *\n * @example\n *\n * Initializing a duckdb database from file and setting some additional options:\n * ```\n * import { DuckDB, OrderType } from \"node-duckdb\";\n * const db = new DuckDB({ path: join(__dirname, \"./mydb\"), options: { defaultOrderType: OrderType.Descending, temporaryDirectory: false } });\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(config?: " - }, - { - "kind": "Reference", - "text": "IDuckDBConfig", - "canonicalReference": "node-duckdb!IDuckDBConfig:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "config", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#accessMode:member", - "docComment": "/**\n * Returns the {@link AccessMode | access mode} used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get accessMode(): " - }, - { - "kind": "Reference", - "text": "AccessMode", - "canonicalReference": "node-duckdb!AccessMode:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "accessMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#checkPointWALSize:member", - "docComment": "/**\n * Returns the checkpoint write ahead log size used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get checkPointWALSize(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "checkPointWALSize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!DuckDB#close:member(1)", - "docComment": "/**\n * Closes the underlying duckdb database, frees associated memory and renders it unusuable.\n *\n * @remarks\n *\n * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#collation:member", - "docComment": "/**\n * Returns the collation used by the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get collation(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "collation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#defaultNullOrder:member", - "docComment": "/**\n * Returns the default {@link OrderByNullType | sort order for null values}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get defaultNullOrder(): " - }, - { - "kind": "Reference", - "text": "OrderByNullType", - "canonicalReference": "node-duckdb!OrderByNullType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "defaultNullOrder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#defaultOrderType:member", - "docComment": "/**\n * Returns the default {@link OrderType | sort order}.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get defaultOrderType(): " - }, - { - "kind": "Reference", - "text": "OrderType", - "canonicalReference": "node-duckdb!OrderType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "defaultOrderType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#enableCopy:member", - "docComment": "/**\n * Returns true of copying is enabled, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get enableCopy(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "enableCopy", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#isClosed:member", - "docComment": "/**\n * Returns true if the underlying database has been closed, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#maximumMemory:member", - "docComment": "/**\n * Returns the maximum memory limit for the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get maximumMemory(): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "maximumMemory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#temporaryDirectory:member", - "docComment": "/**\n * Returns the temporary directory location for the database.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get temporaryDirectory(): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "temporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!DuckDB#useTemporaryDirectory:member", - "docComment": "/**\n * Returns true if the database uses a temporary directory for storing data that does not fit into memory, false otherwise.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get useTemporaryDirectory(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "useTemporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IDuckDBConfig:interface", - "docComment": "/**\n * Configuration object for DuckDB\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IDuckDBConfig " - } - ], - "releaseTag": "Public", - "name": "IDuckDBConfig", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBConfig#options:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "options?: " - }, - { - "kind": "Reference", - "text": "IDuckDBOptionsConfig", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBConfig#path:member", - "docComment": "/**\n * Path to the database file. If undefined, in-memory database is created\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "path?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "path", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig:interface", - "docComment": "/**\n * Options object type for the DuckDB class\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IDuckDBOptionsConfig " - } - ], - "releaseTag": "Public", - "name": "IDuckDBOptionsConfig", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#accessMode:member", - "docComment": "/**\n * Access Mode\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "accessMode?: " - }, - { - "kind": "Reference", - "text": "AccessMode", - "canonicalReference": "node-duckdb!AccessMode:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "accessMode", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#checkPointWALSize:member", - "docComment": "/**\n * Checkpoint Write Ahead Log Size (in bytes)\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "checkPointWALSize?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "checkPointWALSize", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#collation:member", - "docComment": "/**\n * Collation\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "collation?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "collation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultNullOrder:member", - "docComment": "/**\n * Default order for Null values\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultNullOrder?: " - }, - { - "kind": "Reference", - "text": "OrderByNullType", - "canonicalReference": "node-duckdb!OrderByNullType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "defaultNullOrder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#defaultOrderType:member", - "docComment": "/**\n * Default Order\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultOrderType?: " - }, - { - "kind": "Reference", - "text": "OrderType", - "canonicalReference": "node-duckdb!OrderType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "defaultOrderType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#enableCopy:member", - "docComment": "/**\n * Enable Copy\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "enableCopy?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "enableCopy", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#maximumMemory:member", - "docComment": "/**\n * Maximum memory limit for the databse (in bytes)\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "maximumMemory?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "maximumMemory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#temporaryDirectory:member", - "docComment": "/**\n * Location of the temporary directory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "temporaryDirectory?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "temporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useDirectIO:member", - "docComment": "/**\n * Whether to use Direct IO\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useDirectIO?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "useDirectIO", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IDuckDBOptionsConfig#useTemporaryDirectory:member", - "docComment": "/**\n * Whether to use temporary directory to store data that doesn't fit in memory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useTemporaryDirectory?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "useTemporaryDirectory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "node-duckdb!IExecuteOptions:interface", - "docComment": "/**\n * Options for connection.execute\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IExecuteOptions " - } - ], - "releaseTag": "Public", - "name": "IExecuteOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IExecuteOptions#forceMaterialized:member", - "docComment": "/**\n * Materialized means that the whole result is loaded into memory, as opposed to streaming which means there is a pointer to the next row and rows are retrieved one by one. If falsy, DuckDB will *attempt* to not load the whole result set into memory at once.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "forceMaterialized?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "forceMaterialized", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "node-duckdb!IExecuteOptions#rowResultFormat:member", - "docComment": "/**\n * Row format\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "rowResultFormat?: " - }, - { - "kind": "Reference", - "text": "RowResultFormat", - "canonicalReference": "node-duckdb!RowResultFormat:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "rowResultFormat", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!OrderByNullType:enum", - "docComment": "/**\n * Null order specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum OrderByNullType " - } - ], - "releaseTag": "Public", - "name": "OrderByNullType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.Default:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Default = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Default", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.Invalid:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Invalid = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Invalid", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.NullsFirst:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "NullsFirst = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "NullsFirst", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderByNullType.NullsLast:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "NullsLast = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "NullsLast", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!OrderType:enum", - "docComment": "/**\n * Default sort order specifier\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum OrderType " - } - ], - "releaseTag": "Public", - "name": "OrderType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Ascending:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Ascending = " - }, - { - "kind": "Content", - "text": "2" - } - ], - "releaseTag": "Public", - "name": "Ascending", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Default:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Default = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Default", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Descending:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Descending = " - }, - { - "kind": "Content", - "text": "3" - } - ], - "releaseTag": "Public", - "name": "Descending", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!OrderType.Invalid:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "Invalid = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Invalid", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!ResultIterator:class", - "docComment": "/**\n * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultIterator` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ResultIterator " - } - ], - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ResultIterator", - "members": [ - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#close:member(1)", - "docComment": "/**\n * Close the ResultIterator\n *\n * @remarks\n *\n * `close` on the connection automatically closes all associated ResultIterators.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "close" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#describe:member(1)", - "docComment": "/**\n * Describe the result set schema.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "describe(): " - }, - { - "kind": "Content", - "text": "string[][]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "describe" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#fetchAllRows:member(1)", - "docComment": "/**\n * Fetch all rows\n *\n * @remarks\n *\n * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetchAllRows(): " - }, - { - "kind": "Content", - "text": "T[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "fetchAllRows" - }, - { - "kind": "Method", - "canonicalReference": "node-duckdb!ResultIterator#fetchRow:member(1)", - "docComment": "/**\n * Fetch the next row\n *\n * @remarks\n *\n * First call returns the first row, when no more rows left `null` is returned.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetchRow(): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "fetchRow" - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!ResultIterator#isClosed:member", - "docComment": "/**\n * Returns true if ResultIterator is closed, false otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isClosed(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "isClosed", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Property", - "canonicalReference": "node-duckdb!ResultIterator#type:member", - "docComment": "/**\n * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get type(): " - }, - { - "kind": "Reference", - "text": "ResultType", - "canonicalReference": "node-duckdb!ResultType:enum" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "node-duckdb!ResultStream:class", - "docComment": "/**\n * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ResultStream` class.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ResultStream extends " - }, - { - "kind": "Reference", - "text": "Readable", - "canonicalReference": "!internal.Readable:class" - }, - { - "kind": "Content", - "text": " " - } - ], - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ResultStream", - "members": [], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!ResultType:enum", - "docComment": "/**\n * Specifier for how DuckDB attempts to load the result\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum ResultType " - } - ], - "releaseTag": "Public", - "name": "ResultType", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!ResultType.Materialized:member", - "docComment": "/**\n * Load the whole result set into memory\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Materialized = " - }, - { - "kind": "Content", - "text": "\"Materialized\"" - } - ], - "releaseTag": "Public", - "name": "Materialized", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!ResultType.Streaming:member", - "docComment": "/**\n * Keep pointer to the first row, don't load the whole result set all at once\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Streaming = " - }, - { - "kind": "Content", - "text": "\"Streaming\"" - } - ], - "releaseTag": "Public", - "name": "Streaming", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Enum", - "canonicalReference": "node-duckdb!RowResultFormat:enum", - "docComment": "/**\n * Result format specifier for rows\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum RowResultFormat " - } - ], - "releaseTag": "Public", - "name": "RowResultFormat", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!RowResultFormat.Array:member", - "docComment": "/**\n * Array, e.g. [\"Bob\", 23]\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Array = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "Array", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "node-duckdb!RowResultFormat.Object:member", - "docComment": "/**\n * Object, e.g. \\{name: \"Bob\", age: 23\\}\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Object = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Object", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - } - ] - } - ] -} diff --git a/temp/node-duckdb.api.md b/temp/node-duckdb.api.md deleted file mode 100644 index a2d2ea9..0000000 --- a/temp/node-duckdb.api.md +++ /dev/null @@ -1,135 +0,0 @@ -## API Report File for "node-duckdb" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -import { Readable } from "stream"; - -// @public -export enum AccessMode { - // (undocumented) - Automatic = 1, - // (undocumented) - ReadOnly = 2, - // (undocumented) - ReadWrite = 3, - // (undocumented) - Undefined = 0, -} - -// @public -export class Connection { - constructor(duckdb: DuckDB); - close(): void; - execute(command: string, options?: IExecuteOptions): Promise>; - executeIterator(command: string, options?: IExecuteOptions): Promise>; - get isClosed(): boolean; -} - -// @public -export class DuckDB { - constructor(config?: IDuckDBConfig); - get accessMode(): AccessMode; - get checkPointWALSize(): number; - close(): void; - get collation(): string; - // Warning: (ae-forgotten-export) The symbol "DuckDBClass" needs to be exported by the entry point index.d.ts - // - // @internal - get db(): DuckDBClass; - get defaultNullOrder(): OrderByNullType; - get defaultOrderType(): OrderType; - get enableCopy(): boolean; - get isClosed(): boolean; - get maximumMemory(): number; - get temporaryDirectory(): string; - get useTemporaryDirectory(): boolean; -} - -// @public -export interface IDuckDBConfig { - // (undocumented) - options?: IDuckDBOptionsConfig; - path?: string; -} - -// @public -export interface IDuckDBOptionsConfig { - accessMode?: AccessMode; - checkPointWALSize?: number; - collation?: string; - defaultNullOrder?: OrderByNullType; - defaultOrderType?: OrderType; - enableCopy?: boolean; - maximumMemory?: number; - temporaryDirectory?: string; - useDirectIO?: boolean; - useTemporaryDirectory?: boolean; -} - -// @public -export interface IExecuteOptions { - forceMaterialized?: boolean; - rowResultFormat?: RowResultFormat; -} - -// @public -export enum OrderByNullType { - // (undocumented) - Default = 1, - // (undocumented) - Invalid = 0, - // (undocumented) - NullsFirst = 2, - // (undocumented) - NullsLast = 3, -} - -// @public -export enum OrderType { - // (undocumented) - Ascending = 2, - // (undocumented) - Default = 1, - // (undocumented) - Descending = 3, - // (undocumented) - Invalid = 0, -} - -// @public -export class ResultIterator { - // Warning: (ae-forgotten-export) The symbol "ResultIteratorClass" needs to be exported by the entry point index.d.ts - // - // @internal - constructor(resultInterator: ResultIteratorClass); - close(): void; - describe(): string[][]; - fetchAllRows(): T[]; - fetchRow(): T; - get isClosed(): boolean; - get type(): ResultType; -} - -// @public -export class ResultStream extends Readable { - // @internal - constructor(resultIterator: ResultIterator); - // @internal (undocumented) - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - // @internal (undocumented) - _read(): void; -} - -// @public -export enum ResultType { - Materialized = "Materialized", - Streaming = "Streaming", -} - -// @public -export enum RowResultFormat { - Array = 1, - Object = 0, -} -``` From 010c207b1932d6e5c10ffb161d6befc8b84f2b72 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 14:39:21 +0300 Subject: [PATCH 09/17] wip --- docs/api/index.md | 6 +++--- .../node-duckdb.connection.executeiterator.md | 14 +++++++++++++- docs/api/node-duckdb.connection.md | 4 ++-- docs/api/node-duckdb.duckdb.close.md | 2 +- docs/api/node-duckdb.md | 16 ++++++++++------ docs/api/node-duckdb.resultiterator.close.md | 2 +- .../node-duckdb.resultiterator.fetchallrows.md | 2 +- docs/api/node-duckdb.resultiterator.md | 10 +++++----- docs/api/node-duckdb.resultiterator.type.md | 2 +- docs/api/node-duckdb.resultstream.md | 2 +- src/addon/connection.ts | 13 +++++++++++-- src/addon/duckdb.ts | 2 +- src/addon/result-iterator.ts | 8 ++++---- src/addon/result-stream.ts | 2 +- src/index.ts | 7 +++++++ 15 files changed, 62 insertions(+), 30 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 248acc9..fa04dd1 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -6,6 +6,6 @@ ## Packages -| Package | Description | -| ------------------------------- | --------------------------------------------------------------------------------- | -| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). | +| Package | Description | +| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/).Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). Using it involves: 1. Creating a Database object 2. Creating a Connection object to the Database object 3. Calling execute or executeIteraor on the Connection object | diff --git a/docs/api/node-duckdb.connection.executeiterator.md b/docs/api/node-duckdb.connection.executeiterator.md index 80412b6..2485b07 100644 --- a/docs/api/node-duckdb.connection.executeiterator.md +++ b/docs/api/node-duckdb.connection.executeiterator.md @@ -23,7 +23,7 @@ executeIterator(command: string, options?: IExecuteOptions): Promise<T>> -## Example +## Example 1 Printing rows: @@ -47,3 +47,15 @@ async function queryDatabaseWithIterator() { queryDatabaseWithIterator(); ``` + +## Example 2 + +Providing generics type: + +``` +const result = await connection.executeIterator(`SELECT CAST(1 AS TINYINT)`, { + rowResultFormat: RowResultFormat.Array, +}); +expect(result.fetchRow()).toMatchObject([1]); + +``` diff --git a/docs/api/node-duckdb.connection.md b/docs/api/node-duckdb.connection.md index 52f5a67..8875da1 100644 --- a/docs/api/node-duckdb.connection.md +++ b/docs/api/node-duckdb.connection.md @@ -4,7 +4,7 @@ ## Connection class -The Connection class represents a DuckDB connection. +Represents a DuckDB connection. Signature: @@ -14,7 +14,7 @@ export declare class Connection ## Remarks -The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. +A single db instance can have multiple connections. Having more than one connection instance is required when executing concurrent queries. ## Constructors diff --git a/docs/api/node-duckdb.duckdb.close.md b/docs/api/node-duckdb.duckdb.close.md index c511d20..cf4a909 100644 --- a/docs/api/node-duckdb.duckdb.close.md +++ b/docs/api/node-duckdb.duckdb.close.md @@ -18,4 +18,4 @@ void ## Remarks -Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. +Even though GC will automatically destroy the Database object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index 9aeeb23..f0a9c51 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -6,6 +6,8 @@ Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). +Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). Using it involves: 1. Creating a Database object 2. Creating a Connection object to the Database object 3. Calling execute or executeIteraor on the Connection object + ## Example Do some simple querying and print the result @@ -36,14 +38,16 @@ queryDatabaseWithIterator(); ``` +For more examples see [here](https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples). + ## Classes -| Class | Description | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Connection](./node-duckdb.connection.md) | The Connection class represents a DuckDB connection. | -| [DuckDB](./node-duckdb.duckdb.md) | The DuckDB class represents a DuckDB database instance. | -| [ResultIterator](./node-duckdb.resultiterator.md) | ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. | -| [ResultStream](./node-duckdb.resultstream.md) | This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by execute. | +| Class | Description | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [Connection](./node-duckdb.connection.md) | Represents a DuckDB connection. | +| [DuckDB](./node-duckdb.duckdb.md) | The DuckDB class represents a DuckDB database instance. | +| [ResultIterator](./node-duckdb.resultiterator.md) | ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the [Connection.executeIterator](./node-duckdb.connection.executeiterator.md). | +| [ResultStream](./node-duckdb.resultstream.md) | This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by [Connection.execute](./node-duckdb.connection.execute.md). | ## Enumerations diff --git a/docs/api/node-duckdb.resultiterator.close.md b/docs/api/node-duckdb.resultiterator.close.md index 174d577..ac64ffe 100644 --- a/docs/api/node-duckdb.resultiterator.close.md +++ b/docs/api/node-duckdb.resultiterator.close.md @@ -18,4 +18,4 @@ void ## Remarks -`close` on the connection automatically closes all associated ResultIterators. +[Connection.close](./node-duckdb.connection.close.md) automatically closes all associated ResultIterators. diff --git a/docs/api/node-duckdb.resultiterator.fetchallrows.md b/docs/api/node-duckdb.resultiterator.fetchallrows.md index 2de4f88..76b3d55 100644 --- a/docs/api/node-duckdb.resultiterator.fetchallrows.md +++ b/docs/api/node-duckdb.resultiterator.fetchallrows.md @@ -18,4 +18,4 @@ T\[\] ## Remarks -Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. +Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the [fetchRow](./node-duckdb.resultiterator.fetchrow.md) or the [Connection.execute](./node-duckdb.connection.execute.md) method when there is a lot of data. diff --git a/docs/api/node-duckdb.resultiterator.md b/docs/api/node-duckdb.resultiterator.md index a6fd330..1511883 100644 --- a/docs/api/node-duckdb.resultiterator.md +++ b/docs/api/node-duckdb.resultiterator.md @@ -4,7 +4,7 @@ ## ResultIterator class -ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. +ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the [Connection.executeIterator](./node-duckdb.connection.executeiterator.md). Signature: @@ -18,10 +18,10 @@ The constructor for this class is marked as internal. Third-party code should no ## Properties -| Property | Modifiers | Type | Description | -| ---------------------------------------------------- | --------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| [isClosed](./node-duckdb.resultiterator.isclosed.md) | | boolean | Returns true if ResultIterator is closed, false otherwise. | -| [type](./node-duckdb.resultiterator.type.md) | | [ResultType](./node-duckdb.resulttype.md) | Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on executeIterator. | +| Property | Modifiers | Type | Description | +| ---------------------------------------------------- | --------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [isClosed](./node-duckdb.resultiterator.isclosed.md) | | boolean | Returns true if ResultIterator is closed, false otherwise. | +| [type](./node-duckdb.resultiterator.type.md) | | [ResultType](./node-duckdb.resulttype.md) | Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the [options](./node-duckdb.iexecuteoptions.forcematerialized.md) argument on [executeIterator](./node-duckdb.connection.executeiterator.md). | ## Methods diff --git a/docs/api/node-duckdb.resultiterator.type.md b/docs/api/node-duckdb.resultiterator.type.md index ea1633c..d69279a 100644 --- a/docs/api/node-duckdb.resultiterator.type.md +++ b/docs/api/node-duckdb.resultiterator.type.md @@ -4,7 +4,7 @@ ## ResultIterator.type property -Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the options argument on `executeIterator`. +Get the [ResultType](./node-duckdb.resulttype.md) of the ResultIterator. This is specified by the [options](./node-duckdb.iexecuteoptions.forcematerialized.md) argument on [executeIterator](./node-duckdb.connection.executeiterator.md). Signature: diff --git a/docs/api/node-duckdb.resultstream.md b/docs/api/node-duckdb.resultstream.md index d954b35..d206280 100644 --- a/docs/api/node-duckdb.resultstream.md +++ b/docs/api/node-duckdb.resultstream.md @@ -4,7 +4,7 @@ ## ResultStream class -This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. +This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by [Connection.execute](./node-duckdb.connection.execute.md). Signature: diff --git a/src/addon/connection.ts b/src/addon/connection.ts index f6b4c95..dcedd63 100644 --- a/src/addon/connection.ts +++ b/src/addon/connection.ts @@ -5,10 +5,10 @@ import { ResultIterator } from "./result-iterator"; import { IExecuteOptions } from "@addon-types"; /** - * The Connection class represents a DuckDB connection. + * Represents a DuckDB connection. * * @remarks - * The connection instance is what executes queries. A single db class can have multiple connections. Having more than one connection instance is required when executing concurrent queries. + * A single db instance can have multiple connections. Having more than one connection instance is required when executing concurrent queries. * * @public */ @@ -94,6 +94,15 @@ export class Connection { * } * queryDatabaseWithIterator(); * ``` + * + * @example + * Providing generics type: + * ``` + * const result = await connection.executeIterator(`SELECT CAST(1 AS TINYINT)`, { + * rowResultFormat: RowResultFormat.Array, + * }); + * expect(result.fetchRow()).toMatchObject([1]); + * ``` */ public async executeIterator(command: string, options?: IExecuteOptions): Promise> { return new ResultIterator(await this.connectionBinding.execute(command, options)); diff --git a/src/addon/duckdb.ts b/src/addon/duckdb.ts index 439b165..0113f64 100644 --- a/src/addon/duckdb.ts +++ b/src/addon/duckdb.ts @@ -42,7 +42,7 @@ export class DuckDB { /** * Closes the underlying duckdb database, frees associated memory and renders it unusuable. * @remarks - * Even though GC will automatically destroy the Connection object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. + * Even though GC will automatically destroy the Database object at some point, DuckDB data is stored in the native address space, not the V8 heap, meaning you can easily have a Node.js process taking gigabytes of memory (more than the default heap size for Node.js) with V8 not triggering GC. So, definitely think about manually calling `close()`. * @public */ public close(): void { diff --git a/src/addon/result-iterator.ts b/src/addon/result-iterator.ts index dd2df88..bb018cb 100644 --- a/src/addon/result-iterator.ts +++ b/src/addon/result-iterator.ts @@ -2,7 +2,7 @@ import { ResultType } from "@addon-types"; import { ResultIteratorClass } from "../addon-bindings"; /** - * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the executeIterator method on the Connection class. + * ResultIterator represents the result set of a DuckDB query. Instances of this class are returned by the {@link Connection.executeIterator | Connection.executeIterator}. * * @public */ @@ -25,7 +25,7 @@ export class ResultIterator { * Fetch all rows * * @remarks - * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the `fetchRow` or the `execute` method of the Connection class when there is a lot of data. + * Note, this may produce a `heap out of bounds` error in case when there is too much data. Either use the {@link ResultIterator.fetchRow | fetchRow} or the {@link Connection.execute | Connection.execute} method when there is a lot of data. */ public fetchAllRows(): T[] { const allRows: T[] = []; @@ -43,13 +43,13 @@ export class ResultIterator { /** * Close the ResultIterator * @remarks - * `close` on the connection automatically closes all associated ResultIterators. + * {@link Connection.close | Connection.close} automatically closes all associated ResultIterators. */ public close(): void { return this.resultInterator.close(); } /** - * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the options argument on `executeIterator`. + * Get the {@link ResultType | ResultType} of the ResultIterator. This is specified by the {@link IExecuteOptions.forceMaterialized | options} argument on {@link Connection.executeIterator | executeIterator}. */ public get type(): ResultType { return this.resultInterator.type; diff --git a/src/addon/result-stream.ts b/src/addon/result-stream.ts index 5763554..41e6994 100644 --- a/src/addon/result-stream.ts +++ b/src/addon/result-stream.ts @@ -2,7 +2,7 @@ import { Readable } from "stream"; import { ResultIterator } from "./result-iterator"; /** - * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by `execute`. + * This is a Readable stream that wrapps the ResultIterator. Instances of this class are returned by {@link Connection.execute | Connection.execute}. * @public */ export class ResultStream extends Readable { diff --git a/src/index.ts b/src/index.ts index a09a5d0..fd88836 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,12 @@ /** * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}. * + * Node-DuckDB is a thin wrapper on top of {@link https://duckdb.org/ | DuckDB}. + * Using it involves: + * 1. Creating a Database object + * 2. Creating a Connection object to the Database object + * 3. Calling execute or executeIteraor on the Connection object + * * @packageDocumentation * * @example @@ -29,6 +35,7 @@ * * queryDatabaseWithIterator(); * ``` + * For more examples see {@link https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples | here}. */ export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; From 3cf879869a5c97291d49518ea9b6838860b692ed Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 14:50:19 +0300 Subject: [PATCH 10/17] fix --- docs/api/index.md | 6 +++--- docs/api/node-duckdb.duckdb._constructor_.md | 2 +- docs/api/node-duckdb.duckdb.md | 6 +++--- docs/api/node-duckdb.md | 12 +++++++++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index fa04dd1..dc47dea 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -6,6 +6,6 @@ ## Packages -| Package | Description | -| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [node-duckdb](./node-duckdb.md) | Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/).Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). Using it involves: 1. Creating a Database object 2. Creating a Connection object to the Database object 3. Calling execute or executeIteraor on the Connection object | +| Package | Description | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [node-duckdb](./node-duckdb.md) | Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/).Using it involves:1. Creating a object2. Creating a object to the Database object3. Calling or on the Connection object | diff --git a/docs/api/node-duckdb.duckdb._constructor_.md b/docs/api/node-duckdb.duckdb._constructor_.md index e450f4f..cb02f0b 100644 --- a/docs/api/node-duckdb.duckdb._constructor_.md +++ b/docs/api/node-duckdb.duckdb._constructor_.md @@ -4,7 +4,7 @@ ## DuckDB.(constructor) -DuckDB Database constructor. When called instantiates a native instance of DuckDB. +Represents a native instance of DuckDB. Signature: diff --git a/docs/api/node-duckdb.duckdb.md b/docs/api/node-duckdb.duckdb.md index 019aa7a..5f9f571 100644 --- a/docs/api/node-duckdb.duckdb.md +++ b/docs/api/node-duckdb.duckdb.md @@ -14,9 +14,9 @@ export declare class DuckDB ## Constructors -| Constructor | Modifiers | Description | -| -------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------- | -| [(constructor)(config)](./node-duckdb.duckdb._constructor_.md) | | DuckDB Database constructor. When called instantiates a native instance of DuckDB. | +| Constructor | Modifiers | Description | +| -------------------------------------------------------------- | --------- | --------------------------------------- | +| [(constructor)(config)](./node-duckdb.duckdb._constructor_.md) | | Represents a native instance of DuckDB. | ## Properties diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index f0a9c51..7feb958 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -2,11 +2,17 @@ [Node-DuckDB API](./node-duckdb.md) -## node-duckdb package +## Node-DuckDB API -Node.js bindings for DuckDB from [DeepCrawl](https://www.deepcrawl.com/). +Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). -Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). Using it involves: 1. Creating a Database object 2. Creating a Connection object to the Database object 3. Calling execute or executeIteraor on the Connection object +Using it involves: + +1. Creating a object + +2. Creating a [Connection](./node-duckdb.connection.md) object to the Database object + +3. Calling [Connection.execute](./node-duckdb.connection.execute.md) or [Connection.executeIterator](./node-duckdb.connection.executeiterator.md) on the Connection object ## Example From 149fd63ac28852177ae8ec0b5839ace3deb09c6d Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 14:50:31 +0300 Subject: [PATCH 11/17] wip --- docs/replace.sh | 1 + src/addon/duckdb.ts | 4 ++-- src/index.ts | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/replace.sh b/docs/replace.sh index a80f41b..d43417d 100755 --- a/docs/replace.sh +++ b/docs/replace.sh @@ -1,3 +1,4 @@ #!/bin/sh cd docs/api sed -i '' -- 's/\[Home\](.\/index\.md) > \[node-duckdb\]/[Node-DuckDB API]/g' * +sed -i '' -- 's/## node-duckdb package/## Node-DuckDB API/g' node-duckdb.md diff --git a/src/addon/duckdb.ts b/src/addon/duckdb.ts index 0113f64..8d74d73 100644 --- a/src/addon/duckdb.ts +++ b/src/addon/duckdb.ts @@ -1,6 +1,6 @@ import { IDuckDBConfig } from "@addon-types"; import { DuckDBBinding, DuckDBClass } from "../addon-bindings"; -import {AccessMode, OrderType, OrderByNullType} from "@addon-types"; +import { AccessMode, OrderType, OrderByNullType } from "@addon-types"; /** * The DuckDB class represents a DuckDB database instance. @@ -9,7 +9,7 @@ import {AccessMode, OrderType, OrderByNullType} from "@addon-types"; export class DuckDB { private duckdb: DuckDBClass; /** - * DuckDB Database constructor. When called instantiates a native instance of DuckDB. + * Represents a native instance of DuckDB. * @param config - optional configuration object of type {@link IDuckDBConfig | IDuckDBConfig}. * * diff --git a/src/index.ts b/src/index.ts index fd88836..a4d1cb9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,13 @@ /** - * Node.js bindings for DuckDB from {@link https://www.deepcrawl.com/ | DeepCrawl}. - * * Node-DuckDB is a thin wrapper on top of {@link https://duckdb.org/ | DuckDB}. + * * Using it involves: - * 1. Creating a Database object - * 2. Creating a Connection object to the Database object - * 3. Calling execute or executeIteraor on the Connection object + * + * 1. Creating a {@link Database | Database} object + * + * 2. Creating a {@link Connection | Connection} object to the Database object + * + * 3. Calling {@link Connection.execute | Connection.execute} or {@link Connection.executeIterator | Connection.executeIterator} on the Connection object * * @packageDocumentation * From f1c9757af89328184f7eec83fa32e80d20d70aef Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 14:54:49 +0300 Subject: [PATCH 12/17] wip --- api-extractor.json | 6 +++--- docs/api/index.md | 6 +++--- docs/api/node-duckdb.md | 42 ----------------------------------------- src/index.ts | 10 +++++----- 4 files changed, 11 insertions(+), 53 deletions(-) diff --git a/api-extractor.json b/api-extractor.json index 91439f6..3bbbcd5 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -16,17 +16,17 @@ "messages": { "compilerMessageReporting": { "default": { - "logLevel": "warning" + "logLevel": "error" } }, "extractorMessageReporting": { "default": { - "logLevel": "warning" + "logLevel": "error" } }, "tsdocMessageReporting": { "default": { - "logLevel": "warning" + "logLevel": "error" } } } diff --git a/docs/api/index.md b/docs/api/index.md index dc47dea..eb17595 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -6,6 +6,6 @@ ## Packages -| Package | Description | -| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [node-duckdb](./node-duckdb.md) | Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/).Using it involves:1. Creating a object2. Creating a object to the Database object3. Calling or on the Connection object | +| Package | Description | +| ------------------------------- | ----------- | +| [node-duckdb](./node-duckdb.md) | | diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index 7feb958..537e206 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -4,48 +4,6 @@ ## Node-DuckDB API -Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). - -Using it involves: - -1. Creating a object - -2. Creating a [Connection](./node-duckdb.connection.md) object to the Database object - -3. Calling [Connection.execute](./node-duckdb.connection.execute.md) or [Connection.executeIterator](./node-duckdb.connection.executeiterator.md) on the Connection object - -## Example - -Do some simple querying and print the result - -``` -import { Connection, DuckDB } from "node-duckdb"; - -async function queryDatabaseWithIterator() { - // create new database in memory - const db = new DuckDB(); - // create a new connection to the database - const connection = new Connection(db); - - // perform some queries - await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - const result = await connection.executeIterator("SELECT * FROM people;"); - - // fetch and print result - console.log(result.fetchAllRows()); - - // release resources - connection.close(); - db.close(); -} - -queryDatabaseWithIterator(); - -``` - -For more examples see [here](https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples). - ## Classes | Class | Description | diff --git a/src/index.ts b/src/index.ts index a4d1cb9..ed1da55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,14 @@ +export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; +export * from "./addon-types"; + /** * Node-DuckDB is a thin wrapper on top of {@link https://duckdb.org/ | DuckDB}. * * Using it involves: * - * 1. Creating a {@link Database | Database} object + * 1. Creating a {@link DuckDB | DuckDB} object * - * 2. Creating a {@link Connection | Connection} object to the Database object + * 2. Creating a {@link Connection | Connection} object to the DuckDB object * * 3. Calling {@link Connection.execute | Connection.execute} or {@link Connection.executeIterator | Connection.executeIterator} on the Connection object * @@ -39,6 +42,3 @@ * ``` * For more examples see {@link https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples | here}. */ - -export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; -export * from "./addon-types"; From 6496da819ff63838ebf1cd21b25400e632880156 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 15:01:38 +0300 Subject: [PATCH 13/17] wip --- docs/api/index.md | 6 +++--- docs/api/node-duckdb.md | 42 +++++++++++++++++++++++++++++++++++++++++ src/index.ts | 11 +++++------ 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index eb17595..b1e143a 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -6,6 +6,6 @@ ## Packages -| Package | Description | -| ------------------------------- | ----------- | -| [node-duckdb](./node-duckdb.md) | | +| Package | Description | +| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [node-duckdb](./node-duckdb.md) | Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/).Using it involves:1. Creating a [DuckDB](./node-duckdb.duckdb.md) object2. Creating a [Connection](./node-duckdb.connection.md) object to the DuckDB object3. Calling [Connection.execute](./node-duckdb.connection.execute.md) or [Connection.executeIterator](./node-duckdb.connection.executeiterator.md) on the Connection object | diff --git a/docs/api/node-duckdb.md b/docs/api/node-duckdb.md index 537e206..49c4732 100644 --- a/docs/api/node-duckdb.md +++ b/docs/api/node-duckdb.md @@ -4,6 +4,48 @@ ## Node-DuckDB API +Node-DuckDB is a thin wrapper on top of [DuckDB](https://duckdb.org/). + +Using it involves: + +1. Creating a [DuckDB](./node-duckdb.duckdb.md) object + +2. Creating a [Connection](./node-duckdb.connection.md) object to the DuckDB object + +3. Calling [Connection.execute](./node-duckdb.connection.execute.md) or [Connection.executeIterator](./node-duckdb.connection.executeiterator.md) on the Connection object + +## Example + +Do some simple querying and print the result + +``` +import { Connection, DuckDB } from "node-duckdb"; + +async function queryDatabaseWithIterator() { + // create new database in memory + const db = new DuckDB(); + // create a new connection to the database + const connection = new Connection(db); + + // perform some queries + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); + + // fetch and print result + console.log(result.fetchAllRows()); + + // release resources + connection.close(); + db.close(); +} + +queryDatabaseWithIterator(); + +``` + +For more examples see [here](https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples). + ## Classes | Class | Description | diff --git a/src/index.ts b/src/index.ts index ed1da55..d0c5136 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,16 +1,13 @@ -export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; -export * from "./addon-types"; - /** * Node-DuckDB is a thin wrapper on top of {@link https://duckdb.org/ | DuckDB}. * * Using it involves: * - * 1. Creating a {@link DuckDB | DuckDB} object + * 1. Creating a {@link node-duckdb#DuckDB | DuckDB} object * - * 2. Creating a {@link Connection | Connection} object to the DuckDB object + * 2. Creating a {@link node-duckdb#Connection | Connection} object to the DuckDB object * - * 3. Calling {@link Connection.execute | Connection.execute} or {@link Connection.executeIterator | Connection.executeIterator} on the Connection object + * 3. Calling {@link node-duckdb#Connection.execute | Connection.execute} or {@link node-duckdb#Connection.executeIterator | Connection.executeIterator} on the Connection object * * @packageDocumentation * @@ -42,3 +39,5 @@ export * from "./addon-types"; * ``` * For more examples see {@link https://github.com/deepcrawl/node-duckdb/tree/feature/ODIN-423-welcome-page/examples | here}. */ +export { DuckDB, Connection, ResultIterator, ResultStream } from "./addon"; +export * from "./addon-types"; From fa433fc0666eb773c0e34716458bdfe836373cd6 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 15:03:22 +0300 Subject: [PATCH 14/17] done --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e13f584..bfb2da9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,5 +33,6 @@ jobs: yarn install --frozen-lockfile yarn lint:check yarn test + yarn generate-doc env: NODE_AUTH_TOKEN: ${{secrets.GIT_REGISTRY_TOKEN}} From 35abd28a86c9c87d940ae73abaa0b9275b7d5b49 Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 15:10:28 +0300 Subject: [PATCH 15/17] build --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfb2da9..e13f584 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,5 @@ jobs: yarn install --frozen-lockfile yarn lint:check yarn test - yarn generate-doc env: NODE_AUTH_TOKEN: ${{secrets.GIT_REGISTRY_TOKEN}} From b9ed50b6ef7b820f2321035883252856b11403ff Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 15:47:06 +0300 Subject: [PATCH 16/17] fixes --- README.md | 72 ++++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 0fe5f34..f55289a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Note: this will download the duckdb binary for your platform (currently Linux an Using node-duckdb is easy: -``` +```ts const db = new DuckDB(); const connection = new Connection(db); await connection.execute("SELECT * FROM mytable;"); @@ -46,74 +46,42 @@ await connection.execute("SELECT * FROM mytable;"); An example using promises: -``` +```ts import { Connection, DuckDB } from "node-duckdb"; async function queryDatabaseWithIterator() { // create new database in memory const db = new DuckDB(); // create a new connection to the database - const connection = new Connection(db); + const connection = new Connection(db); - // perform some queries - await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - const result = await connection.executeIterator("SELECT * FROM people;"); + // perform some queries + await connection.executeIterator("CREATE TABLE people(id INTEGER, name VARCHAR);"); + await connection.executeIterator("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); + const result = await connection.executeIterator("SELECT * FROM people;"); - // fetch and print result - console.log(result.fetchAllRows()); + // fetch and print result + console.log(result.fetchAllRows()); - // release resources - connection.close(); - db.close(); + // release resources + connection.close(); + db.close(); } queryDatabaseWithIterator(); - ``` #### Streaming API example -A demo of reading from DuckDB, transforming to CSV and writing to file using the streaming API: - -``` -import { Connection, DuckDB, RowResultFormat } from "node-duckdb"; -import { createWriteStream } from "fs"; -import { Transform } from "stream"; - - -class ArrayToCsvTransform extends Transform { - constructor() { - super({objectMode: true}) - } - _transform(chunk: any[], _encoding: string, callback: any) { - this.push(chunk.join(",") + '\n'); - callback(); - } -} - -async function outputToFileAsCsv() { - // create new database in memory - const db = new DuckDB(); - // create a new connection to the database - // note you can execute only one streaming query at a time per one connection - const connection = new Connection(db); - - // by default a query is a streaming one, as opposed to being materialized - await connection.execute("CREATE TABLE people(id INTEGER, name VARCHAR);"); - await connection.execute("INSERT INTO people VALUES (1, 'Mark'), (2, 'Hannes'), (3, 'Bob');"); - - // result is a stream of arrays - const resultStream = await connection.execute("SELECT * FROM people;", {rowResultFormat: RowResultFormat.Array}); - - const transformToCsvStream = new ArrayToCsvTransform(); - const writeStream = createWriteStream("my-people-output"); - // objects -> csv strings -> file - resultStream.pipe(transformToCsvStream).pipe(writeStream); -} - -outputToFileAsCsv(); +Getting a stream of data from DuckDB and piping into a destination stream: +```ts +import { Connection, DuckDB } from "node-duckdb"; +const db = new DuckDB(); +const connection = new Connection(db); +const resultStream = await connection.execute("SELECT * FROM people;"); +// get destinationStream somehow +resultStream.pipe(destinationStream); ``` #### Complete sample project From 6b2d3d21a509ce0f288fa072041e59a68ef580cd Mon Sep 17 00:00:00 2001 From: Rostislav Provodenko Date: Thu, 10 Dec 2020 16:02:43 +0300 Subject: [PATCH 17/17] emails --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d2f1721..deceebd 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "license": "MIT", "author": "DeepCrawl", "contributors": [ - "Dan Forsberg (https://github.com/dforsber)", + "Dan Forsberg (https://github.com/dforsber)", "Pieter Raubenheimer (https://github.com/jupiter)", - "Rostislav Provodenko (https://github.com/rostislavdeepcrawl)" + "Rostislav Provodenko (https://github.com/rostislavdeepcrawl)" ], "main": "dist/index.js", "types": "dist/index.d.ts",