[英]Wanted to use like query in lbservices for angular
我想查詢以p開頭的所有名稱(不區分大小寫)。 下面是查詢對象,Organization是我生成的lb-service名稱
query = {
filter: {
order: 'updatedAt ASC',
where: {name: {ilike: 'P%'}}
};
Organisation.find({filter: query.filter})
你可以使用正則表達式 。
Organisation.find({name: {$regex: new RegExp('^P$', "i")}}).sort('updatedAt').all(function(res) {
//Do your action here..
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.