Skip to content

Commit 33f96b7

Browse files
committed
indexes
1 parent 587243e commit 33f96b7

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

__fixtures__/generated/generated.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21082,6 +21082,19 @@
2108221082
"misc/inflection-24.sql": "CREATE FUNCTION inflection.slugify(text) RETURNS text AS $$SELECT inflection.slugify($1, false)$$ LANGUAGE sql IMMUTABLE",
2108321083
"misc/inflection-25.sql": "INSERT INTO inflection.inflection_rules (type, test, replacement) VALUES ('plural', '^(m|wom)en$', NULL), ('plural', '(pe)ople$', NULL), ('plural', '(child)ren$', NULL), ('plural', '([ti])a$', NULL), ('plural', '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$', NULL), ('plural', '(hi|ti)ves$', NULL), ('plural', '(curve)s$', NULL), ('plural', '([lr])ves$', NULL), ('plural', '([^fo])ves$', NULL), ('plural', '([^aeiouy]|qu)ies$', NULL), ('plural', '(s)eries$', NULL), ('plural', '(m)ovies$', NULL), ('plural', '(x|ch|ss|sh)es$', NULL), ('plural', '([m|l])ice$', NULL), ('plural', '(bus)es$', NULL), ('plural', '(o)es$', NULL), ('plural', '(shoe)s$', NULL), ('plural', '(cris|ax|test)es$', NULL), ('plural', '(octop|vir)i$', NULL), ('plural', '(alias|canvas|status|campus)es$', NULL), ('plural', '^(summons)es$', NULL), ('plural', '^(ox)en', NULL), ('plural', '(matr)ices$', NULL), ('plural', '^feet$', NULL), ('plural', '^teeth$', NULL), ('plural', '^geese$', NULL), ('plural', '(quiz)zes$', NULL), ('plural', '^(whereas)es$', NULL), ('plural', '^(criteri)a$', NULL), ('plural', '^genera$', NULL), ('plural', '^(m|wom)an$', E'\\\\1en'), ('plural', '(pe)rson$', E'\\\\1ople'), ('plural', '(child)$', E'\\\\1ren'), ('plural', '^(ox)$', E'\\\\1en'), ('plural', '(ax|test)is$', E'\\\\1es'), ('plural', '(octop|vir)us$', E'\\\\1i'), ('plural', '(alias|status|canvas|campus)$', E'\\\\1es'), ('plural', '^(summons)$', E'\\\\1es'), ('plural', '(bu)s$', E'\\\\1ses'), ('plural', '(buffal|tomat|potat)o$', E'\\\\1oes'), ('plural', '([ti])um$', E'\\\\1a'), ('plural', 'sis$', 'ses'), ('plural', '(?:([^f])fe|([lr])f)$', E'\\\\1\\\\2ves'), ('plural', '(hi|ti)ve$', E'\\\\1ves'), ('plural', '([^aeiouy]|qu)y$', E'\\\\1ies'), ('plural', '(matr)ix$', E'\\\\1ices'), ('plural', '(vert|ind)ex$', E'\\\\1ices'), ('plural', '(x|ch|ss|sh)$', E'\\\\1es'), ('plural', '([m|l])ouse$', E'\\\\1ice'), ('plural', '^foot$', 'feet'), ('plural', '^tooth$', 'teeth'), ('plural', '^goose$', 'geese'), ('plural', '(quiz)$', E'\\\\1zes'), ('plural', '^(whereas)$', E'\\\\1es'), ('plural', '^(criteri)on$', E'\\\\1a'), ('plural', '^genus$', 'genera'), ('plural', 's$', 's'), ('plural', '$', 's'), ('singular', '^(m|wom)an$', NULL), ('singular', '(pe)rson$', NULL), ('singular', '(child)$', NULL), ('singular', '^(ox)$', NULL), ('singular', '(ax|test)is$', NULL), ('singular', '(octop|vir)us$', NULL), ('singular', '(alias|status|canvas|campus)$', NULL), ('singular', '^(summons)$', NULL), ('singular', '(bu)s$', NULL), ('singular', '(buffal|tomat|potat)o$', NULL), ('singular', '([ti])um$', NULL), ('singular', 'sis$', NULL), ('singular', '(?:([^f])fe|([lr])f)$', NULL), ('singular', '(hi|ti)ve$', NULL), ('singular', '([^aeiouy]|qu)y$', NULL), ('singular', '(x|ch|ss|sh)$', NULL), ('singular', '(matr)ix$', NULL), ('singular', '([m|l])ouse$', NULL), ('singular', '^foot$', NULL), ('singular', '^tooth$', NULL), ('singular', '^goose$', NULL), ('singular', '(quiz)$', NULL), ('singular', '^(whereas)$', NULL), ('singular', '^(criteri)on$', NULL), ('singular', '^genus$', NULL), ('singular', '^(m|wom)en$', E'\\\\1an'), ('singular', '(pe)ople$', E'\\\\1rson'), ('singular', '(child)ren$', E'\\\\1'), ('singular', '^genera$', 'genus'), ('singular', '^(criteri)a$', E'\\\\1on'), ('singular', '([ti])a$', E'\\\\1um'), ('singular', '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$', E'\\\\1\\\\2sis'), ('singular', '(hi|ti)ves$', E'\\\\1ve'), ('singular', '(curve)s$', E'\\\\1'), ('singular', '([lr])ves$', E'\\\\1f'), ('singular', '([a])ves$', E'\\\\1ve'), ('singular', '([^fo])ves$', E'\\\\1fe'), ('singular', '(m)ovies$', E'\\\\1ovie'), ('singular', '([^aeiouy]|qu)ies$', E'\\\\1y'), ('singular', '(s)eries$', E'\\\\1eries'), ('singular', '(x|ch|ss|sh)es$', E'\\\\1'), ('singular', '([m|l])ice$', E'\\\\1ouse'), ('singular', '(bus)es$', E'\\\\1'), ('singular', '(o)es$', E'\\\\1'), ('singular', '(shoe)s$', E'\\\\1'), ('singular', '(cris|ax|test)es$', E'\\\\1is'), ('singular', '(octop|vir)i$', E'\\\\1us'), ('singular', '(alias|canvas|status|campus)es$', E'\\\\1'), ('singular', '^(summons)es$', E'\\\\1'), ('singular', '^(ox)en', E'\\\\1'), ('singular', '(matr)ices$', E'\\\\1ix'), ('singular', '(vert|ind)ices$', E'\\\\1ex'), ('singular', '^feet$', 'foot'), ('singular', '^teeth$', 'tooth'), ('singular', '^geese$', 'goose'), ('singular', '(quiz)zes$', E'\\\\1'), ('singular', '^(whereas)es$', E'\\\\1'), ('singular', 'ss$', 'ss'), ('singular', 's$', '')",
2108421084
"misc/inflection-26.sql": "CREATE INDEX inflection_rules_type_idx ON inflection.inflection_rules USING btree (type)",
21085+
"misc/indexes-1.sql": "CREATE INDEX CONCURRENTLY IF NOT EXISTS index_email_logs_on_created_at ON public.email_logs USING btree (created_at DESC)",
21086+
"misc/indexes-2.sql": "DROP INDEX my_index",
21087+
"misc/indexes-3.sql": "DROP INDEX CONCURRENTLY my_index",
21088+
"misc/indexes-4.sql": "DROP INDEX IF EXISTS my_index",
21089+
"misc/indexes-5.sql": "DROP INDEX CONCURRENTLY IF EXISTS my_index",
21090+
"misc/indexes-6.sql": "DROP INDEX schema.my_index",
21091+
"misc/indexes-7.sql": "DROP INDEX CONCURRENTLY schema.my_index",
21092+
"misc/indexes-8.sql": "DROP INDEX CONCURRENTLY IF EXISTS schema.my_index",
21093+
"misc/indexes-9.sql": "DROP INDEX my_index CASCADE",
21094+
"misc/indexes-10.sql": "DROP INDEX CONCURRENTLY my_index CASCADE",
21095+
"misc/indexes-11.sql": "DROP INDEX CONCURRENTLY IF EXISTS my_index CASCADE",
21096+
"misc/indexes-12.sql": "CREATE UNIQUE INDEX new_unique_idx ON new_example USING btree (a, b) INCLUDE (c)",
21097+
"misc/indexes-13.sql": "CREATE INDEX CONCURRENTLY idx_with_operator ON boom.merkle_tree USING gin (name gin_trgm_ops(param1=32, param2=true))",
2108521098
"misc/cascades-1.sql": "DROP TABLE IF EXISTS some_table CASCADE",
2108621099
"misc/cascades-2.sql": "DROP VIEW IF EXISTS some_view CASCADE",
2108721100
"misc/cascades-3.sql": "DROP MATERIALIZED VIEW IF EXISTS some_mat_view CASCADE",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CREATE INDEX CONCURRENTLY IF NOT EXISTS index_email_logs_on_created_at ON public.email_logs USING btree (created_at DESC);
2+
3+
DROP INDEX my_index;
4+
DROP INDEX CONCURRENTLY my_index;
5+
DROP INDEX IF EXISTS my_index;
6+
DROP INDEX CONCURRENTLY IF EXISTS my_index;
7+
DROP INDEX schema.my_index;
8+
DROP INDEX CONCURRENTLY schema.my_index;
9+
DROP INDEX CONCURRENTLY IF EXISTS schema.my_index;
10+
DROP INDEX my_index CASCADE;
11+
DROP INDEX CONCURRENTLY my_index CASCADE;
12+
DROP INDEX CONCURRENTLY IF EXISTS my_index CASCADE;
13+
14+
15+
CREATE UNIQUE INDEX new_unique_idx ON new_example(a, b) INCLUDE (c);
16+
17+
CREATE INDEX CONCURRENTLY idx_with_operator ON boom.merkle_tree USING GIN ( name gin_trgm_ops ( param1 = 32, param2 = true) );
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
import { FixtureTestUtils } from '../../test-utils';
3+
const fixtures = new FixtureTestUtils();
4+
5+
it('misc-indexes', async () => {
6+
await fixtures.runFixtureTests([
7+
"misc/indexes-1.sql",
8+
"misc/indexes-2.sql",
9+
"misc/indexes-3.sql",
10+
"misc/indexes-4.sql",
11+
"misc/indexes-5.sql",
12+
"misc/indexes-6.sql",
13+
"misc/indexes-7.sql",
14+
"misc/indexes-8.sql",
15+
"misc/indexes-9.sql",
16+
"misc/indexes-10.sql",
17+
"misc/indexes-11.sql",
18+
"misc/indexes-12.sql",
19+
"misc/indexes-13.sql"
20+
]);
21+
});

packages/deparser/__tests__/kitchen-sink/misc-launchql-ext-types.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11

22
import { FixtureTestUtils } from '../../test-utils';
3-
4-
53
const fixtures = new FixtureTestUtils();
64

75
it('misc-launchql-ext-types', async () => {

0 commit comments

Comments
 (0)