Refactor AnalyticsDatabaseService and Statement classes

This commit is contained in:
Simon Larsen 2024-02-22 11:41:49 +00:00
parent c9df4deb16
commit ed601cc187
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
2 changed files with 3 additions and 6 deletions

View File

@ -331,7 +331,6 @@ export default class AnalyticsDatabaseService<
`); `);
/* eslint-enable prettier/prettier */ /* eslint-enable prettier/prettier */
logger.info(`${this.model.tableName} Find Statement`); logger.info(`${this.model.tableName} Find Statement`);
logger.info(statement); logger.info(statement);

View File

@ -103,11 +103,9 @@ export class Statement implements BaseQueryParams {
finalValue = v.value.value; finalValue = v.value.value;
} else if (v.value instanceof Includes) { } else if (v.value instanceof Includes) {
if (v.type === TableColumnType.Text) { if (v.type === TableColumnType.Text) {
finalValue = v.value.values finalValue = v.value.values.map((val: string | ObjectID) => {
.map((val: string | ObjectID) => { return `'${val.toString()}'`;
return `'${val.toString()}'`; });
})
.join(',');
} else { } else {
finalValue = v.value.values; finalValue = v.value.values;
} }