File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/containers/Tenant/utils Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,10 @@ export const selectQueryTemplate = (params?: SchemaQueryParams) => {
88
88
const path = params ?. relativePath ? `\`${ params ?. relativePath } \`` : '${2:<my_table>}' ;
89
89
const columns =
90
90
params ?. tableData ?. map ( ( column ) => '`' + column . name + '`' ) . join ( ', ' ) || '${1:*}' ;
91
-
91
+ const filters = params ?. relativePath ? '' : 'WHERE ${3:Key1 = 1}\nORDER BY ${4:Key1}\n' ;
92
92
return `SELECT ${ columns }
93
93
FROM ${ path }
94
- WHERE \${3:Key1 = 1}
95
- ORDER BY \${4:Key1}
96
- LIMIT \${5:10};` ;
94
+ ${ filters } LIMIT \${5:10};`;
97
95
} ;
98
96
export const upsertQueryTemplate = ( params ?: SchemaQueryParams ) => {
99
97
const path = params ?. relativePath ? `\`${ params ?. relativePath } \`` : '${1:<my_table>}' ;
You can’t perform that action at this time.
0 commit comments