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) => {
8888 const path = params ?. relativePath ? `\`${ params ?. relativePath } \`` : '${2:<my_table>}' ;
8989 const columns =
9090 params ?. tableData ?. map ( ( column ) => '`' + column . name + '`' ) . join ( ', ' ) || '${1:*}' ;
91-
91+ const filters = params ?. relativePath ? '' : 'WHERE ${3:Key1 = 1}\nORDER BY ${4:Key1}\n' ;
9292 return `SELECT ${ columns }
9393FROM ${ path }
94- WHERE \${3:Key1 = 1}
95- ORDER BY \${4:Key1}
96- LIMIT \${5:10};` ;
94+ ${ filters } LIMIT \${5:10};`;
9795} ;
9896export const upsertQueryTemplate = ( params ?: SchemaQueryParams ) => {
9997 const path = params ?. relativePath ? `\`${ params ?. relativePath } \`` : '${1:<my_table>}' ;
You can’t perform that action at this time.
0 commit comments