Skip to content

Commit 9a8e018

Browse files
authored
Merge pull request #39 from launchql/helper-methods
Helper methods
2 parents 790c4a7 + c99405d commit 9a8e018

File tree

54 files changed

+52266
-23951
lines changed

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

+52266
-23951
lines changed

.github/workflows/run-tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
- name: deparser
2020
run: cd ./packages/deparser && yarn test
2121

22-
- name: enums
23-
run: cd ./packages/enums && yarn test
22+
- name: proto-parser
23+
run: cd ./packages/proto-parser && yarn test
2424

25-
- name: types
26-
run: cd ./packages/types && yarn test
25+
- name: utils
26+
run: cd ./packages/utils && yarn test
2727

2828
- name: transform
2929
run: cd ./packages/transform && yarn test

__fixtures__/generated/generated.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21148,6 +21148,8 @@
2114821148
"misc/cascades-23.sql": "DROP TRANSFORM IF EXISTS FOR some_type LANGUAGE plpgsql CASCADE",
2114921149
"misc/cascades-24.sql": "ALTER TABLE some_table DROP COLUMN some_column CASCADE",
2115021150
"misc/cascades-25.sql": "ALTER TABLE some_table DROP CONSTRAINT some_constraint CASCADE",
21151+
"misc/booleans-cast-1.sql": "SELECT * FROM myschema.mytable WHERE a = TRUE",
21152+
"misc/booleans-cast-2.sql": "SELECT * FROM myschema.mytable WHERE a = CAST('t' AS boolean)",
2115121153
"latest/postgres/create_view-1.sql": "CREATE FUNCTION interpt_pp(path, path)\n RETURNS point\n AS 'regresslib'\n LANGUAGE C STRICT",
2115221154
"latest/postgres/create_view-2.sql": "CREATE TABLE real_city (\n\tpop\t\t\tint4,\n\tcname\t\ttext,\n\toutline \tpath\n)",
2115321155
"latest/postgres/create_view-3.sql": "COPY real_city FROM 'filename'",

__fixtures__/generated/upstream-diff.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,18 @@
10711071
"original": "DROP SUBSCRIPTION IF EXISTS some_sub CASCADE",
10721072
"upstream": "DROP SUBSCRIPTION IF EXISTS some_sub"
10731073
},
1074+
"misc/booleans-cast-1.sql": {
1075+
"original": "SELECT * FROM myschema.mytable WHERE a = TRUE",
1076+
"upstream": "SELECT * FROM myschema.mytable WHERE a = false"
1077+
},
1078+
"misc/booleans-cast-2.sql": {
1079+
"original": "SELECT * FROM myschema.mytable WHERE a = CAST('t' AS boolean)",
1080+
"upstream": "SELECT * FROM myschema.mytable WHERE a = true"
1081+
},
1082+
"misc/booleans-cast-3.sql": {
1083+
"original": "SELECT * FROM myschema.mytable WHERE a = 't'::boolean",
1084+
"upstream": "SELECT * FROM myschema.mytable WHERE a = true"
1085+
},
10741086
"latest/postgres/create_view-1.sql": {
10751087
"original": "CREATE FUNCTION interpt_pp(path, path)\n RETURNS point\n AS 'regresslib'\n LANGUAGE C STRICT",
10761088
"upstream": "CREATE FUNCTION interpt_pp(path, path) RETURNS point AS $$regresslib$$ LANGUAGE c CALLED ON NULL INPUT"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT * FROM myschema.mytable WHERE a = TRUE;
2+
SELECT * FROM myschema.mytable WHERE a = CAST('t' AS boolean);
3+
SELECT * FROM myschema.mytable WHERE a = 't'::boolean;

__fixtures__/output/utils/astHelpers/bothEnabled/asts.ts

Lines changed: 2330 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)