Skip to content

Commit 4c1f51d

Browse files
committed
Merge branch 'main' into fix/issues-47
# Via Dan Lynch (1) and GitHub (1) * main: test for issue #124 # Conflicts: # __fixtures__/generated/generated.json # __fixtures__/kitchen-sink/misc/issues.sql # packages/deparser/__tests__/kitchen-sink/misc-issues.test.ts
2 parents eb024da + bbea230 commit 4c1f51d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

__fixtures__/generated/generated.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21094,6 +21094,7 @@
2109421094
"misc/issues-8.sql": "COMMENT ON COLUMN public.posts.reply_to_post_number IS 'If this post is a reply to another, this column is the post_number of the post it''s replying to. [FKEY posts.topic_id, posts.post_number]'",
2109521095
"misc/issues-9.sql": "CREATE TABLE \"Album\"\n(\n \"AlbumId\" INT NOT NULL,\n \"Title\" VARCHAR(160) NOT NULL,\n \"ArtistId\" INT NOT NULL,\n CONSTRAINT \"PK_Album\" PRIMARY KEY (\"AlbumId\")\n)",
2109621096
"misc/issues-10.sql": "CREATE INDEX \"existing_undispatched_message\" ON public.messages USING btree (\"context_id\", context_type, notification_name, \"to\", user_id)",
21097+
"misc/issues-11.sql": "COMMENT ON COLUMN \"foo\".\"whatever\" IS $$\nSomething blah, this data may have chars like '\\n' and '\\r' in it.\n$$",
2109721098
"misc/inflection-1.sql": "CREATE SCHEMA inflection",
2109821099
"misc/inflection-2.sql": "GRANT USAGE ON SCHEMA inflection TO PUBLIC",
2109921100
"misc/inflection-3.sql": "ALTER DEFAULT PRIVILEGES IN SCHEMA inflection \n GRANT EXECUTE ON FUNCTIONS TO PUBLIC",

__fixtures__/kitchen-sink/misc/issues.sql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ VALUES
2626
(2, 'Ausonius', NULL, FALSE, 'M', 1, '0310-01-01', '0395-01-01', 'Burdigala', NULL, NULL, NULL, NULL, NULL)
2727
ON CONFLICT DO NOTHING;
2828

29-
3029
-- https://github.com/launchql/pgsql-parser/issues/52
3130
CREATE TABLE public.ci_builds_runner_session (
3231
id bigint NOT NULL,
@@ -49,4 +48,9 @@ CREATE TABLE "Album"
4948
);
5049

5150
-- https://github.com/launchql/pgsql-parser/issues/47
52-
CREATE INDEX "existing_undispatched_message" ON public.messages USING btree ("context_id", context_type, notification_name, "to", user_id);
51+
CREATE INDEX "existing_undispatched_message" ON public.messages USING btree ("context_id", context_type, notification_name, "to", user_id);
52+
53+
-- https://github.com/launchql/pgsql-parser/issues/124
54+
COMMENT ON COLUMN "foo"."whatever" IS $$
55+
Something blah, this data may have chars like '\n' and '\r' in it.
56+
$$;

packages/deparser/__tests__/kitchen-sink/misc-issues.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ it('misc-issues', async () => {
1313
"misc/issues-7.sql",
1414
"misc/issues-8.sql",
1515
"misc/issues-9.sql",
16-
"misc/issues-10.sql"
16+
"misc/issues-10.sql",
17+
"misc/issues-11.sql"
1718
]);
1819
});

0 commit comments

Comments
 (0)