Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gajus/slonik
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9ba9fc5b9f793e146c6368973605cf5e7aa88c3e
Choose a base ref
...
head repository: gajus/slonik
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v31.0.0
Choose a head ref
  • 12 commits
  • 30 files changed
  • 3 contributors

Commits on Sep 6, 2022

  1. Copy the full SHA
    9f56a0b View commit details
  2. docs: fix typo (fixes #396)

    gajus committed Sep 6, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6d09e9e View commit details
  3. chore(deps): bump undici from 5.8.0 to 5.9.1 (#382)

    Bumps [undici](https://github.com/nodejs/undici) from 5.8.0 to 5.9.1.
    - [Release notes](https://github.com/nodejs/undici/releases)
    - [Commits](nodejs/undici@v5.8.0...v5.9.1)
    
    ---
    updated-dependencies:
    - dependency-name: undici
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Gajus Kuizinas <gajus@gajus.com>
    dependabot[bot] and gajus authored Sep 6, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9aa8880 View commit details
  4. Update VS code SQL highlighting extension (#392)

    vscode-sql-lit has support for a wider variety of SQL tagging, including sql with the new sql.type(zodType)`SELECT * FROM TABLE` syntax.
    aust1nz authored Sep 6, 2022
    Copy the full SHA
    9615201 View commit details
  5. docs: update documentation

    gajus committed Sep 6, 2022
    Copy the full SHA
    da36701 View commit details

Commits on Sep 7, 2022

  1. fix: update pg dependencies

    gajus committed Sep 7, 2022
    Copy the full SHA
    6fc9329 View commit details
  2. fix: update ts dependencies

    gajus committed Sep 7, 2022
    Copy the full SHA
    db8ccc4 View commit details
  3. Copy the full SHA
    830c618 View commit details
  4. fix: update test dependencies

    gajus committed Sep 7, 2022
    Copy the full SHA
    dfb1d02 View commit details
  5. fix: update roarr

    gajus committed Sep 7, 2022
    Copy the full SHA
    3ccb547 View commit details
  6. Adopt MixedRow (#401)

    * test: remove unsupported test cases
    
    * test: ensure that we can access parser types
    
    * docs: correct parser reference in documentation
    
    * feat: export SchemaValidationError
    
    * refactor: use ZodIssue
    
    * feat: remove casting to strict
    
    * feat: re-adopt MixedRow
    gajus authored Sep 7, 2022
    Copy the full SHA
    700242d View commit details
  7. fix: update zod

    gajus committed Sep 7, 2022
    Copy the full SHA
    51b3439 View commit details
2 changes: 1 addition & 1 deletion .README/README.md
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ For more information, refer to the [JavaScript Tagged Template Literal Grammar E

### VS Code Syntax Highlighting Extension

The [`vscode-sql-template-literal` extension](https://marketplace.visualstudio.com/items?itemName=forbeslindesay.vscode-sql-template-literal) provides syntax highlighting for VS Code:
The [`vscode-sql-lit` extension](https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit) provides syntax highlighting for VS Code:
![Syntax highlighting in VS Code](./.README/vscode-syntax-highlighting.png)

## Development
4 changes: 2 additions & 2 deletions .README/RUNTIME_VALIDATION.md
Original file line number Diff line number Diff line change
@@ -107,9 +107,9 @@ You can infer the TypeScript type of the query result. There are couple of ways
// Infer using z.infer<typeof yourSchema>
// https://github.com/colinhacks/zod#type-inference
type Person = z.infer<typeof personObject>;
// from sql tagged template `zodObject` property
// from sql tagged template `parser` property
type Person = z.infer<
personQuery.zodObject
personQuery.parser
>;
```

4 changes: 2 additions & 2 deletions .README/USAGE.md
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ createPool(
/**
* @property captureStackTrace Dictates whether to capture stack trace before executing query. Middlewares access stack trace through query execution context. (Default: false)
* @property connectionRetryLimit Number of times to retry establishing a new connection. (Default: 3)
* @property connectionTimeout Timeout (in milliseconds) after which an error is raised if connection cannot cannot be established. (Default: 5000)
* @property connectionTimeout Timeout (in milliseconds) after which an error is raised if connection cannot be established. (Default: 5000)
* @property idleInTransactionSessionTimeout Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 60000)
* @property idleTimeout Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 5000)
* @property interceptors An array of [Slonik interceptors](https://github.com/gajus/slonik#slonik-interceptors).
@@ -253,7 +253,7 @@ There are 4 types of configurable timeouts:

|Configuration|Description|Default|
|---|---|---|
|`connectionTimeout`|Timeout (in milliseconds) after which an error is raised if connection cannot cannot be established.|5000|
|`connectionTimeout`|Timeout (in milliseconds) after which an error is raised if connection cannot be established.|5000|
|`idleInTransactionSessionTimeout`|Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|60000|
|`idleTimeout`|Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|5000|
|`statementTimeout`|Timeout (in milliseconds) after which database is instructed to abort the query. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|60000|
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -592,7 +592,7 @@ createPool(
/**
* @property captureStackTrace Dictates whether to capture stack trace before executing query. Middlewares access stack trace through query execution context. (Default: false)
* @property connectionRetryLimit Number of times to retry establishing a new connection. (Default: 3)
* @property connectionTimeout Timeout (in milliseconds) after which an error is raised if connection cannot cannot be established. (Default: 5000)
* @property connectionTimeout Timeout (in milliseconds) after which an error is raised if connection cannot be established. (Default: 5000)
* @property idleInTransactionSessionTimeout Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 60000)
* @property idleTimeout Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 5000)
* @property interceptors An array of [Slonik interceptors](https://github.com/gajus/slonik#slonik-interceptors).
@@ -690,7 +690,7 @@ There are 4 types of configurable timeouts:

|Configuration|Description|Default|
|---|---|---|
|`connectionTimeout`|Timeout (in milliseconds) after which an error is raised if connection cannot cannot be established.|5000|
|`connectionTimeout`|Timeout (in milliseconds) after which an error is raised if connection cannot be established.|5000|
|`idleInTransactionSessionTimeout`|Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|60000|
|`idleTimeout`|Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|5000|
|`statementTimeout`|Timeout (in milliseconds) after which database is instructed to abort the query. Use 'DISABLE_TIMEOUT' constant to disable the timeout.|60000|
@@ -1322,9 +1322,9 @@ You can infer the TypeScript type of the query result. There are couple of ways
// Infer using z.infer<typeof yourSchema>
// https://github.com/colinhacks/zod#type-inference
type Person = z.infer<typeof personObject>;
// from sql tagged template `zodObject` property
// from sql tagged template `parser` property
type Person = z.infer<
personQuery.zodObject
personQuery.parser
>;
```

@@ -2878,7 +2878,7 @@ For more information, refer to the [JavaScript Tagged Template Literal Grammar E
<a name="slonik-syntax-highlighting-vs-code-syntax-highlighting-extension"></a>
### VS Code Syntax Highlighting Extension

The [`vscode-sql-template-literal` extension](https://marketplace.visualstudio.com/items?itemName=forbeslindesay.vscode-sql-template-literal) provides syntax highlighting for VS Code:
The [`vscode-sql-lit` extension](https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit) provides syntax highlighting for VS Code:
![Syntax highlighting in VS Code](./.README/vscode-syntax-highlighting.png)

<a name="user-content-slonik-development"></a>
1 change: 1 addition & 0 deletions benchmark/clients/slonik.js
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ const connect = () => {
pool.connect((connection) => {
resolve(connection);

// eslint-disable-next-line promise/param-names
return new Promise((end) => {
connection.end = () => {
end();
Loading