You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constreadmeContent=`# PostgreSQL Version ${version} Deparser
98
+
99
+
This directory contains a deparser for PostgreSQL version ${version} that automatically transforms ASTs to v17 format before deparsing.
100
+
101
+
## Usage
102
+
103
+
\`\`\`javascript
104
+
import { deparse, deparseSync } from './index';
105
+
106
+
// Async deparse
107
+
const sql = await deparse(pgNode);
108
+
109
+
// Sync deparse
110
+
const sql = deparseSync(pgNode);
111
+
112
+
// With options
113
+
const sql = await deparse(pgNode, {
114
+
paramPrefix: '$',
115
+
trimSpace: true
116
+
});
117
+
\`\`\`
118
+
119
+
## How it Works
120
+
121
+
1. The deparser uses the \`PG${version}ToPG17Transformer\` to transform your v${version} AST to v17 format
122
+
2. It then uses the standard \`pgsql-deparser\` to generate SQL from the v17 AST
123
+
3. This ensures compatibility with the latest deparser while supporting older AST versions
124
+
125
+
## Files
126
+
127
+
- \`index.ts\` - Main deparser exports
128
+
- \`v${version}-to-v17.ts\` - Direct transformer to v17
129
+
- Other transformer files are dependencies for the direct transformer
130
+
131
+
## Note
132
+
133
+
These are type-stripped versions optimized for bundle size. For TypeScript support with full types, use the original source files from the main package.
0 commit comments