fakesnow 0.9.10__py3-none-any.whl → 0.9.11__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.
fakesnow/fakes.py CHANGED
@@ -630,7 +630,12 @@ class FakeSnowflakeConnection:
630
630
  df[col] = df[col].apply(lambda x: json.dumps(x) if isinstance(x, (dict, list)) else x)
631
631
 
632
632
  escaped_cols = ",".join(f'"{col}"' for col in df.columns.to_list())
633
- self._duck_conn.execute(f"INSERT INTO {table_name}({escaped_cols}) SELECT * FROM df")
633
+ name = table_name
634
+ if schema:
635
+ table_name = f"{schema}.{table_name}"
636
+ if database:
637
+ name = f"{database}.{table_name}"
638
+ self._duck_conn.execute(f"INSERT INTO {name}({escaped_cols}) SELECT * FROM df")
634
639
 
635
640
  return self._duck_conn.fetchall()[0][0]
636
641
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fakesnow
3
- Version: 0.9.10
3
+ Version: 0.9.11
4
4
  Summary: Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally.
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -357,7 +357,7 @@ For more detail see [tests/test_fakes.py](tests/test_fakes.py)
357
357
  ## Caveats
358
358
 
359
359
  - The order of rows is non deterministic and may not match Snowflake unless ORDER BY is fully specified.
360
- - A more liberal Snowflake SQL dialect than a real Snowflake instance is supported, ie: some queries might pass using fakesnow that a real Snowflake instance would reject.
360
+ - A more liberal Snowflake SQL dialect than used by a real Snowflake instance is supported, ie: some queries might pass using fakesnow that a real Snowflake instance would reject.
361
361
 
362
362
  ## Contributing
363
363
 
@@ -3,16 +3,16 @@ fakesnow/__main__.py,sha256=GDrGyNTvBFuqn_UfDjKs7b3LPtU6gDv1KwosVDrukIM,76
3
3
  fakesnow/checks.py,sha256=-QMvdcrRbhN60rnzxLBJ0IkUBWyLR8gGGKKmCS0w9mA,2383
4
4
  fakesnow/cli.py,sha256=9qfI-Ssr6mo8UmIlXkUAOz2z2YPBgDsrEVaZv9FjGFs,2201
5
5
  fakesnow/expr.py,sha256=CAxuYIUkwI339DQIBzvFF0F-m1tcVGKEPA5rDTzmH9A,892
6
- fakesnow/fakes.py,sha256=dvbla_iiDIQRtEhaGksMS35WeSG5JSGMhWRaM0VApxg,29490
6
+ fakesnow/fakes.py,sha256=OBoFJ7lSwB3hkcqcd7UZIcWO5Kaxg41JAt_eYRDahE0,29646
7
7
  fakesnow/fixtures.py,sha256=G-NkVeruSQAJ7fvSS2fR2oysUn0Yra1pohHlOvacKEk,455
8
8
  fakesnow/global_database.py,sha256=WTVIP1VhNvdCeX7TQncX1TRpGQU5rBf5Pbxim40zeSU,1399
9
9
  fakesnow/info_schema.py,sha256=CdIcGXHEQ_kmEAzdQKvA-PX41LA6wlK-4p1J45qgKYA,6266
10
10
  fakesnow/macros.py,sha256=pX1YJDnQOkFJSHYUjQ6ErEkYIKvFI6Ncz_au0vv1csA,265
11
11
  fakesnow/py.typed,sha256=B-DLSjYBi7pkKjwxCSdpVj2J02wgfJr-E7B1wOUyxYU,80
12
12
  fakesnow/transforms.py,sha256=oFNMsWygVz5-B98HMnrWznlxJoxl-DwoVCTdwHSdK_0,50670
13
- fakesnow-0.9.10.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
14
- fakesnow-0.9.10.dist-info/METADATA,sha256=VrrY4vTMyWNkvmQexDPVmet4WM0jIbxs2e2YBDf3C20,17833
15
- fakesnow-0.9.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
- fakesnow-0.9.10.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
17
- fakesnow-0.9.10.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
18
- fakesnow-0.9.10.dist-info/RECORD,,
13
+ fakesnow-0.9.11.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
14
+ fakesnow-0.9.11.dist-info/METADATA,sha256=Q7KmvgTl7DtgDOBevWk9TISq3RAR4eueYO4d_toNtb8,17841
15
+ fakesnow-0.9.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
+ fakesnow-0.9.11.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
17
+ fakesnow-0.9.11.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
18
+ fakesnow-0.9.11.dist-info/RECORD,,