File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
clickhouse_backend/driver Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from .escape import escape_params
7
7
8
- insert_pattern = re .compile (r'\s*insert\s+into' , flags = re .IGNORECASE )
8
+ insert_pattern = re .compile (r'\s*insert\s+into.+?values\s* ' , flags = re .IGNORECASE )
9
9
10
10
11
11
class Client (client .Client ):
Original file line number Diff line number Diff line change @@ -829,3 +829,10 @@ def test_saving_an_object_again_does_not_create_a_new_object(self):
829
829
a .headline = "Updated headline"
830
830
a .save ()
831
831
self .assertEqual (a .id , current_id )
832
+
833
+
834
+ class RawSQLTest (TestCase ):
835
+ def test_insert_select (self ):
836
+ table = Article ._meta .db_table
837
+ with connections [DEFAULT_DB_ALIAS ].cursor () as cursor :
838
+ cursor .execute (f'insert into { table } select * from { table } ' )
You can’t perform that action at this time.
0 commit comments