monetdb 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +2 -1
  2. package/dist/PrepareStatement.d.ts +12 -0
  3. package/dist/PrepareStatement.js +29 -0
  4. package/dist/PrepareStatement.js.map +1 -0
  5. package/dist/QueryStream.d.ts +7 -0
  6. package/dist/QueryStream.js +13 -0
  7. package/dist/QueryStream.js.map +1 -0
  8. package/dist/connection.d.ts +25 -0
  9. package/dist/connection.js +104 -0
  10. package/dist/connection.js.map +1 -0
  11. package/dist/connections.d.ts +1 -0
  12. package/dist/connections.js +49 -0
  13. package/dist/connections.js.map +1 -0
  14. package/dist/defaults.d.ts +10 -0
  15. package/dist/defaults.js +13 -0
  16. package/dist/defaults.js.map +1 -0
  17. package/dist/file-transfer.d.ts +34 -0
  18. package/dist/file-transfer.js +194 -0
  19. package/dist/file-transfer.js.map +1 -0
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.js +9 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/mapi.d.ts +149 -0
  24. package/dist/mapi.js +844 -0
  25. package/dist/mapi.js.map +1 -0
  26. package/dist/monetize.d.ts +2 -0
  27. package/dist/monetize.js +57 -0
  28. package/dist/monetize.js.map +1 -0
  29. package/dist/tsconfig.tsbuildinfo +1 -0
  30. package/package.json +7 -2
  31. package/src/mapi.ts +104 -114
  32. package/.github/workflows/Linux.yml +0 -45
  33. package/.github/workflows/docs.yml +0 -79
  34. package/.github/workflows/macos.yml +0 -43
  35. package/.github/workflows/monetdb-versions.yml +0 -43
  36. package/docs/components/alert.tsx +0 -10
  37. package/docs/components/info.tsx +0 -6
  38. package/docs/next.config.js +0 -24
  39. package/docs/package-lock.json +0 -5069
  40. package/docs/package.json +0 -22
  41. package/docs/pages/_app.js +0 -9
  42. package/docs/pages/_meta.json +0 -18
  43. package/docs/pages/apis/_meta.json +0 -4
  44. package/docs/pages/apis/connection.mdx +0 -60
  45. package/docs/pages/apis/result.mdx +0 -39
  46. package/docs/pages/filetransfer.mdx +0 -43
  47. package/docs/pages/index.mdx +0 -27
  48. package/docs/pages/prepstmt.mdx +0 -13
  49. package/docs/pages/result.mdx +0 -41
  50. package/docs/theme.config.js +0 -35
  51. package/docs/v0/README.v0.md +0 -138
  52. package/docs/v1/MapiConnection.md +0 -53
  53. package/docs/v1/README.md +0 -532
  54. package/docs/v1/v1-notes.md +0 -173
  55. package/test/connection.ts +0 -43
  56. package/test/exec-queries.ts +0 -112
  57. package/test/filetransfer.ts +0 -94
  58. package/test/prepare-statement.ts +0 -27
  59. package/test/query-stream.ts +0 -41
  60. package/test/tmp/.gitignore +0 -4
  61. package/tsconfig.json +0 -24
package/docs/package.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "name": "docs",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "next.config.js",
6
- "scripts": {
7
- "start": "next dev",
8
- "build": "next build"
9
- },
10
- "keywords": [],
11
- "author": {
12
- "name": "Svetlin Stalinov",
13
- "email": "svetlin.stalinov@monetdbsolutions.com"
14
- },
15
- "dependencies": {
16
- "next": "^14.0.1",
17
- "nextra": "^2.13.2",
18
- "nextra-theme-docs": "^2.13.2",
19
- "react": "^18.2.0",
20
- "react-dom": "^18.2.0"
21
- }
22
- }
@@ -1,9 +0,0 @@
1
- import 'nextra-theme-docs/style.css'
2
-
3
- export default function Nextra({ Component, pageProps }) {
4
- return (
5
- <>
6
- <Component {...pageProps} />
7
- </>
8
- )
9
- }
@@ -1,18 +0,0 @@
1
- {
2
- "index": "Getting Started",
3
- "filetransfer": "File Transfer",
4
- "result": "Query result",
5
- "prepstmt": "Prepare Statement",
6
- "apis": "API",
7
- "versions": {
8
- "title": "archive",
9
- "type": "menu",
10
- "items": {
11
- "v0": {
12
- "title": "v0",
13
- "href": "https://github.com/MonetDB/monetdb-nodejs/blob/master/docs/v0"},
14
- "v1": {
15
- "title": "v1",
16
- "href": "https://github.com/MonetDB/monetdb-nodejs/blob/master/docs/v1"}}
17
- }
18
- }
@@ -1,4 +0,0 @@
1
- {
2
- "connection": "Connecting",
3
- "result": "QueryResult"
4
- }
@@ -1,60 +0,0 @@
1
- ## Connecting
2
- ```ts
3
- const conn = new Connection(config: MapiConfig | string);
4
- ```
5
- , all the optional fields get default values if not specified.
6
- ### Using configuration options
7
- ```ts
8
- interface MapiConfig {
9
- database: string;
10
- username?: string;
11
- password?: string;
12
- language?: MAPI_LANGUAGE; // sql
13
- host?: string;
14
- port?: number;
15
- timeout?: number;
16
- autoCommit?: boolean;
17
- replySize?: number;
18
- }
19
-
20
- const defaults = {
21
- host: process.env.MAPI_HOST || 'localhost',
22
- port: process.env.MAPI_PORT || 50000,
23
- username: process.env.MAPI_USER || 'monetdb',
24
- password: process.env.MAPI_PASSWORD || 'monetdb',
25
- database: process.env.MAPI_DATABASE,
26
- autoCommit: false,
27
- replySize: -1,
28
- };
29
-
30
- const config: MapiConfig = {
31
- ...defaults
32
- database: 'test',
33
- }
34
- const conn = new Connection(config);
35
- ```
36
- ### Using URL
37
- ```ts
38
- const conn = new Connection('mapi:monetdb://<username>:<password>@<hostname>:<port>/<database>');
39
- ```
40
- ### Connection object
41
- ```ts
42
- declare class Connection extends EventEmitter {
43
- autoCommit?: boolean;
44
- replySize?: number;
45
- sizeHeader?: boolean;
46
- mapi: MapiConnection;
47
- constructor(params: MapiConfig | MAPI_URI);
48
- connect(callback?: ConnectCallback): Promise<boolean>;
49
- close(): Promise<boolean>;
50
- commit(): Promise<any>;
51
- private command;
52
- execute(sql: string, stream?: boolean): Promise<QueryResult|QueryStream>;
53
- prepare(sql: string): Promise<PrepareStatement>;
54
- setAutocommit(v: boolean): Promise<boolean>;
55
- setReplySize(v: number): Promise<number>;
56
- setSizeHeader(v: boolean): Promise<boolean>;
57
- setTimezone(sec: number): Promise<any>;
58
- rollback(): Promise<any>;
59
- }
60
- ```
@@ -1,39 +0,0 @@
1
- ## Query Result
2
- The result object returned from sucessful query execution.
3
- ```ts
4
- type QueryResult = {
5
- id?: number;
6
- type?: string;
7
- queryId?: number;
8
- rowCnt?: number;
9
- affectedRows?: number;
10
- columnCnt?: number;
11
- queryTime?: number;
12
- sqlOptimizerTime?: number;
13
- malOptimizerTime?: number;
14
- columns?: Column[];
15
- headers?: ResponseHeaders;
16
- data?: any[];
17
- };
18
- import { Connection } from 'monetdb';
19
- const conn = new Connection({database: 'test'});
20
- const ready = await conn.connect();
21
- const res: QueryResult = await conn.execute('select 1 as one, 2 as two');
22
- console.log(res);
23
- // {
24
- // type: '&1',
25
- // id: 1,
26
- // rowCnt: 1,
27
- // columnCnt: 2,
28
- // queryId: 37,
29
- // queryTime: 311,
30
- // malOptimizerTime: 129,
31
- // sqlOptimizerTime: 22,
32
- // columns: [
33
- // { table: '.', name: 'one', type: 'tinyint', index: 0 },
34
- // { table: '.', name: 'two', type: 'tinyint', index: 1 }
35
- // ],
36
- // data: [ [ 1, 2 ] ]
37
- // }
38
-
39
- ```
@@ -1,43 +0,0 @@
1
- ## File Transfer
2
- MonetDB supports the non-standard `COPY INTO` statement to load a CSV-like
3
- text file into a table or to dump a table into a text file. This statement has an
4
- optional modifier `ON CLIENT` to indicate that the server should not
5
- try to open the file on the server side but instead ask the client to open it
6
- on its behalf.
7
-
8
- For example::
9
- ```sql
10
- COPY INTO mytable FROM 'data.csv' ON CLIENT
11
- USING DELIMITERS ',', E'\n', '"';
12
- ```
13
- For security reason `monetdb-nodejs` enforces files to be realtive to the current
14
- working directory of the Node.js process.
15
- ## Skip rows and early cancellation
16
- MonetDB's `COPY INTO` statement allows you to skip, for example, the first
17
- line in a file using the modifier `OFFSET 2`, and load `n` records from the file using
18
- `RECORDS` modifier.
19
- ```sql
20
- COPY 100 RECORDS OFFSET 2 INTO mytable FROM 'data.csv' ON CLIENT
21
- ```
22
- , for detailed documentation on `COPY INTO` statement please vist [MonetDB documentation](https://www.monetdb.org/documentation-Jun2023/user-guide/sql-manual/data-loading/)
23
- ## Example
24
- Assume `data.csv` with the following content
25
- ```bash
26
- cat<<EOF>data.csv
27
- 1|one
28
- 2|two
29
- 3|three
30
- EOF
31
- ```
32
- , then load that into MonetDB
33
- ```ts
34
- import {Connection} from 'monetdb';
35
-
36
- const conn = new Connection({database: 'test'});
37
- const ready = await conn.connect();
38
- await conn.execute('create table foo(i int, a varchar(10))');
39
- let res = await conn.execute(`copy into foo from \'data.csv\' on client`);
40
- res = await conn.execute('select * from foo order by i');
41
- console.log(res.data);
42
- // [[1, 'one'], [2, 'two'], [3, 'three']]
43
- ```
@@ -1,27 +0,0 @@
1
- ---
2
- title: Getting Started
3
- slug: /
4
- ---
5
-
6
- ## Installation
7
-
8
- ```bash
9
- $ npm install monetdb
10
- ```
11
-
12
- ## Usage
13
- The simplest way to connect is to use default connection options and pass only the database name.
14
-
15
- ```js
16
- import { Connection} from 'monetdb'
17
-
18
- const opt = {database: 'test'}
19
-
20
- const conn = new Connection(opt)
21
- const ready = await conn.connect();
22
- const res = conn.exec('select 42');
23
- console.log(res.data)
24
- await conn.close();
25
- ```
26
- , see [connection api](/apis/connection) for more details.
27
-
@@ -1,13 +0,0 @@
1
- ## Prepare Statement
2
- The PREPARE statement compiles an SQL statement into its execution plan on the server. This is useful for statements which need to be executed many times but with different values each time, such as an INSERT or UPDATE or SELECT query.
3
- ```ts
4
- const ready = await conn.connect();
5
- let res = await conn.execute('create table foo(a int, b boolean, c string, d date, f decimal)');
6
- const prepStmt = await conn.prepare('insert into foo values (?, ?, ?, ?, ?)');
7
- res = await prepStmt.execute(1, true, 'first', '2022-12-12', 1.11);
8
- res = await prepStmt.execute(2, false, 'second', '2022-12-12', 2.22);
9
- res = await prepStmt.execute(3, true, 'third', '2022-12-12', 3.33);
10
- await prepStmt.release();
11
- ```
12
- For more information on prepare statement please visit [MonetDB documentation](https://www.monetdb.org/documentation-Jun2023/user-guide/sql-manual/data-manipulation/prepare-statement/).
13
-
@@ -1,41 +0,0 @@
1
- ## Query result size
2
- Query result size can be set with `replySize` `Connection` option. It defines the number of data rows returned in the initial response.
3
- By default this options is set to `-1`, which means fetch all the data. If `replySize` is set to any positive number, only that many
4
- data rows will be fetched, while the rest will stay cached at the server. The `replySize` can be set initially when connection is created, or by invoking `setReplySize` method on the `Connection` object.
5
- ```ts
6
- // set replySize to 100
7
- const conn = new Connection({database: 'test', replySize: 100});
8
- await conn.connect();
9
- let res = await conn.execute("select * from generate_series(1, 1001)");
10
- console.log(res.data.length);
11
- // 100
12
- await conn.setReplySize(-1); // back to default
13
- res = await conn.execute("select * from generate_series(1, 1001)");
14
- console.log(res.data.length);
15
- // 1000
16
- ```
17
- ## Streaming query result
18
- When query result is quite large it's often useful to start process the data chunks as soon as they are available
19
- on the client. This can be achieved by invoking `execute` method on the `Connection` object with `stream=true`.
20
- ```ts
21
- // execute(sql: string, stream?: boolean): Promise<any>;
22
- const ready = await conn.connect();
23
- const stream: QueryStream = await conn.execute('select * from generate_series(1, 10000)', true);
24
- const colInfo = [];
25
- const data = [];
26
- stream.on('header', (cols: any[]) => {
27
- // do something with col info
28
- });
29
-
30
- stream.on('data', (tuples: any[]) => {
31
- for (let t of tuples) {
32
- data.push(t);
33
- }
34
- });
35
-
36
- stream.on('end', () => {
37
- // do something on end of streaming
38
- });
39
-
40
- await conn.close();
41
- ```
@@ -1,35 +0,0 @@
1
- // theme.config.js
2
- export default {
3
- project: {
4
- link: 'https://github.com/MonetDB/monetdb-nodejs',
5
- },
6
- docsRepositoryBase: 'https://github.com/MonetDB/monetdb-nodejs/blob/master/docs', // base URL for the docs repository
7
- darkMode: true,
8
- footer: true,
9
- navigation: {
10
- prev: true,
11
- next: true,
12
- },
13
- footer: {
14
- text: `Mozilla Public License, v.2.0 ${new Date().getFullYear()}`,
15
- },
16
- editLink: {
17
- text: 'Edit this page on GitHub',
18
- },
19
- logo: (
20
- <>
21
- <span>monetdb-nodejs</span>
22
- </>
23
- ),
24
- head: (
25
- <>
26
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
27
- <meta
28
- name="description"
29
- content="MonetDB Node.js connector"
30
- />
31
- <meta name="og:title" content="monetdb-nodejs" />
32
- <meta name="og:description" content="MonetDB Node.js driver" />
33
- </>
34
- ),
35
- }
@@ -1,138 +0,0 @@
1
- # Documentation for MonetDB NodeJS connector v0.\*
2
-
3
- > **The v0.\* version is no longer maintained. Therefore, we strongly encourage everyone using the v0.\* version to switch to the v1.\* version.**
4
- > For information on how to upgrade, see the [major changes](https://github.com/MonetDB/monetdb-nodejs#changes), and the [backward compatibility](#callbackwrapper).
5
-
6
- # Installation
7
- npm install [-g] monetdb
8
-
9
- # Example usage:
10
-
11
- ```
12
- var options = {
13
- host : 'localhost',
14
- port : 50000,
15
- dbname : 'mydb',
16
- user : 'monetdb',
17
- password : 'monetdb'
18
- };
19
-
20
- var conn = require('monetdb').connect(options , function(err) {
21
- if (!err) console.log('connected');
22
- });
23
-
24
- conn.query('SELECT 1', function(err, res) {
25
- if (!err) console.log(res);
26
- });
27
-
28
- conn.query('SELECT id FROM tables WHERE name=? and readonly=?',
29
- ['connections', false], function(err, res) {
30
- if (!err) console.log(res);
31
- });
32
-
33
- conn.close();
34
- ```
35
-
36
- # API
37
-
38
- #### <a name="connect"></a>connect(options, fn)
39
- Obtain a MonetDBConnection object that tries to connect to a MonetDB server process using the provided options.
40
-
41
- - options [object]: Options to use for this connection. Possible options are:
42
- - host [string]: hostname to connect to (default: localhost)
43
- - port [integer]: port on which the MonetDB server process is listening (default: 50000)
44
- - dbname [string]: name of the database to use (default: demo)
45
- - user [string]: username to use for logging in (default: monetdb)
46
- - password [string]: password to use for logging in (default: monetdb)
47
- - language [string]: query language to use (default: sql)
48
- - debug [boolean]: whether or not to initialize the connection in debug node (default: false)
49
- - q [function]: in case you want to use promises, you should pass in the result of require('q') in here. See [Q Integration](#q) for more information on our Q integration.
50
- - fn [function]: Callback function to call whenever the connection succeeds or fails. This function receives one argument, which contains an error string on failure or null on success. Note: this function might be called multiple times when the MonetDB connection fails after it first succeeded. In that case, the callback will first be called indicating success, and later again with an error message.
51
-
52
- Returns an instance of a MonetDBConnection object. Note that thanks to a queueing system, this object can immediately receive queries when it is returned, even if the connection is not established yet.
53
-
54
- ---
55
-
56
- #### <a name="query"></a>MonetDBConnection.query(query, [params], [raw], fn)
57
- Run a query against this MonetDBConnection
58
-
59
- - query [string]: A query string in the chosen language, where values may be replaced by question marks, in which case the params array must be set (note: when the params array is given, the MonetDBConnection.prepare will be used under the hood).
60
- - params [array]: In case question marks are given for some values in the query, this array supplies the query method with the values to fill in. (default: null)
61
- - raw [boolean]: If set to true, a raw query is expected, including an initial 's' and a trailing ';'. (default: false)
62
- - fn [function]: Callback function that will be called when the query completes. It then receives two arguments:
63
- - err: Error string if an error occurred, null if the query succeeded
64
- - result: The [query result](#result)
65
-
66
- ---
67
-
68
- #### <a name="result"></a>Query result
69
- A query returns a query result object. This object has the following properties:
70
-
71
- - data [array]: When a SELECT query was done, this array contains the resulting data from the database. It is passed as an array of arrays, where every inner array represents one data tuple.
72
- - col [object]: Object that maps column names to query result indices. So if you for example did SELECT a, b FROM ... you can access b in a tuple array by issuing tuple[result.col.b], which in this case would resolve to tuple[1].
73
- - rows [integer]: The number of rows in the result set
74
- - cols [integer]: The number of columns in the result set
75
- - structure [array]: An array containing an object for every column, with information about the column (like from which table it came, what its name is etc.)
76
- - queryid [integer]: A unique identifier for this query
77
- - type: The type of the result (currently only 'table' is supported)
78
-
79
- ---
80
-
81
- #### MonetDBConnection.prepare(query, fn)
82
- Prepares a query for repeated execution.
83
-
84
- - query [string]: The query that has to be prepared. In this query, actual values can be replaced by question marks.
85
- - fn [function]: Callback function that will be called when the preparation finished. It gets passed two arguments. The first argument is an error string or null on success, the second argument is an object with the following properties:
86
- - prepare: The [query result](#result) of the prepare statement
87
- - exec: A function that you can call if you want to execute your prepared statement. It takes two parameters, the first one is an array with the query parameters and the second is a callback that gets executed when the execution of the prepared statement finishes (same as callback to [MonetDBConnection.query](#query)).
88
- - release: A function that you can call when you want to free the resources used by your prepared statement. After calling this function, calls to the exec function will fail.
89
-
90
- ---
91
-
92
- #### MonetDBConnection.close(fn)
93
- Empty the query queue and then close the connection. Note that whenever queries arrive after the close has been issued, these queries will also be processed before the connection is closed. The connection really is not closed before it encounters an empty message queue.
94
- - fn [function]: Callback function that will be called when the connection is closed. Since failure never happens, it will always be called with its first argument set to null. The second argument is never given, since there is no result associated with closing the connection.
95
-
96
-
97
-
98
- # <a name="log"></a>Query logging
99
- Every time a query result is returned from the database, the callback function *conn.log_callback*, which defaults to null, will be executed right before the query callback function is executed (conn refers to a connection object returned by the [connect function](#connect)). If you have some general behavior that you want to be executed every time a query finishes, you can set *conn.log_callback* to a function with the following signature:
100
-
101
- function(query, err, res)
102
- - query: the SQL query that lead to this result (note: if you pass a params array to the [query function](#query), multiple queries are fired to the database, hence the log callback will be called multiple times)
103
- - err, res: Same as in the callback for the [query function](#query)
104
-
105
-
106
- # <a name="q"></a>Q Integration
107
- Due to the huge popularity of the [Q module for NodeJS](https://www.npmjs.org/package/q), we decided to add native Q support, that wraps our API in a promise returning API that exists on top of the original API, so you can use both interchangeably.
108
-
109
- We did not want to add Q as a dependency of our module and therefore, if you want to use the promise returning functions, you have to pass in the result of require('q') to the connection options when calling the [connect function](#connect).
110
-
111
- All of the promise returning functions take the same arguments as the original functions they wrap, except for the callback argument.
112
-
113
- The promise returning functions are:
114
- - connectQ: Gets resolved with the connection object when the connection has been successfully initialized and gets rejected if the connection could not be established. Note that, since promises can by definition only be resolved once, failure of the connection after the promise has been resolved can not be detected using this function (you can detect this with the [original connect function](#connect).
115
- - queryQ
116
- - prepareQ
117
- - closeQ
118
-
119
- ### Example usage of Q integration
120
- ```
121
- var conn = null;
122
- monetdb.connectQ({dbname:"blaeu"}).then(function(c) {
123
- conn = c;
124
- return conn.queryQ("CREATE TABLE coords (x INT, y INT)").then(function() {
125
- return conn.queryQ("INSERT INTO coords VALUES (1, 1), (2, 5), (9, 1)");
126
- }).then(function() {
127
- return conn.queryQ("SELECT * FROM coords WHERE x < ? AND y < ?", [4, 5]);
128
- }).then(function(data) {
129
- console.log(data);
130
- });
131
- }).fail(function(err) {
132
- console.log("Something went wrong: "+err);
133
- }).fin(function() {
134
- conn && conn.closeQ().then(function() {
135
- console.log("Connection successfully closed!");
136
- });
137
- }).done();
138
- ```
@@ -1,53 +0,0 @@
1
- # The MapiConnection object
2
-
3
- [![Build Status](https://travis-ci.org/MonetDB/monetdb-nodejs.svg)](https://travis-ci.org/MonetDB/monetdb-nodejs)
4
- [![Coverage Status](https://coveralls.io/repos/MonetDB/monetdb-nodejs/badge.svg?branch=master&service=github)](https://coveralls.io/github/MonetDB/monetdb-nodejs?branch=master)
5
- [![npm version](https://badge.fury.io/js/monetdb.svg)](https://badge.fury.io/js/monetdb)
6
- [![Dependency Status](https://david-dm.org/MonetDB/monetdb-nodejs.svg)](https://david-dm.org/MonetDB/monetdb-nodejs)
7
-
8
- The MapiConnection object manages the socket connection to the server, and communicates over this socket.
9
- It also contains the reconnect logic.
10
-
11
- The MonetDB NodeJS module does not expose the constructor of the MapiConnection directly, since for normal usage a
12
- MapiConnection object should be managed by a [MonetDBConnection object](https://github.com/MonetDB/monetdb-nodejs#mdbconnection).
13
- You can however use a MapiConnection object directly, since every MonetDBConnection object exposes one.
14
-
15
- If you insist, you could also include src/mapi-connection.js directly into your project to be able to construct one yourself.
16
-
17
- <a name="constructor"></a>
18
- ### MapiConnection(\[options\])
19
- Construct a MapiConnection object. For the available options in the options object, [see here](https://github.com/MonetDB/monetdb-nodejs#options).
20
-
21
- **Note: As opposed to the [MonetDBConnection object](#https://github.com/MonetDB/monetdb-nodejs#mdbconnection),
22
- the options are not checked for validity on constructing a MapiConnection object. This might cause unexpected behavior,
23
- since we do not test the creation of a MapiConnection object other than by a MonetDBConnection object.**
24
-
25
- <a name="connect"></a>
26
- ### .connect()
27
- This method is documented int the [MonetDBConnection object section](https://github.com/MonetDB/monetdb-nodejs#mdbconnection_connect).
28
-
29
- <a name="request"></a>
30
- ### .request(request)
31
- Adds a Mapi request to the queue. If you want to issue an SQL query this way, you should pack it in between an 's' and a ';':
32
-
33
- ```javascript
34
- mapiConn.request('sSELECT * FROM foo;');
35
- ```
36
-
37
- Returns a promise that resolves with a [query result](https://github.com/MonetDB/monetdb-nodejs#mdbconnection_query), or
38
- gets rejected with a proper error message.
39
-
40
- <a name="getstate"></a>
41
- ### .getState()
42
- This method is documented in the [MonetDBConnection object section](https://github.com/MonetDB/monetdb-nodejs#mdbconnection_getstate).
43
-
44
-
45
- <a name="close"></a>
46
- ### .close()
47
- This method is documented in the [MonetDBConnection object section](https://github.com/MonetDB/monetdb-nodejs#mdbconnection_close).
48
-
49
-
50
- <a name="destroy"></a>
51
- ### .destroy(\[msg\])
52
- This method is documented in the [MonetDBConnection object section](https://github.com/MonetDB/monetdb-nodejs#mdbconnection_destroy).
53
-