File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pg.types.setTypeParser(pg.types.builtins.INT8, (x) => {
1212 }
1313} )
1414pg . types . setTypeParser ( pg . types . builtins . DATE , ( x ) => x )
15+ pg . types . setTypeParser ( pg . types . builtins . INTERVAL , ( x ) => x )
1516pg . types . setTypeParser ( pg . types . builtins . TIMESTAMP , ( x ) => x )
1617pg . types . setTypeParser ( pg . types . builtins . TIMESTAMPTZ , ( x ) => x )
1718pg . types . setTypeParser ( 1115 , parseArray ) // _timestamp
Original file line number Diff line number Diff line change @@ -539,3 +539,21 @@ test('very big number', async () => {
539539 ]
540540 ` )
541541} )
542+
543+ // issue: https://github.com/supabase/supabase/issues/27626
544+ test ( 'return interval as string' , async ( ) => {
545+ const res = await app . inject ( {
546+ method : 'POST' ,
547+ path : '/query' ,
548+ payload : {
549+ query : `SELECT '1 day 1 hour 45 minutes'::interval` ,
550+ } ,
551+ } )
552+ expect ( res . json ( ) ) . toMatchInlineSnapshot ( `
553+ [
554+ {
555+ "interval": "1 day 01:45:00",
556+ },
557+ ]
558+ ` )
559+ } )
You can’t perform that action at this time.
0 commit comments