Skip to content

Commit 046ebc7

Browse files
committed
add test for mixed case null defaults
1 parent 7a7b1a7 commit 046ebc7

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

test/expected/function_calls_default_args.out

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ begin;
193193
}
194194
(1 row)
195195

196+
create function defaul_null_mixed_case(
197+
a smallint default null,
198+
b integer default NULL,
199+
c integer default NuLl
200+
)
201+
returns text language plpgsql immutable
202+
as $$
203+
begin
204+
return 'mixed case';
205+
end;
206+
$$;
196207
select jsonb_pretty(
197208
graphql.resolve($$
198209
query IntrospectionQuery {
@@ -250,6 +261,38 @@ begin;
250261
], +
251262
"name": "bothArgsOptional" +
252263
}, +
264+
{ +
265+
"args": [ +
266+
{ +
267+
"name": "a", +
268+
"type": { +
269+
"kind": "SCALAR", +
270+
"name": "Int", +
271+
"ofType": null +
272+
}, +
273+
"defaultValue": null +
274+
}, +
275+
{ +
276+
"name": "b", +
277+
"type": { +
278+
"kind": "SCALAR", +
279+
"name": "Int", +
280+
"ofType": null +
281+
}, +
282+
"defaultValue": null +
283+
}, +
284+
{ +
285+
"name": "c", +
286+
"type": { +
287+
"kind": "SCALAR", +
288+
"name": "Int", +
289+
"ofType": null +
290+
}, +
291+
"defaultValue": null +
292+
} +
293+
], +
294+
"name": "defaulNullMixedCase" +
295+
}, +
253296
{ +
254297
"args": [ +
255298
{ +

test/sql/function_calls_default_args.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@ begin;
148148
}
149149
$$));
150150

151+
create function defaul_null_mixed_case(
152+
a smallint default null,
153+
b integer default NULL,
154+
c integer default NuLl
155+
)
156+
returns text language plpgsql immutable
157+
as $$
158+
begin
159+
return 'mixed case';
160+
end;
161+
$$;
162+
151163
select jsonb_pretty(
152164
graphql.resolve($$
153165
query IntrospectionQuery {

0 commit comments

Comments
 (0)