|
|
|
@ -430,11 +430,19 @@ const appendWhereCondition = function(
|
|
|
|
|
); |
|
|
|
|
break; |
|
|
|
|
case '': |
|
|
|
|
knexRef[`${key}`]( |
|
|
|
|
columnAliases[matches[2]] || matches[2], |
|
|
|
|
opMapping[matches[3]], |
|
|
|
|
matches[4] |
|
|
|
|
); |
|
|
|
|
const column = (columnAliases[matches[2]] || matches[2]); |
|
|
|
|
const operator = opMapping[matches[3]]; |
|
|
|
|
const target = matches[4]; |
|
|
|
|
if (matches[3] == 'like') { |
|
|
|
|
// handle uuid case
|
|
|
|
|
knexRef[`${key}`]( |
|
|
|
|
knexRef?.client.raw(`??::TEXT ${operator} '${target}'`, [ |
|
|
|
|
column |
|
|
|
|
]) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
knexRef[`${key}`](column, operator, target); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
throw new Error(`${matches[1] || ''} Invalid operation.`); |
|
|
|
@ -991,6 +999,7 @@ export { Knex };
|
|
|
|
|
* |
|
|
|
|
* @author Naveen MR <oof1lab@gmail.com> |
|
|
|
|
* @author Pranav C Balan <pranavxc@gmail.com> |
|
|
|
|
* @author Wing-Kam Wong <wingkwong.code@gmail.com> |
|
|
|
|
* |
|
|
|
|
* @license GNU AGPL version 3 or any later version |
|
|
|
|
* |
|
|
|
|