wcp-library 1.2.7__py3-none-any.whl → 1.2.9__py3-none-any.whl
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.
- wcp_library/async_sql/oracle.py +4 -2
- wcp_library/async_sql/postgres.py +4 -2
- wcp_library/sql/oracle.py +4 -2
- wcp_library/sql/postgres.py +4 -2
- {wcp_library-1.2.7.dist-info → wcp_library-1.2.9.dist-info}/METADATA +1 -1
- {wcp_library-1.2.7.dist-info → wcp_library-1.2.9.dist-info}/RECORD +7 -7
- {wcp_library-1.2.7.dist-info → wcp_library-1.2.9.dist-info}/WHEEL +0 -0
wcp_library/async_sql/oracle.py
CHANGED
@@ -199,11 +199,13 @@ class AsyncOracleConnection(object):
|
|
199
199
|
"""
|
200
200
|
|
201
201
|
df = dfObj[match_cols]
|
202
|
-
match_cols = ', '.join(match_cols)
|
203
202
|
param_list = []
|
204
203
|
for column in match_cols:
|
205
204
|
param_list.append(f"{column} = :{column}")
|
206
|
-
|
205
|
+
if len(param_list) > 1:
|
206
|
+
params = ' AND '.join(param_list)
|
207
|
+
else:
|
208
|
+
params = param_list[0]
|
207
209
|
|
208
210
|
main_dict = df.to_dict('records')
|
209
211
|
query = f"""DELETE FROM {outputTableName} WHERE {params}"""
|
@@ -182,11 +182,13 @@ class AsyncPostgresConnection(object):
|
|
182
182
|
"""
|
183
183
|
|
184
184
|
df = dfObj[match_cols]
|
185
|
-
match_cols = ', '.join(match_cols)
|
186
185
|
param_list = []
|
187
186
|
for column in match_cols:
|
188
187
|
param_list.append(f"{column} = %({column})s")
|
189
|
-
|
188
|
+
if len(param_list) > 1:
|
189
|
+
params = ' AND '.join(param_list)
|
190
|
+
else:
|
191
|
+
params = param_list[0]
|
190
192
|
|
191
193
|
main_dict = df.to_dict('records')
|
192
194
|
query = """DELETE FROM {} WHERE {}""".format(outputTableName, params)
|
wcp_library/sql/oracle.py
CHANGED
@@ -203,11 +203,13 @@ class OracleConnection(object):
|
|
203
203
|
"""
|
204
204
|
|
205
205
|
df = dfObj[match_cols]
|
206
|
-
match_cols = ', '.join(match_cols)
|
207
206
|
param_list = []
|
208
207
|
for column in match_cols:
|
209
208
|
param_list.append(f"{column} = :{column}")
|
210
|
-
|
209
|
+
if len(param_list) > 1:
|
210
|
+
params = ' AND '.join(param_list)
|
211
|
+
else:
|
212
|
+
params = param_list[0]
|
211
213
|
|
212
214
|
main_dict = df.to_dict('records')
|
213
215
|
query = f"""DELETE FROM {outputTableName} WHERE {params}"""
|
wcp_library/sql/postgres.py
CHANGED
@@ -183,11 +183,13 @@ class PostgresConnection(object):
|
|
183
183
|
"""
|
184
184
|
|
185
185
|
df = dfObj[match_cols]
|
186
|
-
match_cols = ', '.join(match_cols)
|
187
186
|
param_list = []
|
188
187
|
for column in match_cols:
|
189
188
|
param_list.append(f"{column} = %({column})s")
|
190
|
-
|
189
|
+
if len(param_list) > 1:
|
190
|
+
params = ' AND '.join(param_list)
|
191
|
+
else:
|
192
|
+
params = param_list[0]
|
191
193
|
|
192
194
|
main_dict = df.to_dict('records')
|
193
195
|
query = """DELETE FROM {} WHERE {}""".format(outputTableName, params)
|
@@ -4,8 +4,8 @@ wcp_library/async_credentials/api.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
4
4
|
wcp_library/async_credentials/oracle.py,sha256=MvC7wsHnSyAyPGnRVlH0dvvW2xk5ap_IAByoHX4rUWY,5436
|
5
5
|
wcp_library/async_credentials/postgres.py,sha256=3wjqtLH0Nc-U80iscYnz5DV-9M2X4IjPW51C5MI2_tI,5297
|
6
6
|
wcp_library/async_sql/__init__.py,sha256=m4eWmUGYUEDomhhOp1ScB2uSIXFsNUNO589o5RwWdyM,1035
|
7
|
-
wcp_library/async_sql/oracle.py,sha256=
|
8
|
-
wcp_library/async_sql/postgres.py,sha256=
|
7
|
+
wcp_library/async_sql/oracle.py,sha256=RgPvHHZmD6s1BlttjZ112-0VZ45M2J-essDR5-vpiDw,7965
|
8
|
+
wcp_library/async_sql/postgres.py,sha256=oy0lybtd4i6PsiDabU0Ll-I-amuykawAgtqHNJUyPkM,7493
|
9
9
|
wcp_library/credentials/__init__.py,sha256=HRmg7mqcATeclIz3lZQjSR4nmK6aY6MK9-QXEYZoFrw,1857
|
10
10
|
wcp_library/credentials/ftp.py,sha256=FRxKVWifz7olQIrSjDgkTqk7rmc7Zdwmkfq7b62DQY8,4965
|
11
11
|
wcp_library/credentials/oracle.py,sha256=IJVGd10LH5LUNKUSFAbApi0sjR1AbloMJRHTuR9zFrQ,5095
|
@@ -18,8 +18,8 @@ wcp_library/informatica.py,sha256=IXZtk_9X1XLbOEwFrsyOwTgajQKvtXgANBHmuTOP3Kk,40
|
|
18
18
|
wcp_library/logging.py,sha256=e6gG7HFgUrMajUZs4Gs0atFfOJJmdmxN0GerfynNWlY,2061
|
19
19
|
wcp_library/selenium_helper.py,sha256=rlphTXsUgnbaXZknY5nfQqxFhnc7UmrpzhV3hQ-cv7k,2509
|
20
20
|
wcp_library/sql/__init__.py,sha256=CLlBEBrWVAwE79bUxuQiwikSrYH8m9QRYSJ2l0-ofsY,1003
|
21
|
-
wcp_library/sql/oracle.py,sha256=
|
22
|
-
wcp_library/sql/postgres.py,sha256=
|
23
|
-
wcp_library-1.2.
|
24
|
-
wcp_library-1.2.
|
25
|
-
wcp_library-1.2.
|
21
|
+
wcp_library/sql/oracle.py,sha256=hQxhQdT6C9Z1wZ-BGw2LYuoIgx5-ThJbEoo_ffOFSUc,7786
|
22
|
+
wcp_library/sql/postgres.py,sha256=TE6U0EvKZ1BwQXRDdcX6SUu9z_9eno4RIf1pY0F1c0Q,7090
|
23
|
+
wcp_library-1.2.9.dist-info/METADATA,sha256=6nNemO2bCgxhiWcSeuFqwZYUdkFmTtKK0Lt0SnLyDnI,1513
|
24
|
+
wcp_library-1.2.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
25
|
+
wcp_library-1.2.9.dist-info/RECORD,,
|
File without changes
|