Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,073 changes: 1,073 additions & 0 deletions __fixtures__/output/enum-maps/only-str/enums2int.json

Large diffs are not rendered by default.

1,301 changes: 0 additions & 1,301 deletions __fixtures__/output/runtime-schema/full-features/complete-schema.json

Large diffs are not rendered by default.

1,301 changes: 0 additions & 1,301 deletions __fixtures__/output/runtime-schema/json/custom-filename/custom-node-specs.json

Large diffs are not rendered by default.

1,301 changes: 0 additions & 1,301 deletions __fixtures__/output/runtime-schema/json/enabled/runtime-schema.json

Large diffs are not rendered by default.

1,397 changes: 0 additions & 1,397 deletions __fixtures__/output/runtime-schema/latest-proto/latest-schema.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,302 changes: 0 additions & 1,302 deletions __fixtures__/output/runtime-schema/typescript/enabled/runtime-schema.ts

Large diffs are not rendered by default.

1,302 changes: 0 additions & 1,302 deletions __fixtures__/output/runtime-schema/typescript/full-features/complete-schema.ts

Large diffs are not rendered by default.

1,076 changes: 1,076 additions & 0 deletions packages/proto-parser/__tests__/__snapshots__/enum-maps.test.ts.snap

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions packages/proto-parser/__tests__/__snapshots__/meta.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,34 @@ exports[`AST to AST to create AST — meta 🤯 2`] = `
})"
`;

exports[`Complex AST with runtime schema — mixed wrapped/unwrapped patterns 1`] = `
"t.nodes.selectStmt({
targetList: [t.nodes.resTarget({
val: t.nodes.columnRef({
fields: [t.nodes.aStar({})]
})
})],
limitOption: "LIMIT_OPTION_DEFAULT",
withClause: t.ast.withClause({
ctes: [t.nodes.commonTableExpr({
ctename: "test_cte",
ctequery: t.nodes.selectStmt({
targetList: [t.nodes.resTarget({
val: t.nodes.columnRef({
fields: [t.nodes.string({
sval: "id"
})]
})
})],
limitOption: "LIMIT_OPTION_DEFAULT"
})
})],
recursive: false
}),
op: "SETOP_NONE"
})"
`;

exports[`Complex AST — Advanced SQL with CTEs, Window Functions, Joins, and Subqueries 1`] = `
{
"SelectStmt": {
Expand Down Expand Up @@ -1282,3 +1310,53 @@ exports[`Complex AST — Advanced SQL with CTEs, Window Functions, Joins, and Su
op: "SETOP_NONE"
})"
`;

exports[`Enhanced AST generation with runtime schema — wrapped vs unwrapped nodes 1`] = `
{
"SelectStmt": {
"fromClause": [
{
"RangeVar": {
"inh": true,
"relname": "test_table",
"relpersistence": "p",
},
},
],
"limitOption": "LIMIT_OPTION_DEFAULT",
"op": "SETOP_NONE",
"targetList": [
{
"ResTarget": {
"val": {
"ColumnRef": {
"fields": [
{
"A_Star": {},
},
],
},
},
},
},
],
},
}
`;

exports[`Enhanced AST generation with runtime schema — wrapped vs unwrapped nodes 2`] = `
"t.nodes.selectStmt({
targetList: [t.nodes.resTarget({
val: t.nodes.columnRef({
fields: [t.nodes.aStar({})]
})
})],
fromClause: [t.nodes.rangeVar({
relname: "test_table",
inh: true,
relpersistence: "p"
})],
limitOption: "LIMIT_OPTION_DEFAULT",
op: "SETOP_NONE"
})"
`;
Loading