mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	fix: added new eqsi operator for case insensitive equal search
This commit is contained in:
		
							parent
							
								
									86e57e17f4
								
							
						
					
					
						commit
						f6dca134e9
					
				| @ -13,6 +13,7 @@ const OPERATORS = [ | ||||
|   '$in', | ||||
|   '$notIn', | ||||
|   '$eq', | ||||
|   '$eqsi', | ||||
|   '$ne', | ||||
|   '$gt', | ||||
|   '$gte', | ||||
| @ -221,6 +222,15 @@ const applyOperator = (qb, column, operator, value) => { | ||||
|       qb.where(column, value); | ||||
|       break; | ||||
|     } | ||||
| 
 | ||||
|     case '$eqsi': { | ||||
|       if (value === null) { | ||||
|         qb.whereNull(column); | ||||
|         break; | ||||
|       } | ||||
|       qb.whereRaw(`${fieldLowerFn(qb)} LIKE LOWER(?)`, [column, `${value}`]); | ||||
|       break; | ||||
|     } | ||||
|     case '$ne': { | ||||
|       if (value === null) { | ||||
|         qb.whereNotNull(column); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 meherchandan
						meherchandan