Socket
Socket
Sign inDemoInstall

slonik

Package Overview
Dependencies
Maintainers
1
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slonik - npm Package Compare versions

Comparing version 14.10.0 to 14.11.0

dist/connectionMethods/nestedTransaction.js

6

dist/binders/bindPoolConnection.js

@@ -12,6 +12,2 @@ "use strict";

var _createPoolTransaction = _interopRequireDefault(require("../factories/createPoolTransaction"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const bindPoolConnection = (parentLog, pool, connection, clientConfiguration) => {

@@ -29,3 +25,3 @@ return {

transaction: async handler => {
return (0, _createPoolTransaction.default)(parentLog, pool, clientConfiguration, handler);
return (0, _connectionMethods.transaction)(parentLog, pool, clientConfiguration, handler);
}

@@ -32,0 +28,0 @@ };

@@ -12,3 +12,3 @@ "use strict";

const bindTransactionConnection = (parentLog, connection, clientConfiguration) => {
const bindTransactionConnection = (parentLog, connection, clientConfiguration, transactionDepth) => {
return {

@@ -23,3 +23,6 @@ any: (0, _utilities.mapTaggedTemplateLiteralInvocation)(_connectionMethods.any.bind(null, parentLog, connection, clientConfiguration)),

oneFirst: (0, _utilities.mapTaggedTemplateLiteralInvocation)(_connectionMethods.oneFirst.bind(null, parentLog, connection, clientConfiguration)),
query: (0, _utilities.mapTaggedTemplateLiteralInvocation)(_connectionMethods.query.bind(null, parentLog, connection, clientConfiguration))
query: (0, _utilities.mapTaggedTemplateLiteralInvocation)(_connectionMethods.query.bind(null, parentLog, connection, clientConfiguration)),
transaction: handler => {
return (0, _connectionMethods.nestedTransaction)(parentLog, connection, clientConfiguration, handler, transactionDepth);
}
};

@@ -26,0 +29,0 @@ };

@@ -42,2 +42,8 @@ "use strict";

});
Object.defineProperty(exports, "nestedTransaction", {
enumerable: true,
get: function () {
return _nestedTransaction.default;
}
});
Object.defineProperty(exports, "one", {

@@ -80,2 +86,4 @@ enumerable: true,

var _nestedTransaction = _interopRequireDefault(require("./nestedTransaction"));
var _one = _interopRequireDefault(require("./one"));

@@ -82,0 +90,0 @@

@@ -23,3 +23,3 @@ "use strict";

try {
const result = await handler((0, _binders.bindTransactionConnection)(log, connection, clientConfiguration));
const result = await handler((0, _binders.bindTransactionConnection)(log, connection, clientConfiguration, 0));
await connection.query('COMMIT');

@@ -26,0 +26,0 @@ return result;

@@ -32,3 +32,3 @@ {

"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/core": "^7.3.3",
"@babel/plugin-transform-flow-strip-types": "^7.2.3",

@@ -38,6 +38,6 @@ "@babel/preset-env": "^7.3.1",

"ava": "^1.2.1",
"babel-plugin-istanbul": "^5.1.0",
"babel-plugin-istanbul": "^5.1.1",
"babel-plugin-transform-export-default-name": "^2.0.4",
"coveralls": "^3.0.2",
"eslint": "^5.13.0",
"eslint": "5.13.0",
"eslint-config-canonical": "^16.1.0",

@@ -48,3 +48,3 @@ "flow-bin": "^0.93.0",

"husky": "^1.3.1",
"nyc": "^13.2.0",
"nyc": "^13.3.0",
"semantic-release": "^15.13.3",

@@ -100,3 +100,3 @@ "sinon": "^7.2.3"

},
"version": "14.10.0"
"version": "14.11.0"
}

@@ -31,2 +31,3 @@ <a name="slonik"></a>

* [Safe value interpolation](#protecting-against-unsafe-value-interpolation).
* [Transaction nesting](#transaction-nesting).
* Detail [logging](#slonik-debugging).

@@ -39,2 +40,76 @@ * [Asynchronous stack trace resolution](#log-stack-trace).

<a name="slonik-contents"></a>
## Contents
* [Slonik](#slonik)
* [Principles](#slonik-principles)
* [Features](#slonik-features)
* [Contents](#slonik-contents)
* [About Slonik](#slonik-about-slonik)
* [Battle-Tested](#slonik-about-slonik-battle-tested)
* [Origin of the name](#slonik-about-slonik-origin-of-the-name)
* [Repeating code patterns and type safety](#slonik-about-slonik-repeating-code-patterns-and-type-safety)
* [Protecting against unsafe connection handling](#slonik-about-slonik-protecting-against-unsafe-connection-handling)
* [Protecting against unsafe transaction handling](#slonik-about-slonik-protecting-against-unsafe-transaction-handling)
* [Protecting against unsafe value interpolation](#slonik-about-slonik-protecting-against-unsafe-value-interpolation)
* [Documentation](#slonik-documentation)
* [Usage](#slonik-usage)
* [Install](#slonik-usage-install)
* [Create connection](#slonik-usage-create-connection)
* [API](#slonik-usage-api)
* [Default configuration](#slonik-usage-default-configuration)
* [Checking out a client from the connection pool](#slonik-usage-checking-out-a-client-from-the-connection-pool)
* [How are they different?](#slonik-how-are-they-different)
* [`pg` vs `slonik`](#slonik-how-are-they-different-pg-vs-slonik)
* [`pg-promise` vs `slonik`](#slonik-how-are-they-different-pg-promise-vs-slonik)
* [Interceptors](#slonik-interceptors)
* [Interceptor methods](#slonik-interceptors-interceptor-methods)
* [Built-in interceptors](#slonik-built-in-interceptors)
* [Field name transformation interceptor](#slonik-built-in-interceptors-field-name-transformation-interceptor)
* [Query normalization interceptor](#slonik-built-in-interceptors-query-normalization-interceptor)
* [Benchmarking interceptor](#slonik-built-in-interceptors-benchmarking-interceptor)
* [Recipes](#slonik-recipes)
* [Inserting large number of rows](#slonik-recipes-inserting-large-number-of-rows)
* [Logging `auto_explain`](#slonik-recipes-logging-auto_explain)
* [Using `sql.raw` to generate dynamic queries](#slonik-recipes-using-sql-raw-to-generate-dynamic-queries)
* [Routing queries to different connections](#slonik-recipes-routing-queries-to-different-connections)
* [Conventions](#slonik-conventions)
* [No multiline values](#slonik-conventions-no-multiline-values)
* [Value placeholders](#slonik-value-placeholders)
* [Tagged template literals](#slonik-value-placeholders-tagged-template-literals)
* [Manually constructing the query](#slonik-value-placeholders-manually-constructing-the-query)
* [Nesting `sql`](#slonik-value-placeholders-nesting-sql)
* [`sql.valueList`](#slonik-value-placeholders-sql-valuelist)
* [`sql.tuple`](#slonik-value-placeholders-sql-tuple)
* [`sql.tupleList`](#slonik-value-placeholders-sql-tuplelist)
* [`sql.unnset`](#slonik-value-placeholders-sql-unnset)
* [`sql.identifier`](#slonik-value-placeholders-sql-identifier)
* [`sql.raw`](#slonik-value-placeholders-sql-raw)
* [Query methods](#slonik-query-methods)
* [`any`](#slonik-query-methods-any)
* [`anyFirst`](#slonik-query-methods-anyfirst)
* [`insert`](#slonik-query-methods-insert)
* [`many`](#slonik-query-methods-many)
* [`manyFirst`](#slonik-query-methods-manyfirst)
* [`maybeOne`](#slonik-query-methods-maybeone)
* [`maybeOneFirst`](#slonik-query-methods-maybeonefirst)
* [`one`](#slonik-query-methods-one)
* [`oneFirst`](#slonik-query-methods-onefirst)
* [`query`](#slonik-query-methods-query)
* [`transaction`](#slonik-query-methods-transaction)
* [Error handling](#slonik-error-handling)
* [Handling `NotFoundError`](#slonik-error-handling-handling-notfounderror)
* [Handling `DataIntegrityError`](#slonik-error-handling-handling-dataintegrityerror)
* [Handling `NotNullIntegrityConstraintViolationError`](#slonik-error-handling-handling-notnullintegrityconstraintviolationerror)
* [Handling `ForeignKeyIntegrityConstraintViolationError`](#slonik-error-handling-handling-foreignkeyintegrityconstraintviolationerror)
* [Handling `UniqueIntegrityConstraintViolationError`](#slonik-error-handling-handling-uniqueintegrityconstraintviolationerror)
* [Handling `CheckIntegrityConstraintViolationError`](#slonik-error-handling-handling-checkintegrityconstraintviolationerror)
* [Types](#slonik-types)
* [Debugging](#slonik-debugging)
* [Logging](#slonik-debugging-logging)
* [Log stack trace](#slonik-debugging-log-stack-trace)
* [Syntax highlighting](#slonik-syntax-highlighting)
* [Atom](#slonik-syntax-highlighting-atom)
<a name="slonik-about-slonik"></a>

@@ -269,3 +344,3 @@ ## About Slonik

) foo(a, b, c)
WHERE foo.b IN (${sql.tuple(['c1', 'a2'])})
WHERE foo.b IN (${sql.valueList(['c1', 'a2'])})
`);

@@ -307,69 +382,2 @@

* [Slonik](#slonik)
* [Principles](#slonik-principles)
* [Features](#slonik-features)
* [About Slonik](#slonik-about-slonik)
* [Battle-Tested](#slonik-about-slonik-battle-tested)
* [Origin of the name](#slonik-about-slonik-origin-of-the-name)
* [Repeating code patterns and type safety](#slonik-about-slonik-repeating-code-patterns-and-type-safety)
* [Protecting against unsafe connection handling](#slonik-about-slonik-protecting-against-unsafe-connection-handling)
* [Protecting against unsafe transaction handling](#slonik-about-slonik-protecting-against-unsafe-transaction-handling)
* [Protecting against unsafe value interpolation](#slonik-about-slonik-protecting-against-unsafe-value-interpolation)
* [Documentation](#slonik-documentation)
* [Usage](#slonik-usage)
* [Install](#slonik-usage-install)
* [Create connection](#slonik-usage-create-connection)
* [API](#slonik-usage-api)
* [Default configuration](#slonik-usage-default-configuration)
* [Checking out a client from the connection pool](#slonik-usage-checking-out-a-client-from-the-connection-pool)
* [Interceptors](#slonik-interceptors)
* [Interceptor methods](#slonik-interceptors-interceptor-methods)
* [Built-in interceptors](#slonik-built-in-interceptors)
* [Field name transformation interceptor](#slonik-built-in-interceptors-field-name-transformation-interceptor)
* [Query normalization interceptor](#slonik-built-in-interceptors-query-normalization-interceptor)
* [Benchmarking interceptor](#slonik-built-in-interceptors-benchmarking-interceptor)
* [Recipes](#slonik-recipes)
* [Inserting large number of rows](#slonik-recipes-inserting-large-number-of-rows)
* [Logging `auto_explain`](#slonik-recipes-logging-auto_explain)
* [Using `sql.raw` to generate dynamic queries](#slonik-recipes-using-sql-raw-to-generate-dynamic-queries)
* [Routing queries to different connections](#slonik-recipes-routing-queries-to-different-connections)
* [Conventions](#slonik-conventions)
* [No multiline values](#slonik-conventions-no-multiline-values)
* [Value placeholders](#slonik-value-placeholders)
* [Tagged template literals](#slonik-value-placeholders-tagged-template-literals)
* [Manually constructing the query](#slonik-value-placeholders-manually-constructing-the-query)
* [Nesting `sql`](#slonik-value-placeholders-nesting-sql)
* [`sql.valueList`](#slonik-value-placeholders-sql-valuelist)
* [`sql.tuple`](#slonik-value-placeholders-sql-tuple)
* [`sql.tupleList`](#slonik-value-placeholders-sql-tuplelist)
* [`sql.unnset`](#slonik-value-placeholders-sql-unnset)
* [`sql.identifier`](#slonik-value-placeholders-sql-identifier)
* [`sql.raw`](#slonik-value-placeholders-sql-raw)
* [Query methods](#slonik-query-methods)
* [`any`](#slonik-query-methods-any)
* [`anyFirst`](#slonik-query-methods-anyfirst)
* [`insert`](#slonik-query-methods-insert)
* [`many`](#slonik-query-methods-many)
* [`manyFirst`](#slonik-query-methods-manyfirst)
* [`maybeOne`](#slonik-query-methods-maybeone)
* [`maybeOneFirst`](#slonik-query-methods-maybeonefirst)
* [`one`](#slonik-query-methods-one)
* [`oneFirst`](#slonik-query-methods-onefirst)
* [`query`](#slonik-query-methods-query)
* [`transaction`](#slonik-query-methods-transaction)
* [Error handling](#slonik-error-handling)
* [Handling `NotFoundError`](#slonik-error-handling-handling-notfounderror)
* [Handling `DataIntegrityError`](#slonik-error-handling-handling-dataintegrityerror)
* [Handling `NotNullIntegrityConstraintViolationError`](#slonik-error-handling-handling-notnullintegrityconstraintviolationerror)
* [Handling `ForeignKeyIntegrityConstraintViolationError`](#slonik-error-handling-handling-foreignkeyintegrityconstraintviolationerror)
* [Handling `UniqueIntegrityConstraintViolationError`](#slonik-error-handling-handling-uniqueintegrityconstraintviolationerror)
* [Handling `CheckIntegrityConstraintViolationError`](#slonik-error-handling-handling-checkintegrityconstraintviolationerror)
* [Types](#slonik-types)
* [Debugging](#slonik-debugging)
* [Logging](#slonik-debugging-logging)
* [Log stack trace](#slonik-debugging-log-stack-trace)
* [Syntax highlighting](#slonik-syntax-highlighting)
* [Atom](#slonik-syntax-highlighting-atom)
<a name="slonik-usage"></a>

@@ -479,3 +487,3 @@ ## Usage

createPool('postgres://', {
interceptos: []
interceptors: []
});

@@ -513,3 +521,42 @@

<a name="slonik-how-are-they-different"></a>
## How are they different?
<a name="slonik-how-are-they-different-pg-vs-slonik"></a>
### <code>pg</code> vs <code>slonik</code>
[`pg`](https://github.com/brianc/node-postgres) is built intentionally to provide unopinionated, minimal abstraction and encourages use of other modules to implement convenience methods.
Slonik is built on top of `pg` and it provides convenience methods for [building queries](#value-placeholders) and [querying data](#slonik-query-methods).
Work on `pg` began on [Tue Sep 28 22:09:21 2010](https://github.com/brianc/node-postgres/commit/cf637b08b79ef93d9a8b9dd2d25858aa7e9f9bdc). It is authored by [Brian Carlson](https://github.com/brianc).
<a name="slonik-how-are-they-different-pg-promise-vs-slonik"></a>
### <code>pg-promise</code> vs <code>slonik</code>
As the name suggests, [`pg-promise`](https://github.com/vitaly-t/pg-promise) was originally built to enable use of `pg` module with promises (at the time, `pg` only supported Continuation Passing Style (CPS), i.e. callbacks). Since then `pg-promise` added features for connection/ transaction handling, a powerful query-formatting engine and a declarative approach to handling query results.
The primary difference between Slonik and `pg-promise`:
* Slonik does not allow to execute raw text queries. Slonik queries can only be constructed using [`sql` tagged template literals](#slonik-value-placeholders-tagged-template-literals). This design [protects against unsafe value interpolation](#protecting-against-unsafe-value-interpolation).
* Slonik implements [interceptor API](#slonik-interceptors) (middleware). Middlewares allow to modify connection handling, override queries and modify the query results. Slonik comes with a set of built-in middlewares that provide [field name transformation](#field-name-transformation-interceptor), [query normalization](#query-normalization-interceptor) and [benchmarking](#benchmarking-interceptor).
* Slonik implements [transaction nesting](#transaction-nesting).
Other differences are primarily in how the equivalent features are imlemented, e.g.
|`pg-promise`|Slonik|
|---|---|
|[Custom type formatting](https://github.com/vitaly-t/pg-promise#custom-type-formatting).|Not available in Slonik. The current proposal is to create an interceptor that would have access to the [query fragment constructor](https://github.com/gajus/slonik/issues/21).|
|[formatting filters](https://github.com/vitaly-t/pg-promise#nested-named-parameters)|Slonik tagged template [value expressions](https://github.com/gajus/slonik#slonik-value-placeholders) to construct queyr fragments and bind parameter values.|
|[Query files](https://github.com/vitaly-t/pg-promise#query-files).|Use `sql.raw` to [load query files](https://github.com/gajus/slonik/issues/28).|
|[SQL names](https://github.com/vitaly-t/pg-promise#sql-names)|SQL names were [removed](https://github.com/gajus/slonik/commit/f155b5c477b8145129be400dc3f69b7b7ee6af8c) from Slonik to encourage use of `sql` tagged template literals as a safer alternative. If you have a use case for named literals, contribute a description of your use case to [this issue](https://github.com/gajus/slonik/issues/29).|
|[Tasks](https://github.com/vitaly-t/pg-promise#tasks).|Use [`pool.connect`](https://github.com/gajus/slonik#slonik-usage-create-connection).|
|Configurable transactions|Not available in Slonik. Track [this issue](https://github.com/gajus/slonik/issues/30).|
|Events.|Use [interceptors](https://github.com/gajus/slonik#slonik-interceptors).|
When weighting which abstraction to use, it would be unfair not to consider that `pg-promise` is a mature project with dozens of contributors. Meanwhile, Slonik is a young project (started in March 2017) that until recently was developed without active community input. However, if you do support the unique features that Slonik adds, the opinionated API design, and are not afraid of adopting a technology in its young days, then I warmly invite you to addopt Slonik and become a contributor to what I intend to make the standard PostgreSQL client in the Node.js community.
Work on `pg-promise` began [Wed Mar 4 02:00:34 2015](https://github.com/vitaly-t/pg-promise/commit/78fb80f638e7f28b301f75576701536d6b638f31). It is authored by [Vitaly Tomilov](https://github.com/vitaly-t).
<a name="slonik-interceptors"></a>

@@ -848,5 +895,5 @@ ## Interceptors

[
'integer',
'integer',
'integer'
'int4',
'int4',
'int4'
]

@@ -862,3 +909,3 @@ )}

{
sql: 'INSERT INTO (foo, bar, baz) SELECT * FROM unnest($1::integer[], $2::integer[], $2::integer[])',
sql: 'INSERT INTO (foo, bar, baz) SELECT * FROM unnest($1::int4[], $2::int4[], $2::int4[])',
values: [

@@ -1048,3 +1095,3 @@ [

// This query will use `postgres://slave` connection..
// This query will use `postgres://slave` connection.
masterPool.query(sql`SELECT 1`);

@@ -1290,3 +1337,3 @@

[
'integer',
'int4',
'text'

@@ -1303,3 +1350,3 @@ ]

{
sql: 'SELECT bar, baz FROM unnest($1::integer[], $2::text[]) AS foo(bar, baz)',
sql: 'SELECT bar, baz FROM unnest($1::int4[], $2::text[]) AS foo(bar, baz)',
values: [

@@ -1565,3 +1612,3 @@ [

await transactionConnection.query(sql`INSERT INTO foo (bar) VALUES ('baz')`);
await transactionConnection.query(sql`INSERT INTO qux (quux) VALUES ('quuz')`);
await transactionConnection.query(sql`INSERT INTO qux (quux) VALUES ('corge')`);

@@ -1575,3 +1622,95 @@ return 'FOO';

<a name="slonik-query-methods-transaction-transaction-nesting"></a>
#### Transaction nesting
Slonik uses [`SAVEPOINT`](https://www.postgresql.org/docs/current/sql-savepoint.html) to automatically nest transactions, e.g.
```js
await connection.transaction(async (t1) => {
await t1.query(sql`INSERT INTO foo (bar) VALUES ('baz')`);
return t1.transaction((t2) => {
return t2.query(sql`INSERT INTO qux (quux) VALUES ('corge')`);
});
});
```
is equivalent to:
```sql
START TRANSACTION;
INSERT INTO foo (bar) VALUES ('baz');
SAVEPOINT slonik_savepoint_1;
INSERT INTO qux (quux) VALUES ('corge');
COMMIT;
```
Slonik automatically rollsback to the last savepoint if a query belonging to a transaction results in an error, e.g.
```js
await connection.transaction(async (t1) => {
await t1.query(sql`INSERT INTO foo (bar) VALUES ('baz')`);
try {
await t1.transaction(async (t2) => {
await t2.query(sql`INSERT INTO qux (quux) VALUES ('corge')`);
return Promise.reject(new Error('foo'));
});
} catch (error) {
}
});
```
is equivalent to:
```sql
START TRANSACTION;
INSERT INTO foo (bar) VALUES ('baz');
SAVEPOINT slonik_savepoint_1;
INSERT INTO qux (quux) VALUES ('corge');
ROLLBACK TO SAVEPOINT slonik_savepoint_1;
COMMIT;
```
If error is unhandled, then the entire transaction is rolledback, e.g.
```js
await connection.transaction(async (t1) => {
await t1.query(sql`INSERT INTO foo (bar) VALUES ('baz')`);
await t1.transaction(async (t2) => {
await t2.query(sql`INSERT INTO qux (quux) VALUES ('corge')`);
await t1.transaction(async (t3) => {
await t3.query(sql`INSERT INTO uier (grault) VALUES ('garply')`);
return Promise.reject(new Error('foo'));
});
});
});
```
is equivalent to:
```sql
START TRANSACTION;
INSERT INTO foo (bar) VALUES ('baz');
SAVEPOINT slonik_savepoint_1;
INSERT INTO qux (quux) VALUES ('corge');
SAVEPOINT slonik_savepoint_2;
INSERT INTO uier (grault) VALUES ('garply');
ROLLBACK TO SAVEPOINT slonik_savepoint_2;
ROLLBACK TO SAVEPOINT slonik_savepoint_1;
ROLLBACK;
```
<a name="slonik-error-handling"></a>

@@ -1578,0 +1717,0 @@ ## Error handling

@@ -23,5 +23,5 @@ // @flow

oneFirst,
query
query,
transaction
} from '../connectionMethods';
import createPoolTransaction from '../factories/createPoolTransaction';

@@ -45,5 +45,5 @@ export default (

transaction: async (handler: TransactionFunctionType) => {
return createPoolTransaction(parentLog, pool, clientConfiguration, handler);
return transaction(parentLog, pool, clientConfiguration, handler);
}
};
};

@@ -13,2 +13,3 @@ // @flow

maybeOneFirst,
nestedTransaction,
one,

@@ -22,3 +23,4 @@ oneFirst,

InternalDatabaseConnectionType,
LoggerType
LoggerType,
TransactionFunctionType
} from '../types';

@@ -29,3 +31,4 @@

connection: InternalDatabaseConnectionType,
clientConfiguration: ClientConfigurationType
clientConfiguration: ClientConfigurationType,
transactionDepth: number
): DatabaseTransactionConnectionType => {

@@ -41,4 +44,7 @@ return {

oneFirst: mapTaggedTemplateLiteralInvocation(oneFirst.bind(null, parentLog, connection, clientConfiguration)),
query: mapTaggedTemplateLiteralInvocation(query.bind(null, parentLog, connection, clientConfiguration))
query: mapTaggedTemplateLiteralInvocation(query.bind(null, parentLog, connection, clientConfiguration)),
transaction: (handler: TransactionFunctionType) => {
return nestedTransaction(parentLog, connection, clientConfiguration, handler, transactionDepth);
}
};
};

@@ -9,2 +9,3 @@ // @flow

export {default as maybeOneFirst} from './maybeOneFirst';
export {default as nestedTransaction} from './nestedTransaction';
export {default as one} from './one';

@@ -11,0 +12,0 @@ export {default as oneFirst} from './oneFirst';

@@ -22,3 +22,3 @@ // @flow

try {
const result = await handler(bindTransactionConnection(log, connection, clientConfiguration));
const result = await handler(bindTransactionConnection(log, connection, clientConfiguration, 0));

@@ -25,0 +25,0 @@ await connection.query('COMMIT');

@@ -80,3 +80,4 @@ // @flow

export type DatabaseTransactionConnectionType = {|
...CommonQueryMethodsType
...CommonQueryMethodsType,
+transaction: (handler: TransactionFunctionType) => Promise<*>
|};

@@ -286,2 +287,10 @@

export type InternalNestedTransactionFunctionType = (
log: LoggerType,
connection: InternalDatabaseConnectionType,
clientConfiguration: ClientConfigurationType,
handler: TransactionFunctionType,
transactionDepth: number
) => Promise<*>;
type QueryMethodType<R> = (

@@ -288,0 +297,0 @@ sql: TaggedTemplateLiteralInvocationType,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc