mtsql 1.12.30__py3-none-any.whl → 1.12.31__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 CHANGED
@@ -377,7 +377,7 @@ def table_exists(
377
377
  def create_temp_id_table(
378
378
  l_ids: list,
379
379
  conn: sa.engine.Connection,
380
- int_type="int",
380
+ int_type: str = "int",
381
381
  chunksize: int = 1000000,
382
382
  logger: tp.Optional[logg.IndentedLoggerAdapter] = None,
383
383
  ) -> str:
@@ -504,6 +504,7 @@ def find_common_ids(
504
504
  engine: sa.engine.Engine,
505
505
  schema: tp.Optional[str] = None,
506
506
  id_col: str = "id",
507
+ int_type: str = "int",
507
508
  logger: tp.Optional[logg.IndentedLoggerAdapter] = None,
508
509
  ) -> tp.List[int]:
509
510
  """Finds common ids between a list of ids and the ids in a given frame.
@@ -520,6 +521,8 @@ def find_common_ids(
520
521
  schema of the frame. If None, the default schema is used.
521
522
  id_col : str
522
523
  name of the id column in the frame
524
+ int_type : str
525
+ an SQL string representing the int type of the id column
523
526
  logger : mt.logg.IndentedLoggerAdapter, optional
524
527
  logger for debugging
525
528
 
@@ -530,7 +533,7 @@ def find_common_ids(
530
533
  """
531
534
 
532
535
  with conn_ctx(engine) as conn:
533
- temp_table = create_temp_id_table(l_ids, conn, logger=logger)
536
+ temp_table = create_temp_id_table(l_ids, conn, int_type=int_type, logger=logger)
534
537
 
535
538
  full_frame_name = frame_sql(frame_name, schema=schema)
536
539
 
@@ -553,6 +556,7 @@ def remove_records_by_id(
553
556
  engine: sa.engine.Engine,
554
557
  schema: tp.Optional[str] = None,
555
558
  id_col: str = "id",
559
+ int_type: str = "int",
556
560
  logger: tp.Optional[logg.IndentedLoggerAdapter] = None,
557
561
  ):
558
562
  """Removes records from a frame by a list of ids.
@@ -569,12 +573,14 @@ def remove_records_by_id(
569
573
  schema of the frame. If None, the default schema is used.
570
574
  id_col : str
571
575
  name of the id column in the frame
576
+ int_type : str
577
+ an SQL string representing the int type of the id column
572
578
  logger : mt.logg.IndentedLoggerAdapter, optional
573
579
  logger for debugging
574
580
  """
575
581
 
576
582
  with conn_ctx(engine) as conn:
577
- temp_table = create_temp_id_table(l_ids, conn, logger=logger)
583
+ temp_table = create_temp_id_table(l_ids, conn, int_type=int_type, logger=logger)
578
584
 
579
585
  full_frame_name = frame_sql(frame_name, schema=schema)
580
586
 
mt/sql/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 12
3
- PATCH_VERSION = 30
3
+ PATCH_VERSION = 31
4
4
  version = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
5
5
  __all__ = ['MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_VERSION', 'version']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mtsql
3
- Version: 1.12.30
3
+ Version: 1.12.31
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
@@ -1,17 +1,17 @@
1
1
  mt/sql/__init__.py,sha256=b7zO50apZxt9Hg2eOkJhRLrXgACR8eS5b-Rphdn5qNQ,44
2
- mt/sql/base.py,sha256=AAoiWIpN8jyHdnfbmUvee6iU2pxo7pDcgO5dLrsybrY,16243
2
+ mt/sql/base.py,sha256=CLFKd-rJtIUGLm37WtxeFLzhX48LgGpEoz6noR4qfXo,16510
3
3
  mt/sql/mysql.py,sha256=n2ENDctdUqZuSaDAcrqZYtPtawq3Wx4dOPCRsCB5Q4w,4894
4
4
  mt/sql/psql.py,sha256=U8XEyg4rQYr5gm8KohRWrpCNJKl5WC1yxJMBkkm1k_A,68125
5
5
  mt/sql/sqlite.py,sha256=T2ak_hhNi_zRfpg_gp8JhNHn7D2kl4i-Ey6-9ANMtz0,8678
6
- mt/sql/version.py,sha256=ATznhpd6AvkQUj3yf0sDQ4RYHO5ZWLiQdaKgfHdbxlE,208
6
+ mt/sql/version.py,sha256=e7OodvUPDd0qLszM8zWrGxkmyhHFVodAR8B3CnSzs7g,208
7
7
  mt/sql/redshift/__init__.py,sha256=S-eRxJWcrvncF7LZXuulCdPV-UERu9eiw6uyDb5aGsM,443
8
8
  mt/sql/redshift/commands.py,sha256=xhGUBf3bL66EYdZI5HCUtOx-XqPCnXT_P-LnhPgtzrY,40193
9
9
  mt/sql/redshift/ddl.py,sha256=eUcZj9oIajiE1wKKBAP-V64gYJ7cVnSAt8dLFfluOJA,9777
10
10
  mt/sql/redshift/dialect.py,sha256=-0JjJubZZHRw0abhl6H6rKWaUE9pKtGwAuX-62T0e_c,53399
11
11
  mt/sql/redshift/main.py,sha256=H8_5sjtJ7dzWoCMXzPNjYhrMQ18eLUQ9xg-aYl5QeTc,17104
12
12
  mt/sql/redshift/redshift-ca-bundle.crt,sha256=532qYkOpQOstFE0mdXE1GVtL3v00XDKgZNTr6gK5-KE,8621
13
- mtsql-1.12.30.dist-info/licenses/LICENSE,sha256=PojkRlQzTT5Eg6Nj03XoIVEefN3u8iiIFf1p4rqe_t4,1070
14
- mtsql-1.12.30.dist-info/METADATA,sha256=mxs0fj1WO1myL6Zlf3iTyPSDDe6Do4TnZtif48dPbms,734
15
- mtsql-1.12.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- mtsql-1.12.30.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
17
- mtsql-1.12.30.dist-info/RECORD,,
13
+ mtsql-1.12.31.dist-info/licenses/LICENSE,sha256=PojkRlQzTT5Eg6Nj03XoIVEefN3u8iiIFf1p4rqe_t4,1070
14
+ mtsql-1.12.31.dist-info/METADATA,sha256=bJET1fnqtrkAZ1Qz8UzM7c2E0PL1X65I5AN1h6wlY1Q,734
15
+ mtsql-1.12.31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ mtsql-1.12.31.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
17
+ mtsql-1.12.31.dist-info/RECORD,,