Skip to content

Commit 4552e03

Browse files
committed
fix templates
1 parent 5d6e28e commit 4552e03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ export class MysqlQuery extends BaseQuery {
188188
// NOTE: this template contains a comma; two order expressions are being generated
189189
templates.expressions.sort = '{{ expr }} IS NULL {% if nulls_first %}DESC{% else %}ASC{% endif %}, {{ expr }} {% if asc %}ASC{% else %}DESC{% endif %}';
190190
delete templates.expressions.ilike;
191-
templates.types.string = 'VARCHAR';
191+
templates.types.string = 'CHAR';
192192
templates.types.boolean = 'TINYINT';
193193
templates.types.timestamp = 'DATETIME';
194194
delete templates.types.interval;
195195
templates.types.binary = 'BLOB';
196196

197+
templates.expressions.concat_strings = 'CONCAT({{ strings | join(\',\' ) }})';
198+
197199
templates.filters.like_pattern = 'CONCAT({% if start_wild %}\'%\'{% else %}\'\'{% endif %}, LOWER({{ value }}), {% if end_wild %}\'%\'{% else %}\'\'{% endif %})';
198200
templates.tesseract.ilike = 'LOWER({{ expr }}) {% if negated %}NOT {% endif %}LIKE {{ pattern }}';
199201

0 commit comments

Comments
 (0)