sqlalchemy-query-helpers 1.0.101__tar.gz → 1.0.102__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sqlalchemy-query-helpers might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlalchemy-query-helpers
3
- Version: 1.0.101
3
+ Version: 1.0.102
4
4
  Summary: Some helpers for SQLAlchemy
5
5
  Author-email: vladiscripts <blagopoluchie12@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/vladiscripts/sqlalchemy-query-helpers
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sqlalchemy-query-helpers"
7
- version = "1.0.101"
7
+ version = "1.0.102"
8
8
  authors = [
9
9
  { name = "vladiscripts", email = "blagopoluchie12@gmail.com" },
10
10
  ]
@@ -230,7 +230,8 @@ class DB:
230
230
  stmt = insert(t).values(rows_to_insert)
231
231
  # need to remove primary or unique keys on using, else will error
232
232
  if filter_unque_primary_keys:
233
- update_dict = {x.name: x for x in stmt.inserted for c in t._sa_class_manager.mapper.columns._all_columns
233
+ table_columns = t.columns._all_columns if isinstance(t, Table) else t._sa_class_manager.mapper.columns._all_columns
234
+ update_dict = {x.name: x for x in stmt.inserted for c in table_columns
234
235
  if x.name == c.name and c.unique is not True and c.primary_key is not True}
235
236
  else:
236
237
  update_dict = {x.name: x for x in stmt.inserted}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlalchemy-query-helpers
3
- Version: 1.0.101
3
+ Version: 1.0.102
4
4
  Summary: Some helpers for SQLAlchemy
5
5
  Author-email: vladiscripts <blagopoluchie12@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/vladiscripts/sqlalchemy-query-helpers