Closed nabe1653 closed 5 months ago
Describe the bug
"varchar || varchar" value will be string but resolved as "string | null"
This is happedned even if both values are static string or not null column.
Expected behavior
Resolve as string.
Test case
Tested with "@pgtyped/cli": "^2.2.1" with node v18.15.0.
"@pgtyped/cli": "^2.2.1"
Below sql will return string | null:
string | null
/* @name test */ SELECT 'a' || 'b' as not_null_string ;
/** 'Test' return type */ export interface ITestResult { not_null_string: string | null; }
So sorry, I forgot export name can use ! assertion too.
!
/* @name test */ SELECT 'a' || 'b' as "not_null_string!" ;
Describe the bug
"varchar || varchar" value will be string but resolved as "string | null"
This is happedned even if both values are static string or not null column.
Expected behavior
Resolve as string.
Test case
Tested with
"@pgtyped/cli": "^2.2.1"
with node v18.15.0.Below sql will return
string | null
: