Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
f701556
setup
pyramation Jun 24, 2025
a479ced
added enum converters and parser config
pyramation Jun 24, 2025
a753074
fixtures and useful info
pyramation Jun 24, 2025
0b756b3
notes
pyramation Jun 24, 2025
27fc1c9
only types
pyramation Jun 24, 2025
cb7661b
notes
pyramation Jun 24, 2025
a86d6ae
feat: implement transformer visitor system for PostgreSQL AST version…
pyramation Jun 24, 2025
9b0971d
updates
pyramation Jun 24, 2025
ee05721
feat: implement complete end-to-end integration test for PG13→PG17 tr…
pyramation Jun 24, 2025
28bc080
updates with test utils
pyramation Jun 24, 2025
caec723
remove comments
pyramation Jun 24, 2025
fa460ff
fix: handle A_Const zero values correctly in V13ToV14Transformer
pyramation Jun 24, 2025
0aef236
feat: implement complete PostgreSQL AST transformer system (v13→v17)
pyramation Jun 24, 2025
569bb31
fix: improve AST transformations for INSERT statements and nested str…
pyramation Jun 24, 2025
1f4f182
harness
pyramation Jun 24, 2025
2c0a775
tests
pyramation Jun 24, 2025
325e779
cleanup possibly bad AST tests
pyramation Jun 24, 2025
f3d67e6
tests
pyramation Jun 24, 2025
e80da61
fix: improve field preservation in BaseTransformer and add Alias meth…
pyramation Jun 24, 2025
44e376a
fix: add DefElem method to handle Integer to Boolean transformations …
pyramation Jun 25, 2025
4785265
fix: update transformers with improved field preservation and method …
pyramation Jun 25, 2025
7fb5588
fix: update DeclareCursorStmt to transform options field from 32 to 2…
pyramation Jun 25, 2025
3cb6439
feat: add debug tests and improve String transformations in V14ToV15T…
pyramation Jun 25, 2025
0cf48a8
fix: improve ObjectWithArgs logic to handle OBJECT_PROCEDURE and OBJE…
pyramation Jun 25, 2025
b4f2e22
fix: add GrantStmt method to handle REVOKE EXECUTE ON FUNCTION statem…
pyramation Jun 25, 2025
f8f1d3d
fix: remove automatic inh field addition from BaseTransformer
pyramation Jun 25, 2025
c3bcefe
fix: extend DefElem method to handle cycle defname Integer-to-Boolean…
pyramation Jun 25, 2025
28a4b32
fix: add SQL syntax detection to FuncCall method for proper funcforma…
pyramation Jun 25, 2025
09249eb
fix: preserve Integer ival field in v14-to-v15 and add missing ival i…
pyramation Jun 25, 2025
f69104c
fix: add -32767 to A_Const Integer values that should result in empty…
pyramation Jun 25, 2025
77f5e42
clean
pyramation Jun 25, 2025
ae75dba
types
pyramation Jun 25, 2025
5e13482
updates
pyramation Jun 25, 2025
b5310b5
task
pyramation Jun 25, 2025
24054c6
fix: improve objfuncargs preservation by removing incorrect CommentSt…
pyramation Jun 25, 2025
11826a7
fix: revert String transformation to preserve original field and rest…
pyramation Jun 25, 2025
5ceb419
feat: investigate type system bug in funcformat handling
pyramation Jun 26, 2025
0e9cff3
fixed
pyramation Jun 26, 2025
0d991b4
feat: add ResTarget method to fix method dispatch for FuncCall transf…
pyramation Jun 26, 2025
82dd9d4
fix: preserve funcformat field by default in FuncCall transformations
pyramation Jun 26, 2025
ae95ae0
revert: remove funcformat field in FuncCall transformations
pyramation Jun 26, 2025
c1b3cda
fix: preserve funcformat field in FuncCall transformations
pyramation Jun 26, 2025
949dd99
revert: remove funcformat field in FuncCall transformations again
pyramation Jun 26, 2025
45d1192
fix: preserve funcformat field in FuncCall transformations based on d…
pyramation Jun 26, 2025
c672bca
fix: remove incorrect FunctionParameter mode conversion from FUNC_PAR…
pyramation Jun 26, 2025
71c4710
fix: correct ParseResult version output to match parser expectations …
pyramation Jun 26, 2025
4adba0c
fix: preserve objfuncargs in CreateCastStmt contexts - only remove fo…
pyramation Jun 26, 2025
8cef8e7
docs: add RULES.md with correct @pgsql/parser usage patterns
pyramation Jun 26, 2025
8f788cc
feat: improve v13-to-v14 transformer with funcformat detection and ob…
pyramation Jun 26, 2025
1c9bddf
refactor: make objfuncargs preservation more restrictive
pyramation Jun 26, 2025
1237ea0
fix: prioritize shouldCreateObjfuncargs logic for CreateCastStmt cont…
pyramation Jun 26, 2025
c78c9b7
fix: remove funcformat addition logic - PG13 FuncCall nodes without f…
pyramation Jun 26, 2025
d5b32d5
fix: clean up FuncCall method formatting and ensure no funcformat add…
pyramation Jun 26, 2025
af6cd86
fix: remove funcformat fields from FuncCall transformations - PG14 ex…
pyramation Jun 26, 2025
2417645
fix: explicitly build FuncCall result object to prevent funcformat fi…
pyramation Jun 26, 2025
86e5785
fix: remove incorrect FunctionParameter mode transformation - FUNC_PA…
pyramation Jun 26, 2025
33b1d2a
fix: attempt FunctionParameter mode transformation FUNC_PARAM_IN -> F…
pyramation Jun 26, 2025
7cfa81b
fix: implement FunctionParameter mode transformation FUNC_PARAM_IN ->…
pyramation Jun 26, 2025
a255aba
fix: move RenameStmt to objfuncargs removal contexts - should not pre…
pyramation Jun 26, 2025
bdbca44
fix: add InsertStmt method to remove override field when OVERRIDING_N…
pyramation Jun 26, 2025
c3e0ac8
fix: improve objfuncargs preservation logic for better context handling
pyramation Jun 26, 2025
6457675
fix: preserve FunctionParameter mode values without transformation
pyramation Jun 26, 2025
89b0f38
fix: preserve InsertStmt override field instead of removing it
pyramation Jun 26, 2025
b6dbbb1
fix: implement FunctionParameter mode transformation FUNC_PARAM_IN ->…
pyramation Jun 26, 2025
f717cb7
fix: preserve objfuncargs in AlterFunctionStmt contexts
pyramation Jun 26, 2025
02024ce
fix: add explicit override field preservation in InsertStmt
pyramation Jun 26, 2025
1492dce
revert: undo problematic changes that caused regressions - back to 78…
pyramation Jun 26, 2025
8285c61
fix: implement FunctionParameter mode transformation FUNC_PARAM_IN ->…
pyramation Jun 26, 2025
864b157
fix: improve FunctionParameter and other non-funcformat transformatio…
pyramation Jun 26, 2025
5386a40
fix: refine objfuncargs preservation and add missing node type transf…
pyramation Jun 26, 2025
470d60b
fix: add funcformat field to FuncCall and transform FUNC_PARAM_IN to …
pyramation Jun 26, 2025
5570dcb
fix: add List transformation method to enable proper traversal of nes…
pyramation Jun 26, 2025
3c754c6
feat: implement additional AST node transformations for improved PG13…
pyramation Jun 26, 2025
f75c1ea
fix: correct DeclareCursorStmt options transformation (48 -> 288)
pyramation Jun 26, 2025
4329114
fix: implement hybrid DeclareCursorStmt options transformation to han…
pyramation Jun 26, 2025
a07a75b
fix: remove duplicate function implementations that caused TypeScript…
pyramation Jun 26, 2025
eab064a
fix: align String/Integer/Float/BitString/Null methods with other tra…
pyramation Jun 26, 2025
a267450
Revert "fix: align String/Integer/Float/BitString/Null methods with o…
pyramation Jun 26, 2025
9061be5
fix: align String/Integer/Float/BitString/Null methods with other tra…
pyramation Jun 26, 2025
4328b27
Revert "fix: align String/Integer/Float/BitString/Null methods with o…
pyramation Jun 26, 2025
94a0019
fix: align String/Integer/Float/BitString/Null methods with other tra…
pyramation Jun 26, 2025
fc0f1b4
Revert "fix: align String/Integer/Float/BitString/Null methods with o…
pyramation Jun 26, 2025
e8cf872
fix: align String/Integer/Float/BitString/Null methods with other tra…
pyramation Jun 26, 2025
790d811
Revert "fix: align String/Integer/Float/BitString/Null methods with o…
pyramation Jun 26, 2025
a5f58f7
fix: align String/Integer/Float/BitString/Null methods with other tra…
pyramation Jun 26, 2025
66f8ab1
Revert "fix: align String/Integer/Float/BitString/Null methods with o…
pyramation Jun 26, 2025
e922ef2
feat: add RoleSpecType enum transformation for PG13->PG14 compatibility
pyramation Jun 26, 2025
4fc9d4a
feat: add transformation methods for new PG14 interface nodes (CTECyc…
pyramation Jun 26, 2025
3dd99a7
feat: add context-aware funcformat logic to exclude CHECK constraints…
pyramation Jun 26, 2025
fd9a940
feat: implement TableLikeOption enum transformation for PG13->PG14 CR…
pyramation Jun 26, 2025
1825e08
feat: exclude DropStmt contexts from objfuncargs preservation to matc…
pyramation Jun 26, 2025
916b6a2
feat: refine ObjectWithArgs objfuncargs handling to ensure CreateCast…
pyramation Jun 26, 2025
572c6b3
feat: enhance CHECK constraint detection with multiple path strategie…
pyramation Jun 26, 2025
f2b0a7c
feat: implement surgical funcformat exclusion for aggregate functions…
pyramation Jun 26, 2025
6a3f99c
feat: add XmlExpr context exclusion for funcformat to handle XML func…
pyramation Jun 26, 2025
6e880da
feat: add INSERT context exclusion for funcformat to handle generate_…
pyramation Jun 26, 2025
5d98426
feat: add RangeFunction context exclusion for funcformat to handle ge…
pyramation Jun 26, 2025
de39ffe
feat: add investigation script for structural differences analysis
pyramation Jun 26, 2025
633dea6
feat: add failing tests analysis script for structural investigation
pyramation Jun 26, 2025
16c2e5e
feat: implement function-specific funcformat logic to break 124/258 p…
pyramation Jun 26, 2025
15da0eb
docs: add comprehensive NOTES.md documenting funcformat transformatio…
pyramation Jun 26, 2025
8cc80e7
feat: implement context-aware substring funcformat handling
pyramation Jun 26, 2025
1062933
fix: revert substring exclusion logic to maintain 125/258 baseline
pyramation Jun 26, 2025
1c30691
feat: add overlaps to sqlSyntaxFunctions for COERCE_SQL_SYNTAX
pyramation Jun 26, 2025
dbc4bfc
feat: add date and isfinite to sqlSyntaxFunctions for COERCE_SQL_SYNTAX
pyramation Jun 26, 2025
07f11e4
fix: restore missing FunctionParameter and AlterFunctionStmt transfor…
pyramation Jun 26, 2025
b0a96be
feat: add date_part to extract function name transformation for PG14 …
pyramation Jun 26, 2025
61f0715
feat: add CreateStmt, CreatePolicyStmt, and DropStmt transformation m…
pyramation Jun 26, 2025
c45d181
feat: add context exclusions for SortBy, default constraints, policie…
pyramation Jun 26, 2025
29cd055
feat: implement enum transformations for A_Expr_Kind and RoleSpecType…
pyramation Jun 26, 2025
73c20af
docs: add critical async parser requirement to RULES.md
pyramation Jun 27, 2025
ae40ad9
feat: add ObjectWithArgs objfuncargs transformation for CommentStmt c…
pyramation Jun 27, 2025
57b6749
ast-test
pyramation Jun 27, 2025
d1fd0bb
fix: correct WithClause transformation to convert objects to arrays f…
pyramation Jun 27, 2025
0fb0340
feat: add RenameStmt support to objfuncargs transformation contexts
pyramation Jun 27, 2025
14c9f28
debug: remove debug logging and clean up objname transformation logic
pyramation Jun 27, 2025
8579352
feat: add AlterOpFamilyStmt to objfuncargs allowed contexts
pyramation Jun 27, 2025
8656f28
fix: improve objname transformation logic to handle array/object conv…
pyramation Jun 27, 2025
0decb45
feat: add shouldPreserveObjnameAsObject method for context-specific o…
pyramation Jun 27, 2025
3f649af
revert: objname transformation changes that reduced passing tests fro…
pyramation Jun 27, 2025
e5e02b9
fix: invert shouldPreserveObjnameAsObject logic to convert objects to…
pyramation Jun 27, 2025
db21e64
clean: remove debug logging and simplify shouldPreserveObjnameAsObjec…
pyramation Jun 27, 2025
03687a8
fix: add specific objname array conversion handling in CreateOpClassI…
pyramation Jun 27, 2025
aa3fc4d
fix: remove CreateOpClassItem from shouldPreserveObjfuncargs exclusio…
pyramation Jun 27, 2025
389512a
feat: add direct objfuncargs creation in CreateOpClassItem method
pyramation Jun 27, 2025
b498786
fix: make OBJECT_OPERATOR exclusion specific to CommentStmt contexts
pyramation Jun 27, 2025
b3083bb
fix: remove duplicate WithClause method to resolve compilation errors
pyramation Jun 27, 2025
96b0f05
debug: add detailed objargs logging to investigate operator argument …
pyramation Jun 27, 2025
67cb93e
fix: remove AlterOwnerStmt objfuncargs logic and debug logging
pyramation Jun 27, 2025
257cb06
revert: substring function logic back to original isStandardFunctionC…
pyramation Jun 27, 2025
92e9895
fix: remove substring pg_catalog prefix stripping logic to preserve f…
pyramation Jun 27, 2025
64836b6
fix: implement objfuncargs creation for plain object func in AlterFun…
pyramation Jun 27, 2025
a73eda0
fix: add operator detection in CreateOpClassItem to prevent objfuncar…
pyramation Jun 27, 2025
9b4b779
fix: add GrantStmt and RevokeStmt to allowedNodeTypes for objfuncargs…
pyramation Jun 27, 2025
d558735
fix: add xmlexists to sqlSyntaxFunctions for COERCE_SQL_SYNTAX funcfo…
pyramation Jun 27, 2025
4da3841
fix: allow funcformat for function calls in constraint contexts
pyramation Jun 27, 2025
1251667
fix: exclude parameter name preservation in DropStmt contexts to matc…
pyramation Jun 27, 2025
19fa946
revert: restore parameter name preservation logic - PG14 expects name…
pyramation Jun 27, 2025
81ad279
fix: remove INSERT and UPDATE context exclusions from shouldAddFuncfo…
pyramation Jun 27, 2025
e18eddb
fix: add pg_collation_for and collation_for to sqlSyntaxFunctions for…
pyramation Jun 27, 2025
0a55bb5
fix: remove ltrim from sqlSyntaxFunctions to use COERCE_EXPLICIT_CALL…
pyramation Jun 27, 2025
54e2414
revert: restore substring override to maintain 231 passing tests - bl…
pyramation Jun 27, 2025
280aba2
cleanup: remove debug logging from ObjectWithArgs method
pyramation Jun 27, 2025
1f08b98
cleanup: remove debug logging from shouldCreateObjfuncargsFromObjargs…
pyramation Jun 27, 2025
5d4663e
fix: add ltrim back to sqlSyntaxFunctions for COERCE_SQL_SYNTAX funcf…
pyramation Jun 27, 2025
c646896
cleanup: remove debug logging from getFuncformatValue method - mainta…
pyramation Jun 27, 2025
fa6f942
fix: reverse TableLikeClause options transformation from 6→12 instead…
pyramation Jun 27, 2025
3c08ffa
docs: add enums package usage documentation to RULES.md for op codes …
pyramation Jun 27, 2025
1d98810
feat: improve PG13->PG14 conversion with targeted enum mappings and f…
pyramation Jun 27, 2025
df2730f
fix: refine PG13->PG14 conversion with improved enum mappings and fun…
pyramation Jun 27, 2025
c69dac4
fix: attempt to improve function parameter modes and TableLikeOption …
pyramation Jun 27, 2025
cb9700e
feat: improve PG13->PG14 conversion with context-aware function param…
pyramation Jun 27, 2025
24b614f
fix: improve variadic parameter detection and preserve existing modes
devin-ai-integration[bot] Jun 28, 2025
6ee2256
fix: add pg_catalog prefix logic for SQL standard functions
devin-ai-integration[bot] Jun 28, 2025
842c341
fix: correct v16-to-v17 version number and wrap all node transformati…
devin-ai-integration[bot] Jun 28, 2025
6bca3a7
fix: preserve existing objfuncargs and improve variadic parameter han…
devin-ai-integration[bot] Jun 28, 2025
6e0791d
fix: add CI rule to RULES.md and fix node wrapping in v16-to-v17 tran…
devin-ai-integration[bot] Jun 28, 2025
8c595c9
fix: improve funcformat logic and remove unwanted pg_catalog prefixes
devin-ai-integration[bot] Jun 28, 2025
8dc96a2
fix: improve variadic parameter detection and add CI rule
devin-ai-integration[bot] Jun 28, 2025
6adcd84
fix: make variadic detection more conservative to fix arrays regression
devin-ai-integration[bot] Jun 28, 2025
f1cd746
fix: improve 13-14 transformation with CreateTransformStmt objfuncarg…
devin-ai-integration[bot] Jun 28, 2025
14ac35f
docs: add STATUS.md files tracking transformer progress and fix v14-t…
devin-ai-integration[bot] Jun 28, 2025
31ebb53
fix: systematic v15-to-v16 transformer node wrapping improvements
devin-ai-integration[bot] Jun 28, 2025
bb3785e
fix: add comprehensive node wrapping for v15-to-v16 transformer core …
devin-ai-integration[bot] Jun 28, 2025
6ed06e6
fix: add node wrapping for A_Expr, BoolExpr, Alias, Boolean in v15-to…
devin-ai-integration[bot] Jun 28, 2025
c36d424
fix: add node wrapping for A_ArrayExpr, A_Indices, A_Indirection, A_S…
devin-ai-integration[bot] Jun 28, 2025
6a32f74
fix: improve v14-to-v15 transformer node wrapping by following v13-to…
devin-ai-integration[bot] Jun 28, 2025
ba9f861
docs: update STATUS-14-15.md with final test results
devin-ai-integration[bot] Jun 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3,916 changes: 1,783 additions & 2,133 deletions __fixtures__/proto/13-latest.proto

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions __fixtures__/transform/13/alter_table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
[
{
"query": "ALTER TABLE users ADD COLUMN email TEXT",
"ast": {
"version": 130008,
"stmts": [
{
"stmt": {
"AlterTableStmt": {
"relation": {
"relname": "users",
"inh": true,
"relpersistence": "p",
"location": 12
},
"cmds": [
{
"AlterTableCmd": {
"subtype": "AT_AddColumn",
"def": {
"ColumnDef": {
"colname": "email",
"typeName": {
"names": [
{
"String": {
"str": "text"
}
}
],
"typemod": -1,
"location": 35
},
"is_local": true,
"location": 29
}
},
"behavior": "DROP_RESTRICT"
}
}
],
"relkind": "OBJECT_TABLE"
}
}
}
]
}
},
{
"query": "ALTER TABLE users DROP COLUMN email",
"ast": {
"version": 130008,
"stmts": [
{
"stmt": {
"AlterTableStmt": {
"relation": {
"relname": "users",
"inh": true,
"relpersistence": "p",
"location": 12
},
"cmds": [
{
"AlterTableCmd": {
"subtype": "AT_DropColumn",
"name": "email",
"behavior": "DROP_RESTRICT"
}
}
],
"relkind": "OBJECT_TABLE"
}
}
}
]
}
},
{
"query": "ALTER TABLE users RENAME COLUMN name TO full_name",
"ast": {
"version": 130008,
"stmts": [
{
"stmt": {
"RenameStmt": {
"renameType": "OBJECT_COLUMN",
"relationType": "OBJECT_TABLE",
"relation": {
"relname": "users",
"inh": true,
"relpersistence": "p",
"location": 12
},
"subname": "name",
"newname": "full_name",
"behavior": "DROP_RESTRICT"
}
}
}
]
}
}
]
Loading
Loading