mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
filters implemented
This commit is contained in:
parent
c36754b662
commit
57f96241f1
@ -183,6 +183,7 @@ export default class BaseAPI<
|
||||
query = JSONFunctions.deserialize(
|
||||
req.body['query']
|
||||
) as Query<BaseModel>;
|
||||
debugger;
|
||||
select = JSONFunctions.deserialize(
|
||||
req.body['select']
|
||||
) as Select<BaseModel>;
|
||||
|
@ -868,6 +868,7 @@ class DatabaseService<TBaseModel extends BaseModel> {
|
||||
(query[key] as ObjectID).toString() as any
|
||||
) as any;
|
||||
} else if (query[key] && query[key] instanceof Search) {
|
||||
debugger;
|
||||
query[key] = QueryHelper.search(
|
||||
(query[key] as Search).toString() as any
|
||||
) as any;
|
||||
|
@ -21,7 +21,7 @@ export default class QueryHelper {
|
||||
const rid: string = Text.generateRandomText(10);
|
||||
return Raw(
|
||||
(alias: string) => {
|
||||
return `LOWER(${alias}) = :${rid}`;
|
||||
return `LOWER(${alias}) LIKE (:${rid})`;
|
||||
},
|
||||
{
|
||||
[rid]: `%${name}%`,
|
||||
|
@ -22,6 +22,7 @@ import LocalCache from '../Infrastructure/LocalCache';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusCode from 'Common/Types/API/StatusCode';
|
||||
import Typeof from 'Common/Types/Typeof';
|
||||
// import OpenTelemetrySDK from "./OpenTelemetry";
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
Loading…
Reference in New Issue
Block a user