Skip to content

Commit 7560a5e

Browse files
committed
new test
1 parent 4024140 commit 7560a5e

File tree

8 files changed

+96
-0
lines changed

8 files changed

+96
-0
lines changed

__fixtures__/generated/generated.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21181,6 +21181,7 @@
2118121181
"original/alter/alter-95.sql": "ALTER TABLE mytable ADD COLUMN height_in numeric GENERATED ALWAYS AS (height_cm / 2.54) STORED",
2118221182
"original/alter/alter-96.sql": "ALTER SCHEMA schemaname RENAME TO newname",
2118321183
"original/alter/alter-97.sql": "ALTER SCHEMA schemaname OWNER TO newowner",
21184+
"original/alter/alter-table-column-1.sql": "ALTER TABLE public.table1 ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (\n SEQUENCE NAME public.table1\n START WITH 1\n INCREMENT BY 1\n NO MINVALUE\n NO MAXVALUE\n CACHE 1\n)",
2118421185
"misc/quotes_etc-1.sql": "CREATE USER MAPPING FOR local_user SERVER \"foreign_server\" OPTIONS (user 'remote_user', password 'secret123')",
2118521186
"misc/quotes_etc-2.sql": "CREATE USER MAPPING FOR local_user SERVER foreign_server OPTIONS (user 'remote_user', password 'secret123')",
2118621187
"misc/quotes_etc-3.sql": "SELECT E'Line 1\\nLine 2'",
@@ -21211,6 +21212,23 @@
2121121212
"misc/quotes_etc-28.sql": "DO $$\nBEGIN\n RAISE NOTICE 'Line one\\nLine two';\nEND;\n$$ LANGUAGE plpgsql",
2121221213
"misc/quotes_etc-29.sql": "CREATE USER MAPPING FOR local_user SERVER \"foreign_server\" OPTIONS (user 'remote_user', password 'secret123')",
2121321214
"misc/quotes_etc-30.sql": "CREATE USER MAPPING FOR local_user SERVER foreign_server OPTIONS (user 'remote_user', password 'secret123')",
21215+
"misc/pg_catalog-1.sql": "SELECT json_object('{}')",
21216+
"misc/pg_catalog-2.sql": "SELECT * FROM generate_series(1, 5)",
21217+
"misc/pg_catalog-3.sql": "SELECT get_byte(E'\\\\xDEADBEEF'::bytea, 1)",
21218+
"misc/pg_catalog-4.sql": "SELECT now()",
21219+
"misc/pg_catalog-5.sql": "SELECT clock_timestamp()",
21220+
"misc/pg_catalog-6.sql": "SELECT to_char(now(), 'YYYY-MM-DD HH24:MI:SS')",
21221+
"misc/pg_catalog-7.sql": "SELECT json_build_object('name', 'Alice', 'age', 30)",
21222+
"misc/pg_catalog-8.sql": "SELECT pg_typeof(42), pg_typeof('hello'), pg_typeof(now())",
21223+
"misc/pg_catalog-9.sql": "SELECT substring('abcdefg' FROM 2 FOR 3)",
21224+
"misc/pg_catalog-10.sql": "SELECT replace('hello world', 'l', 'L')",
21225+
"misc/pg_catalog-11.sql": "SELECT length('yolo')",
21226+
"misc/pg_catalog-12.sql": "SELECT position('G' IN 'ChatGPT')",
21227+
"misc/pg_catalog-13.sql": "SELECT trim(' padded text ')",
21228+
"misc/pg_catalog-14.sql": "SELECT ltrim('---abc', '-')",
21229+
"misc/pg_catalog-15.sql": "SELECT array_agg(id) FROM (VALUES (1), (2), (3)) AS t(id)",
21230+
"misc/pg_catalog-16.sql": "SELECT string_agg(name, ', ') FROM (VALUES ('Alice'), ('Bob'), ('Carol')) AS t(name)",
21231+
"misc/pg_catalog-17.sql": "SELECT json_agg(name) FROM (VALUES ('A'), ('B')) AS t(name)",
2121421232
"misc/launchql-ext-types-1.sql": "CREATE DOMAIN attachment AS jsonb CHECK ( value ?& ARRAY['url', 'mime'] AND (value->>'url') ~ '^(https?)://[^\\s/$.?#].[^\\s]*$' )",
2121521233
"misc/launchql-ext-types-2.sql": "COMMENT ON DOMAIN attachment IS E'@name launchqlInternalTypeAttachment'",
2121621234
"misc/launchql-ext-types-3.sql": "CREATE DOMAIN email AS citext CHECK ( value ~ '^[a-zA-Z0-9.!#$%&''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$' )",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ALTER TABLE public.table1 ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
2+
SEQUENCE NAME public.table1
3+
START WITH 1
4+
INCREMENT BY 1
5+
NO MINVALUE
6+
NO MAXVALUE
7+
CACHE 1
8+
);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
import { FixtureTestUtils } from '../../test-utils';
3+
const fixtures = new FixtureTestUtils();
4+
5+
it('misc-pg_catalog', async () => {
6+
await fixtures.runFixtureTests([
7+
"misc/pg_catalog-1.sql",
8+
"misc/pg_catalog-2.sql",
9+
"misc/pg_catalog-3.sql",
10+
"misc/pg_catalog-4.sql",
11+
"misc/pg_catalog-5.sql",
12+
"misc/pg_catalog-6.sql",
13+
"misc/pg_catalog-7.sql",
14+
"misc/pg_catalog-8.sql",
15+
"misc/pg_catalog-9.sql",
16+
"misc/pg_catalog-10.sql",
17+
"misc/pg_catalog-11.sql",
18+
"misc/pg_catalog-12.sql",
19+
"misc/pg_catalog-13.sql",
20+
"misc/pg_catalog-14.sql",
21+
"misc/pg_catalog-15.sql",
22+
"misc/pg_catalog-16.sql",
23+
"misc/pg_catalog-17.sql"
24+
]);
25+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import { FixtureTestUtils } from '../../test-utils';
3+
const fixtures = new FixtureTestUtils();
4+
5+
it('original-alter-alter-table-column', async () => {
6+
await fixtures.runFixtureTests([
7+
"original/alter/alter-table-column-1.sql"
8+
]);
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import { FixtureTestUtils } from '../../../test-utils';
3+
const fixtures = new FixtureTestUtils(13, 14);
4+
5+
it('original-alter-alter-table-column', async () => {
6+
await fixtures.runFixtureTests([
7+
"original/alter/alter-table-column-1.sql"
8+
]);
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import { FixtureTestUtils } from '../../../test-utils';
3+
const fixtures = new FixtureTestUtils(14, 15);
4+
5+
it('original-alter-alter-table-column', async () => {
6+
await fixtures.runFixtureTests([
7+
"original/alter/alter-table-column-1.sql"
8+
]);
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import { FixtureTestUtils } from '../../../test-utils';
3+
const fixtures = new FixtureTestUtils(15, 16);
4+
5+
it('original-alter-alter-table-column', async () => {
6+
await fixtures.runFixtureTests([
7+
"original/alter/alter-table-column-1.sql"
8+
]);
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import { FixtureTestUtils } from '../../../test-utils';
3+
const fixtures = new FixtureTestUtils(16, 17);
4+
5+
it('original-alter-alter-table-column', async () => {
6+
await fixtures.runFixtureTests([
7+
"original/alter/alter-table-column-1.sql"
8+
]);
9+
});

0 commit comments

Comments
 (0)