From 77884cbf5390d8b4fc9c95edf9bc27d2998f2a73 Mon Sep 17 00:00:00 2001 From: sylvainlap Date: Tue, 24 Oct 2017 13:33:17 +0200 Subject: [PATCH] add ilike operator --- api/databases/knexjs.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/api/databases/knexjs.md b/api/databases/knexjs.md index 211afec2..fb765f40 100644 --- a/api/databases/knexjs.md +++ b/api/databases/knexjs.md @@ -161,6 +161,26 @@ Through the REST API: /messages?text[$like]=Hello% ``` +### $ilike + +For PostgreSQL only, the keywork $ilike can be used instead of $like to make the match case insensitive. The following query retrieves all messages that start with `hello` (case insensitive): + +```js +app.service('messages').find({ + query: { + text: { + $ilike: 'hello%' + } + } +}); +``` + +Through the REST API: + +``` +/messages?text[$ilike]=hello% +``` + ## Transaction Support