mtsql 1.11.7__py3-none-any.whl → 1.11.8__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.
- mt/sql/base.py +6 -2
- mt/sql/version.py +1 -1
- {mtsql-1.11.7.dist-info → mtsql-1.11.8.dist-info}/METADATA +1 -1
- mtsql-1.11.8.dist-info/RECORD +12 -0
- mtsql-1.11.7.dist-info/RECORD +0 -12
- {mtsql-1.11.7.dist-info → mtsql-1.11.8.dist-info}/LICENSE +0 -0
- {mtsql-1.11.7.dist-info → mtsql-1.11.8.dist-info}/WHEEL +0 -0
- {mtsql-1.11.7.dist-info → mtsql-1.11.8.dist-info}/top_level.txt +0 -0
mt/sql/base.py
CHANGED
|
@@ -365,7 +365,9 @@ def table_exists(
|
|
|
365
365
|
return sa.inspect(engine).has_table(table_name, schema=schema)
|
|
366
366
|
|
|
367
367
|
|
|
368
|
-
def create_temp_id_table(
|
|
368
|
+
def create_temp_id_table(
|
|
369
|
+
l_ids: list, conn: sa.engine.Connection, int_type="int"
|
|
370
|
+
) -> str:
|
|
369
371
|
"""Creates a temporary table to containing a list of ids.
|
|
370
372
|
|
|
371
373
|
Parameters
|
|
@@ -374,6 +376,8 @@ def create_temp_id_table(l_ids: list, conn: sa.engine.Connection) -> str:
|
|
|
374
376
|
list of ids to be inserted into the table
|
|
375
377
|
conn : sqlalchemy.engine.Connection
|
|
376
378
|
a connection that has been opened
|
|
379
|
+
int_type : str
|
|
380
|
+
an SQL string representing the int type
|
|
377
381
|
|
|
378
382
|
Returns
|
|
379
383
|
-------
|
|
@@ -383,7 +387,7 @@ def create_temp_id_table(l_ids: list, conn: sa.engine.Connection) -> str:
|
|
|
383
387
|
|
|
384
388
|
table_name = f"tab_{uuid.uuid4().hex}"
|
|
385
389
|
|
|
386
|
-
query_str = f"CREATE TEMP TABLE {table_name}(id
|
|
390
|
+
query_str = f"CREATE TEMP TABLE {table_name}(id {int_type});"
|
|
387
391
|
conn.execute(sa.text(query_str))
|
|
388
392
|
|
|
389
393
|
values = ",".join((f"({id})" for id in l_ids))
|
mt/sql/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mtsql
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.8
|
|
4
4
|
Summary: Extra Python modules to deal with the interaction between pandas dataframes and remote SQL servers, for Minh-Tri Pham
|
|
5
5
|
Home-page: https://github.com/inteplus/mtsql
|
|
6
6
|
Author: ['Minh-Tri Pham']
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
mt/sql/__init__.py,sha256=b7zO50apZxt9Hg2eOkJhRLrXgACR8eS5b-Rphdn5qNQ,44
|
|
2
|
+
mt/sql/base.py,sha256=x5A2-1LCZwsE243JrfnSI0O2Iexf5uRk8kB-b_GVvLA,11967
|
|
3
|
+
mt/sql/mysql.py,sha256=n2ENDctdUqZuSaDAcrqZYtPtawq3Wx4dOPCRsCB5Q4w,4894
|
|
4
|
+
mt/sql/psql.py,sha256=tzsIN2XyBJX8t7p0D2yXgEQwUTkTcDzllI4HunCfq3s,66345
|
|
5
|
+
mt/sql/redshift.py,sha256=Nve12tQ6_vO3M6yOpQQn3TkI1r4eDRBLsU0agOLRDvs,17037
|
|
6
|
+
mt/sql/sqlite.py,sha256=T2ak_hhNi_zRfpg_gp8JhNHn7D2kl4i-Ey6-9ANMtz0,8678
|
|
7
|
+
mt/sql/version.py,sha256=awZxTJogFFFGbUfMdR9YYZyg4qUUCVueUJHvdv8aHOA,207
|
|
8
|
+
mtsql-1.11.8.dist-info/LICENSE,sha256=PojkRlQzTT5Eg6Nj03XoIVEefN3u8iiIFf1p4rqe_t4,1070
|
|
9
|
+
mtsql-1.11.8.dist-info/METADATA,sha256=CDKXIg6uKE9EC64ZD91WmO6-fo839LQV58ZL4K518e0,579
|
|
10
|
+
mtsql-1.11.8.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
11
|
+
mtsql-1.11.8.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
|
|
12
|
+
mtsql-1.11.8.dist-info/RECORD,,
|
mtsql-1.11.7.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
mt/sql/__init__.py,sha256=b7zO50apZxt9Hg2eOkJhRLrXgACR8eS5b-Rphdn5qNQ,44
|
|
2
|
-
mt/sql/base.py,sha256=1H5HQP9ZJAak9RYs4O2xTtm6dww0MJ_GxieAhZ49DDU,11871
|
|
3
|
-
mt/sql/mysql.py,sha256=n2ENDctdUqZuSaDAcrqZYtPtawq3Wx4dOPCRsCB5Q4w,4894
|
|
4
|
-
mt/sql/psql.py,sha256=tzsIN2XyBJX8t7p0D2yXgEQwUTkTcDzllI4HunCfq3s,66345
|
|
5
|
-
mt/sql/redshift.py,sha256=Nve12tQ6_vO3M6yOpQQn3TkI1r4eDRBLsU0agOLRDvs,17037
|
|
6
|
-
mt/sql/sqlite.py,sha256=T2ak_hhNi_zRfpg_gp8JhNHn7D2kl4i-Ey6-9ANMtz0,8678
|
|
7
|
-
mt/sql/version.py,sha256=1sh5-RDBD40ilM5zvs0F-2KA_AOdngu_w1qzzm3fyUU,207
|
|
8
|
-
mtsql-1.11.7.dist-info/LICENSE,sha256=PojkRlQzTT5Eg6Nj03XoIVEefN3u8iiIFf1p4rqe_t4,1070
|
|
9
|
-
mtsql-1.11.7.dist-info/METADATA,sha256=T8sd7s8HDR48oX_-o4Evdw_uDjUs6WNi1N0VBMTMWvg,579
|
|
10
|
-
mtsql-1.11.7.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
11
|
-
mtsql-1.11.7.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
|
|
12
|
-
mtsql-1.11.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|