Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 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
bf602a5
docs: add critical async parser requirement to RULES.md
pyramation Jun 27, 2025
5e27cf1
feat: add ObjectWithArgs objfuncargs transformation for CommentStmt c…
pyramation Jun 27, 2025
afe1b52
ast-test
pyramation Jun 27, 2025
630d873
fix: correct WithClause transformation to convert objects to arrays f…
devin-ai-integration[bot] Jun 27, 2025
6da18da
feat: add RenameStmt support to objfuncargs transformation contexts
devin-ai-integration[bot] Jun 27, 2025
e2b23bc
debug: remove debug logging and clean up objname transformation logic
devin-ai-integration[bot] Jun 27, 2025
472cf5a
feat: add AlterOpFamilyStmt to objfuncargs allowed contexts
devin-ai-integration[bot] Jun 27, 2025
94a299f
fix: improve objname transformation logic to handle array/object conv…
devin-ai-integration[bot] Jun 27, 2025
1493813
feat: add shouldPreserveObjnameAsObject method for context-specific o…
devin-ai-integration[bot] Jun 27, 2025
3cdab33
revert: objname transformation changes that reduced passing tests fro…
devin-ai-integration[bot] Jun 27, 2025
848780f
fix: invert shouldPreserveObjnameAsObject logic to convert objects to…
devin-ai-integration[bot] Jun 27, 2025
a7e66d6
clean: remove debug logging and simplify shouldPreserveObjnameAsObjec…
devin-ai-integration[bot] Jun 27, 2025
99d55d6
fix: add specific objname array conversion handling in CreateOpClassI…
devin-ai-integration[bot] Jun 27, 2025
65328a8
fix: remove CreateOpClassItem from shouldPreserveObjfuncargs exclusio…
devin-ai-integration[bot] Jun 27, 2025
26a7514
feat: add direct objfuncargs creation in CreateOpClassItem method
devin-ai-integration[bot] Jun 27, 2025
94d5312
fix: make OBJECT_OPERATOR exclusion specific to CommentStmt contexts
devin-ai-integration[bot] Jun 27, 2025
7607241
fix: remove duplicate WithClause method to resolve compilation errors
devin-ai-integration[bot] Jun 27, 2025
8de72df
debug: add detailed objargs logging to investigate operator argument …
devin-ai-integration[bot] Jun 27, 2025
bd4f1b6
fix: remove AlterOwnerStmt objfuncargs logic and debug logging
devin-ai-integration[bot] Jun 27, 2025
6b07ba7
revert: substring function logic back to original isStandardFunctionC…
devin-ai-integration[bot] Jun 27, 2025
83c129f
fix: remove substring pg_catalog prefix stripping logic to preserve f…
devin-ai-integration[bot] Jun 27, 2025
9255eca
fix: implement objfuncargs creation for plain object func in AlterFun…
devin-ai-integration[bot] Jun 27, 2025
de6f710
fix: add operator detection in CreateOpClassItem to prevent objfuncar…
devin-ai-integration[bot] Jun 27, 2025
acc09d8
fix: add GrantStmt and RevokeStmt to allowedNodeTypes for objfuncargs…
devin-ai-integration[bot] Jun 27, 2025
e106bb4
fix: add xmlexists to sqlSyntaxFunctions for COERCE_SQL_SYNTAX funcfo…
devin-ai-integration[bot] Jun 27, 2025
f63286f
fix: allow funcformat for function calls in constraint contexts
devin-ai-integration[bot] Jun 27, 2025
af48bbf
fix: exclude parameter name preservation in DropStmt contexts to matc…
devin-ai-integration[bot] Jun 27, 2025
983ffad
revert: restore parameter name preservation logic - PG14 expects name…
devin-ai-integration[bot] Jun 27, 2025
49b9772
fix: remove INSERT and UPDATE context exclusions from shouldAddFuncfo…
devin-ai-integration[bot] Jun 27, 2025
5fa2c06
fix: add pg_collation_for and collation_for to sqlSyntaxFunctions for…
devin-ai-integration[bot] Jun 27, 2025
9a11fff
fix: remove ltrim from sqlSyntaxFunctions to use COERCE_EXPLICIT_CALL…
devin-ai-integration[bot] Jun 27, 2025
dd04b3c
revert: restore substring override to maintain 231 passing tests - bl…
devin-ai-integration[bot] Jun 27, 2025
f9b84e1
cleanup: remove debug logging from ObjectWithArgs method
devin-ai-integration[bot] Jun 27, 2025
b31e524
cleanup: remove debug logging from shouldCreateObjfuncargsFromObjargs…
devin-ai-integration[bot] Jun 27, 2025
63c8f0a
fix: add ltrim back to sqlSyntaxFunctions for COERCE_SQL_SYNTAX funcf…
devin-ai-integration[bot] Jun 27, 2025
e478717
cleanup: remove debug logging from getFuncformatValue method - mainta…
devin-ai-integration[bot] Jun 27, 2025
e839356
fix: reverse TableLikeClause options transformation from 6→12 instead…
devin-ai-integration[bot] Jun 27, 2025
68369a3
debug: modify FunctionParameter mode transformation to convert FUNC_P…
devin-ai-integration[bot] Jun 27, 2025
ab8a5b0
revert: restore simple FUNC_PARAM_VARIADIC->FUNC_PARAM_DEFAULT transf…
devin-ai-integration[bot] Jun 27, 2025
1d57c0c
fix: add DropStmt to parentNodeTypes in DropStmt method + debug loggi…
devin-ai-integration[bot] Jun 27, 2025
8520487
cleanup: remove debug logging from FunctionParameter method - maintai…
devin-ai-integration[bot] Jun 27, 2025
89a9125
fix: improve variadic parameter mode handling and TableLikeClause opt…
devin-ai-integration[bot] Jun 27, 2025
334defb
fix: improve VARIADIC parameter detection in createFunctionParameterF…
devin-ai-integration[bot] Jun 27, 2025
53a96cd
fix: default shouldAddObjfuncargsForDropStmt to true and improve anya…
devin-ai-integration[bot] Jun 27, 2025
c34d99d
fix: preserve parameter names in FunctionParameter transformation
devin-ai-integration[bot] Jun 27, 2025
b7dd847
feat: add ReindexStmt transformation method
devin-ai-integration[bot] Jun 27, 2025
185c583
fix: add TableLikeClause options mapping for INCLUDING IDENTITY (16→32)
devin-ai-integration[bot] Jun 27, 2025
8a395f9
fix: add TableLikeClause options mapping for INCLUDING GENERATED (8→16)
devin-ai-integration[bot] Jun 27, 2025
438a968
fix: set FUNC_PARAM_DEFAULT mode for all parameters in DropStmt conte…
devin-ai-integration[bot] Jun 27, 2025
8794434
fix: set pg_collation_for to use COERCE_EXPLICIT_CALL funcformat - im…
devin-ai-integration[bot] Jun 27, 2025
f6ef966
fix: add TableLikeClause options mapping for INCLUDING DEFAULTS (4→8)…
devin-ai-integration[bot] Jun 27, 2025
a39814d
fix: add TableLikeClause options mapping for INCLUDING DEFAULTS + INC…
devin-ai-integration[bot] Jun 27, 2025
f4c8006
fix: add pg_collation_for function with pg_catalog prefix handling fo…
devin-ai-integration[bot] Jun 27, 2025
726490d
feat: add CreateStatsStmt transformation method to wrap expressions i…
devin-ai-integration[bot] Jun 27, 2025
980377e
fix: always include parameter names in FunctionParameter objects for …
devin-ai-integration[bot] Jun 27, 2025
d767fe6
fix: revert incorrect variadic parameter detection in DROP contexts -…
devin-ai-integration[bot] Jun 27, 2025
fb1929d
feat: improve parameter name extraction logic in createFunctionParame…
devin-ai-integration[bot] Jun 27, 2025
9c2f10c
fix: remove paramIndex references causing compilation errors - mainta…
devin-ai-integration[bot] Jun 27, 2025
c587e51
feat: restore polymorphic array type detection for anyarray/anycompat…
devin-ai-integration[bot] Jun 27, 2025
c183ffb
fix: restore shouldAddObjfuncargsForDropStmt to return true and remov…
devin-ai-integration[bot] Jun 27, 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