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 55
66from .escape import escape_params
77
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 )
99
1010
1111class 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):
829829 a .headline = "Updated headline"
830830 a .save ()
831831 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