@@ -2,31 +2,20 @@ import dedent from 'dedent-js';
2
2
3
3
import { format as originalFormat , FormatFn } from '../src/sqlFormatter.js' ;
4
4
5
- import behavesLikeSqlFormatter from './behavesLikeSqlFormatter.js' ;
6
- import supportsAlterTable from './features/alterTable.js' ;
7
- import supportsBetween from './features/between.js' ;
8
5
import supportsCreateTable from './features/createTable.js' ;
9
6
import supportsDropTable from './features/dropTable.js' ;
10
7
import supportsJoin from './features/join.js' ;
11
8
import supportsOperators from './features/operators.js' ;
12
9
import supportsSchema from './features/schema.js' ;
13
10
import supportsStrings from './features/strings.js' ;
14
- import supportsReturning from './features/returning.js' ;
15
11
import supportsConstraints from './features/constraints.js' ;
16
- import supportsDeleteFrom from './features/deleteFrom.js' ;
17
- import supportsComments from './features/comments.js' ;
18
- import supportsCommentOn from './features/commentOn.js' ;
19
12
import supportsIdentifiers from './features/identifiers.js' ;
20
13
import supportsParams from './options/param.js' ;
21
- import supportsArrayAndMapAccessors from './features/arrayAndMapAccessors.js' ;
22
- import supportsWindow from './features/window.js' ;
23
14
import supportsSetOperations from './features/setOperations.js' ;
24
15
import supportsLimiting from './features/limiting.js' ;
25
- import supportsInsertInto from './features/insertInto.js' ;
26
16
import supportsUpdate from './features/update.js' ;
27
17
import supportsTruncateTable from './features/truncateTable.js' ;
28
18
import supportsCreateView from './features/createView.js' ;
29
- import supportsOnConflict from './features/onConflict.js' ;
30
19
import supportsIsDistinctFrom from './features/isDistinctFrom.js' ;
31
20
import supportsArrayLiterals from './features/arrayLiterals.js' ;
32
21
import supportsDataTypeCase from './options/dataTypeCase.js' ;
@@ -36,30 +25,16 @@ describe('PostgreSqlFormatter', () => {
36
25
const language = 'postgresql' ;
37
26
const format : FormatFn = ( query , cfg = { } ) => originalFormat ( query , { ...cfg , language } ) ;
38
27
39
- behavesLikeSqlFormatter ( format ) ;
40
28
behavesLikePostgresqlFormatter ( format ) ;
41
- supportsComments ( format , { nestedBlockComments : true } ) ;
42
- supportsCommentOn ( format ) ;
43
29
supportsCreateView ( format , { orReplace : true , materialized : true , ifNotExists : true } ) ;
44
30
supportsCreateTable ( format , { ifNotExists : true } ) ;
45
31
supportsDropTable ( format , { ifExists : true } ) ;
46
32
supportsConstraints ( format , [ 'NO ACTION' , 'RESTRICT' , 'CASCADE' , 'SET NULL' , 'SET DEFAULT' ] ) ;
47
33
supportsArrayLiterals ( format , { withArrayPrefix : true } ) ;
48
- supportsArrayAndMapAccessors ( format ) ;
49
- supportsAlterTable ( format , {
50
- addColumn : true ,
51
- dropColumn : true ,
52
- renameTo : true ,
53
- renameColumn : true ,
54
- } ) ;
55
- supportsDeleteFrom ( format ) ;
56
- supportsInsertInto ( format ) ;
57
- supportsOnConflict ( format ) ;
58
34
supportsUpdate ( format , { whereCurrentOf : true } ) ;
59
35
supportsTruncateTable ( format , { withoutTable : true } ) ;
60
36
supportsStrings ( format , [ "''-qq" , "U&''" , "X''" , "B''" , "E''" , '$$' ] ) ;
61
37
supportsIdentifiers ( format , [ `""-qq` , 'U&""' ] ) ;
62
- supportsBetween ( format ) ;
63
38
supportsSchema ( format ) ;
64
39
// Missing: '::' type cast (tested separately)
65
40
supportsOperators (
@@ -160,9 +135,7 @@ describe('PostgreSqlFormatter', () => {
160
135
supportsIsDistinctFrom ( format ) ;
161
136
supportsJoin ( format ) ;
162
137
supportsSetOperations ( format ) ;
163
- supportsReturning ( format ) ;
164
138
supportsParams ( format , { numbered : [ '$' ] } ) ;
165
- supportsWindow ( format ) ;
166
139
supportsLimiting ( format , { limit : true , offset : true , fetchFirst : true , fetchNext : true } ) ;
167
140
supportsDataTypeCase ( format ) ;
168
141
0 commit comments