mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 18:08:11 +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', |   '$in', | ||||||
|   '$notIn', |   '$notIn', | ||||||
|   '$eq', |   '$eq', | ||||||
|  |   '$eqsi', | ||||||
|   '$ne', |   '$ne', | ||||||
|   '$gt', |   '$gt', | ||||||
|   '$gte', |   '$gte', | ||||||
| @ -221,6 +222,15 @@ const applyOperator = (qb, column, operator, value) => { | |||||||
|       qb.where(column, value); |       qb.where(column, value); | ||||||
|       break; |       break; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     case '$eqsi': { | ||||||
|  |       if (value === null) { | ||||||
|  |         qb.whereNull(column); | ||||||
|  |         break; | ||||||
|  |       } | ||||||
|  |       qb.whereRaw(`${fieldLowerFn(qb)} LIKE LOWER(?)`, [column, `${value}`]); | ||||||
|  |       break; | ||||||
|  |     } | ||||||
|     case '$ne': { |     case '$ne': { | ||||||
|       if (value === null) { |       if (value === null) { | ||||||
|         qb.whereNotNull(column); |         qb.whereNotNull(column); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 meherchandan
						meherchandan