3
3
from deprecation import deprecated
4
4
from httpx import AsyncClient
5
5
6
- from postgrest_py .utils import sanitize_param , sanitize_pattern_param
7
6
from postgrest_py .__version__ import __version__
7
+ from postgrest_py .utils import sanitize_param , sanitize_pattern_param
8
8
9
9
10
10
class RequestBuilder :
@@ -13,7 +13,7 @@ def __init__(self, session: AsyncClient, path: str):
13
13
self .path = path
14
14
15
15
def select (self , * columns : str ):
16
- self .session .params [ "select" ] = "," .join (columns )
16
+ self .session .params = self . session . params . set ( "select" , "," .join (columns ) )
17
17
return SelectRequestBuilder (self .session , self .path , "GET" , {})
18
18
19
19
def insert (self , json : dict , * , upsert = False ):
@@ -59,10 +59,7 @@ def filter(self, column: str, operator: str, criteria: str):
59
59
self .negate_next = False
60
60
operator = f"not.{ operator } "
61
61
key , val = sanitize_param (column ), f"{ operator } .{ criteria } "
62
- if key in self .session .params :
63
- self .session .params .update ({key : self .session .params .get_list (key ) + [val ]})
64
- else :
65
- self .session .params [key ] = val
62
+ self .session .params = self .session .params .add (key , val )
66
63
return self
67
64
68
65
def eq (self , column : str , value : str ):
0 commit comments