forked from typeorm/typeorm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SOA-589] feat(app): Add Session Pool Options to the Spanner connecti…
…on (#11) * Add Session Pool Options to the Spanner connection * One formatting too much
- Loading branch information
Showing
5 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Spanner specific SessionPool options | ||
* more: https://github.com/ko3a4ok/nodejs-spanner/blob/aa8e8becf74d41d0de68253c17ebab188b5c7620/src/session-pool.ts#L149 | ||
*/ | ||
export interface SpannerSessionPoolOptions { | ||
acquireTimeout?: number; | ||
concurrency?: number; | ||
fail?: boolean; | ||
idlesAfter?: number; | ||
keepAlive?: number; | ||
labels?: { [label: string]: string }; | ||
max?: number; | ||
maxIdle?: number; | ||
min?: number; | ||
/** | ||
* @deprecated. Starting from v6.5.0 the same session can be reused for | ||
* different types of transactions. | ||
*/ | ||
writes?: number; | ||
incStep?: number; | ||
databaseRole?: string | null; | ||
} | ||
|
||
/* Defaults: | ||
const DEFAULTS: SessionPoolOptions = { | ||
acquireTimeout: Infinity, | ||
concurrency: Infinity, | ||
fail: false, | ||
idlesAfter: 10, | ||
keepAlive: 30, | ||
labels: {}, | ||
max: 100, | ||
maxIdle: 1, | ||
min: 25, | ||
incStep: 25, | ||
databaseRole: null, | ||
}; | ||
*/ |