We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e5c356 commit 3e4ceefCopy full SHA for 3e4ceef
src/containers/Tenant/utils/schemaQueryTemplates.ts
@@ -88,12 +88,10 @@ export const selectQueryTemplate = (params?: SchemaQueryParams) => {
88
const path = params?.relativePath ? `\`${params?.relativePath}\`` : '${2:<my_table>}';
89
const columns =
90
params?.tableData?.map((column) => '`' + column.name + '`').join(', ') || '${1:*}';
91
-
+ const filters = params?.relativePath ? '' : 'WHERE ${3:Key1 = 1}\nORDER BY ${4:Key1}\n';
92
return `SELECT ${columns}
93
FROM ${path}
94
-WHERE \${3:Key1 = 1}
95
-ORDER BY \${4:Key1}
96
-LIMIT \${5:10};`;
+${filters}LIMIT \${5:10};`;
97
};
98
export const upsertQueryTemplate = (params?: SchemaQueryParams) => {
99
const path = params?.relativePath ? `\`${params?.relativePath}\`` : '${1:<my_table>}';
0 commit comments