@kenniy/godeye-data-contracts
Version:
Enterprise-grade base repository architecture for GOD-EYE microservices with zero overhead and maximum code reuse
17 lines (16 loc) • 387 B
JavaScript
;
/**
* Query building utilities
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryUtils = void 0;
class QueryUtils {
static buildSearchQuery(term, fields) {
return {
$or: fields.map(field => ({
[field]: { $regex: term, $options: 'i' }
}))
};
}
}
exports.QueryUtils = QueryUtils;