私はあなたのテストテーブルにcreatedAtフィールドとupdatedAtフィールドを追加して設定しました。
私はSequelizeのfeathersjsモデルを使用 - > MySQLの
表:
IDテキストフィールド
1アンドレアス
私はあなたのGETのクエリをテストするために郵便配達を使用:
localhost:3030/table?textfield[$like]=andreas
returns:
{
"total": 1,
"limit": 20,
"skip": 0,
"data": [
{
"id": 1,
"textfield": "andreas",
"createdAt": "2017-06-05T11:33:38.000Z",
"updatedAt": null
}
]
}
localhost:3030/table?textfield[$like]=andrea%
returns:
{
"total": 1,
"limit": 20,
"skip": 0,
"data": [
{
"id": 1,
"textfield": "andreas",
"createdAt": "2017-06-05T11:33:38.000Z",
"updatedAt": null
}
]
}
localhost:3030/table?textfield[$like]=%drea%
returns:
{
"total": 1,
"limit": 20,
"skip": 0,
"data": [
{
"id": 1,
"textfield": "andreas",
"createdAt": "2017-06-05T11:33:38.000Z",
"updatedAt": null
}
]
}
次のクエリは何も返しません。なぜなら、 'andr EAは」正確にデータベースに一致させることができないと、アスタリスク(*)は、SQL LIKE構文https://www.w3schools.com/SQL/sql_like.aspでワイルドカードではありません。
localhost:3030/table?textfield[$like]=andrea
localhost:3030/table?textfield[$like]=andrea*
{
"total": 0,
"limit": 20,
"skip": 0,
"data": []
}
あなたにいくつかの情報を与えるためにこれを見て、[発行](https://でgithub.com/feathersjs/feathers/issues/334) – HorseT