mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-20 23:44:09 +02:00
Insert all columns for every chunk
This commit is contained in:
parent
ea87c2b943
commit
3901f43c6a
1 changed files with 8 additions and 0 deletions
|
|
@ -1074,6 +1074,14 @@ class Table(Queryable):
|
||||||
all_columns = list(sorted(all_columns))
|
all_columns = list(sorted(all_columns))
|
||||||
if hash_id:
|
if hash_id:
|
||||||
all_columns.insert(0, hash_id)
|
all_columns.insert(0, hash_id)
|
||||||
|
else:
|
||||||
|
all_columns += [
|
||||||
|
column
|
||||||
|
for record in chunk
|
||||||
|
for column in record
|
||||||
|
if column not in all_columns
|
||||||
|
]
|
||||||
|
|
||||||
validate_column_names(all_columns)
|
validate_column_names(all_columns)
|
||||||
first = False
|
first = False
|
||||||
# values is the list of insert data that is passed to the
|
# values is the list of insert data that is passed to the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue