File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ CREATE UNIQUE INDEX uniq_service_when_not_null
1010 ON schema2 .table3 (uid, svc)
1111 WHERE svc IS NOT NULL ;
1212
13- CREATE UNIQUE INDEX new_unique_idx ON new_example(a, b) INCLUDE (c);
13+ CREATE UNIQUE INDEX new_unique_idx ON new_example(a, b) INCLUDE (c);
14+
15+ CREATE INDEX CONCURRENTLY idx_with_operator ON boom .merkle_tree USING GIN ( name gin_trgm_ops ( param1 = 32 , param2 = true) );
Original file line number Diff line number Diff line change @@ -25962,6 +25962,73 @@ exports[`kitchen sink indexes 9`] = `
2596225962
2596325963exports[`kitchen sink indexes 10`] = `"CREATE UNIQUE INDEX new_unique_idx ON new_example ( a, b ) INCLUDE ( c );"`;
2596425964
25965+ exports[`kitchen sink indexes 11`] = `
25966+ {
25967+ "RawStmt": {
25968+ "stmt": {
25969+ "IndexStmt": {
25970+ "accessMethod": "gin",
25971+ "concurrent": true,
25972+ "idxname": "idx_with_operator",
25973+ "indexParams": [
25974+ {
25975+ "IndexElem": {
25976+ "name": "name",
25977+ "nulls_ordering": "SORTBY_NULLS_DEFAULT",
25978+ "opclass": [
25979+ {
25980+ "String": {
25981+ "str": "gin_trgm_ops",
25982+ },
25983+ },
25984+ ],
25985+ "opclassopts": [
25986+ {
25987+ "DefElem": {
25988+ "arg": {
25989+ "Integer": {
25990+ "ival": 32,
25991+ },
25992+ },
25993+ "defaction": "DEFELEM_UNSPEC",
25994+ "defname": "param1",
25995+ "location": 624,
25996+ },
25997+ },
25998+ {
25999+ "DefElem": {
26000+ "arg": {
26001+ "String": {
26002+ "str": "true",
26003+ },
26004+ },
26005+ "defaction": "DEFELEM_UNSPEC",
26006+ "defname": "param2",
26007+ "location": 637,
26008+ },
26009+ },
26010+ ],
26011+ "ordering": "SORTBY_DEFAULT",
26012+ },
26013+ },
26014+ ],
26015+ "relation": {
26016+ "inh": true,
26017+ "location": 575,
26018+ "relname": "merkle_tree",
26019+ "relpersistence": "p",
26020+ "schemaname": "boom",
26021+ },
26022+ },
26023+ },
26024+ "stmt_len": 127,
26025+ "stmt_location": 526,
26026+ },
26027+ }
26028+ `;
26029+
26030+ exports[`kitchen sink indexes 12`] = `"CREATE INDEX CONCURRENTLY idx_with_operator ON boom.merkle_tree USING GIN ( name gin_trgm_ops ( param1 = 32, param2 = true ) );"`;
26031+
2596526032exports[`kitchen sink insert 1`] = `
2596626033{
2596726034 "RawStmt": {
Original file line number Diff line number Diff line change @@ -1548,6 +1548,14 @@ export default class Deparser {
15481548 const output = [ ] ;
15491549 if ( node . name ) {
15501550 output . push ( node . name ) ;
1551+ if ( node . opclass && node . opclass . length ) {
1552+ output . push ( this . deparse ( node . opclass [ 0 ] ) ) ;
1553+ }
1554+ if ( node . opclassopts && node . opclassopts . length ) {
1555+ output . push ( '(' ) ;
1556+ output . push ( node . opclassopts . map ( ( opclassopt ) => this . deparse ( opclassopt ) ) . join ( ', ' ) ) ;
1557+ output . push ( ')' ) ;
1558+ }
15511559 if ( node . ordering === 'SORTBY_DESC' ) {
15521560 output . push ( 'DESC' ) ;
15531561 } else if ( node . ordering === 'SORTBY_ASC' ) {
You can’t perform that action at this time.
0 commit comments