BezdarSQL 1.1.1__tar.gz → 1.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BezdarSQL
3
- Version: 1.1.1
3
+ Version: 1.2.2
4
4
  Summary: My little SQL ORM for the ones who called bezdars
5
5
  Author-email: boliklevik@gmail.com
6
6
  Dynamic: author-email
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BezdarSQL
3
- Version: 1.1.1
3
+ Version: 1.2.2
4
4
  Summary: My little SQL ORM for the ones who called bezdars
5
5
  Author-email: boliklevik@gmail.com
6
6
  Dynamic: author-email
@@ -141,11 +141,11 @@ def update(table, **kwargs):
141
141
  request = f'update {table.__tablename__} set '
142
142
  values = kwargs['values']
143
143
  for index, value in enumerate(values):
144
- request += f'{value}={repr(values[value])} ' + (', ' if index + 1 != len(values) else 'where ')
144
+ request += f'{value.name}={repr(values[value])} ' + (', ' if index + 1 != len(values) else 'where ')
145
145
 
146
146
  where_s = kwargs['where']
147
147
  for index, where in enumerate(where_s):
148
- request += f'{where}={repr(where_s[where])} ' + (', ' if index + 1 != len(where_s) else ';')
148
+ request += f'{where.owner.__tablename__}.{where.name}={repr(where_s[where])} ' + (', ' if index + 1 != len(where_s) else ';')
149
149
 
150
150
  try:
151
151
  with psycopg2.connect(
@@ -169,7 +169,7 @@ def delete(table, **kwargs):
169
169
  request = f'delete from {table.__tablename__} where '
170
170
  where_s = kwargs['where']
171
171
  for index, where in enumerate(where_s):
172
- request += f'{where}={repr(where_s[where])} ' + ('and ' if index + 1 != len(where_s) else ';')
172
+ request += f'{where.owner.__tablename__}.{where.name}={repr(where_s[where])}' + ('and ' if index + 1 != len(where_s) else ';')
173
173
 
174
174
  try:
175
175
  with psycopg2.connect(
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup
2
2
 
3
3
  setup(name='BezdarSQL',
4
- version='1.1.1',
4
+ version='1.2.2',
5
5
  description='My little SQL ORM for the ones who called bezdars',
6
6
  packages=['bezdarsql'],
7
7
  author_email='boliklevik@gmail.com',
File without changes
File without changes
File without changes