Skip to content

Commit 2fdc53f

Browse files
committed
types
1 parent bf9bf30 commit 2fdc53f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+10570
-329
lines changed

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,13 @@ pnpm run test
323323
Our latest is built with `17-latest` branch from libpg_query
324324

325325

326-
| PG Major Version | libpg_query | Branch | npm
327-
|--------------------------|-------------|------------------------------------------------------------------------------------------------|---------|
328-
| 17 | 17-latest | [`17-latest`](https://github.com/launchql/libpg-query-node/tree/17-latest) | [`[email protected]`](https://www.npmjs.com/package/libpg-query/v/latest)
329-
| 16 | 16-latest | [`16-latest`](https://github.com/launchql/libpg-query-node/tree/16-latest) | [`[email protected]`](https://www.npmjs.com/package/libpg-query/v/16.2.0)
330-
| 15 | 15-latest | [`15-latest`](https://github.com/launchql/libpg-query-node/tree/15-latest) | [`[email protected]`](https://www.npmjs.com/package/libpg-query/v/15.1.0)
331-
| 14 | 14-latest | [`14-latest`](https://github.com/launchql/libpg-query-node/tree/14-latest) | [`[email protected]`](https://www.npmjs.com/package/libpg-query/v/14.0.0)
332-
| 13 | 13-latest | [`13-latest`](https://github.com/launchql/libpg-query-node/tree/13-latest) | [`[email protected]`](https://www.npmjs.com/package/libpg-query/v/13.3.1)
326+
| PG Major Version | libpg_query | npm dist-tag
327+
|--------------------------|-------------|---------|
328+
| 17 | 17-6.1.0 | [`pg17`](https://www.npmjs.com/package/libpg-query/v/latest)
329+
| 16 | 16-5.2.0 | [`pg16`](https://www.npmjs.com/package/libpg-query/v/pg16)
330+
| 15 | 15-4.2.4 | [`pg15`](https://www.npmjs.com/package/libpg-query/v/pg15)
331+
| 14 | 14-3.0.0 | [`pg14`](https://www.npmjs.com/package/libpg-query/v/pg14)
332+
| 13 | 13-2.2.0 | [`pg13`](https://www.npmjs.com/package/libpg-query/v/pg13)
333333
| 12 | (n/a) | |
334334
| 11 | (n/a) | |
335335
| 10 | 10-latest | | `@1.3.1` ([tree](https://github.com/pyramation/pgsql-parser/tree/39b7b1adc8914253226e286a48105785219a81ca)) |
@@ -368,10 +368,25 @@ The build process generates these files:
368368

369369
## Credit
370370

371-
This is based on the output of [libpg_query](https://github.com/pganalyze/libpg_query). This wraps the static library output and links it into a node module for use in js.
371+
* This is based on the output of [libpg_query](https://github.com/pganalyze/libpg_query). This wraps the static library output and links it into a node module for use in js.
372372

373-
All credit for the hard problems goes to [Lukas Fittl](https://github.com/lfittl).
373+
* All credit for the hard problems goes to [Lukas Fittl](https://github.com/lfittl).
374374

375-
Additional thanks for the original Node.js integration work by [Ethan Resnick](https://github.com/ethanresnick).
375+
* Additional thanks for the original Node.js integration work by [Ethan Resnick](https://github.com/ethanresnick).
376376

377-
Original [Code](https://github.com/zhm/node-pg-query-native) and [License](https://github.com/zhm/node-pg-query-native/blob/master/LICENSE.md)
377+
* Original [Code](https://github.com/zhm/node-pg-query-native) and [License](https://github.com/zhm/node-pg-query-native/blob/master/LICENSE.md)
378+
379+
## Related
380+
381+
* [pgsql-parser](https://github.com/launchql/pgsql-parser): The real PostgreSQL parser for Node.js, providing symmetric parsing and deparsing of SQL statements with actual PostgreSQL parser integration.
382+
* [pgsql-deparser](https://github.com/launchql/pgsql-parser/tree/main/packages/deparser): A streamlined tool designed for converting PostgreSQL ASTs back into SQL queries, focusing solely on deparser functionality to complement `pgsql-parser`.
383+
* [@pgsql/types](https://github.com/launchql/pgsql-parser/tree/main/packages/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs.
384+
* [@pgsql/utils](https://github.com/launchql/pgsql-parser/tree/main/packages/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs.
385+
* [pg-proto-parser](https://github.com/launchql/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
386+
* [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries.
387+
388+
## Disclaimer
389+
390+
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
391+
392+
No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
"test:all": "pnpm -r test",
1212
"clean:all": "pnpm -r clean",
1313
"analyze:sizes": "node scripts/analyze-sizes.js",
14-
"fetch:protos": "node scripts/fetch-protos.js"
14+
"fetch:protos": "node scripts/fetch-protos.js",
15+
"build:types": "node scripts/build-types.js"
1516
},
1617
"devDependencies": {
1718
"@types/node": "^20.0.0",
18-
"typescript": "^5.3.3",
19+
"copyfiles": "^2.4.1",
1920
"rimraf": "^5.0.0",
20-
"copyfiles": "^2.4.1"
21+
"ts-node": "^10.9.1",
22+
"typescript": "^5.3.3",
23+
"pg-proto-parser": "^1.28.2"
2124
}
2225
}

0 commit comments

Comments
 (0)