diff --git a/lib/index.js b/lib/index.js index 865e963..6388ebd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -310,6 +310,14 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter { } } + for (const field in options.fuzzyMatch) { + let value = options.fuzzyMatch[field] + //We assume the request has been validaded on another level. (so only strings, no arrays, etc...) + index++ + parameters.push(inputValue(value)) + where.push(`"${field}" ~* $${index}`) + } + where = where.length ? `where ${where.join(' and ')}` : '' for (const field in options.sort) {