File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,14 @@ def run_callback(self, results):
7979 self ._add [index ].id = row ['id' ]
8080
8181 def __str__ (self ):
82- columns = ',' .join ([i .name for i in self .table .Meta .columns ])
83- values = ',' .join (i .__str__ () for i in self ._add )
84- query = f'{ self .base } ({ columns } ) VALUES { values } RETURNING id'
82+ base = f'INSERT INTO "{ self .table .Meta .tablename } "'
83+ columns = ',' .join (
84+ [i .name for i in self .table .Meta .columns ]
85+ )
86+ values = ',' .join (
87+ i .__str__ () for i in self ._add
88+ )
89+ query = f'{ base } ({ columns } ) VALUES { values } RETURNING id'
8590 return query
8691
8792
Original file line number Diff line number Diff line change @@ -200,7 +200,6 @@ def insert(cls, *rows: 'Table') -> Insert:
200200 """
201201 query = Insert (
202202 table = cls ,
203- base = f'INSERT INTO "{ cls .Meta .tablename } "' ,
204203 )
205204 if rows :
206205 query .add (* rows )
@@ -298,7 +297,6 @@ def exists(cls) -> Exists:
298297 """
299298 return Exists (
300299 table = cls ,
301- base = ''
302300 )
303301
304302 @classmethod
You can’t perform that action at this time.
0 commit comments