We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 701db81 commit 7b89a39Copy full SHA for 7b89a39
test/operations/functions/dropFunction.spec.ts
@@ -29,6 +29,23 @@ describe('operations', () => {
29
'DROP FUNCTION IF EXISTS "sqrt"(integer) CASCADE;'
30
);
31
});
32
+
33
+ it('should ignore default values in function parameters when dropping function', () => {
34
+ const params = [
35
+ {
36
+ name: 'x',
37
+ type: 'integer',
38
+ default: 10,
39
+ },
40
+ ];
41
42
+ const statement = dropFunctionFn('func_with_default', params);
43
44
+ expect(statement).toBeTypeOf('string');
45
+ expect(statement).toBe(
46
+ 'DROP FUNCTION "func_with_default"("x" integer);'
47
+ );
48
+ });
49
50
51
0 commit comments