File tree 2 files changed +9
-10
lines changed
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const Page = observer(function Page() {
49
49
50
50
< div > Wrapped query:</ div >
51
51
52
- < div className = "rounded bg-blue-50 form-textarea w-full whitespace-pre-wrap text-sm" >
52
+ < div className = "font-mono rounded bg-blue-50 form-textarea w-full whitespace-pre-wrap text-sm" >
53
53
{ parsed }
54
54
</ div >
55
55
</ div >
Original file line number Diff line number Diff line change @@ -75,15 +75,14 @@ function generateJsonQuery(queries: Query[]) {
75
75
const columns = parseOne ( query ) ;
76
76
if ( ! columns || columns . length === 0 ) continue ;
77
77
parts . push ( ` '${ query . name } ',
78
- (
79
- select json_group_array(
80
- json_object(${ columns . map ( ( col ) => `'${ col } ', ${ col } ` ) . join ( ', ' ) } )
81
- )
82
- from
83
- (
84
- ${ indentString ( query . sql , 8 ) }
85
- )
86
- )` ) ;
78
+ (
79
+ select json_group_array(
80
+ json_object(${ columns . map ( ( col ) => `'${ col } ', ${ col } ` ) . join ( ', ' ) } )
81
+ )
82
+ from (
83
+ ${ indentString ( query . sql , 6 ) }
84
+ )
85
+ )` ) ;
87
86
}
88
87
89
88
const result = `select json_object(
You can’t perform that action at this time.
0 commit comments