File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed 
packages/core/postgrest-js/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ export type IsStringOperator<Path extends string> = Path extends `${string}->>${
3030  ? true 
3131  : false 
3232
33+ const  PostgrestReservedCharsRegexp  =  new  RegExp ( '[,()]' ) 
34+ 
3335// Match relationship filters with `table.column` syntax and resolve underlying 
3436// column value. If not matched, fallback to generic type. 
3537// TODO: Validate the relationship itself ala select-query-parser. Currently we 
@@ -316,7 +318,7 @@ export default class PostgrestFilterBuilder<
316318      . map ( ( s )  =>  { 
317319        // handle postgrest reserved characters 
318320        // https://postgrest.org/en/v7.0.0/api.html#reserved-characters 
319-         if  ( typeof  s  ===  'string'  &&  new   RegExp ( '[,()]' ) . test ( s ) )  return  `"${ s }  "` 
321+         if  ( typeof  s  ===  'string'  &&  PostgrestReservedCharsRegexp . test ( s ) )  return  `"${ s }  "` 
320322        else  return  `${ s }  ` 
321323      } ) 
322324      . join ( ',' ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments