fakesnow 0.9.0__py3-none-any.whl → 0.9.1__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
@@ -39,6 +39,7 @@ SQL_CREATED_TABLE = Template("SELECT 'Table ${name} successfully created.' as 's
39
39
  SQL_DROPPED = Template("SELECT '${name} successfully dropped.' as 'status'")
40
40
  SQL_INSERTED_ROWS = Template("SELECT ${count} as 'number of rows inserted'")
41
41
  SQL_UPDATED_ROWS = Template("SELECT ${count} as 'number of rows updated', 0 as 'number of multi-joined rows updated'")
42
+ SQL_DELETED_ROWS = Template("SELECT ${count} as 'number of rows deleted'")
42
43
 
43
44
 
44
45
  class FakeSnowflakeCursor:
@@ -265,6 +266,10 @@ class FakeSnowflakeCursor:
265
266
  (affected_count,) = self._duck_conn.fetchall()[0]
266
267
  result_sql = SQL_UPDATED_ROWS.substitute(count=affected_count)
267
268
 
269
+ elif cmd == "DELETE":
270
+ (affected_count,) = self._duck_conn.fetchall()[0]
271
+ result_sql = SQL_DELETED_ROWS.substitute(count=affected_count)
272
+
268
273
  elif cmd == "DESCRIBE TABLE":
269
274
  # DESCRIBE TABLE has already been run above to detect and error if the table exists
270
275
  # We now rerun DESCRIBE TABLE but transformed with columns to match Snowflake
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fakesnow
3
- Version: 0.9.0
3
+ Version: 0.9.1
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
@@ -3,15 +3,15 @@ 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=aRVnMMtqe2GM2YFEmoj8JEDEofb_iv6BrmVBf5zxiA0,27492
6
+ fakesnow/fakes.py,sha256=LjgdmXt94oSaSTo-HzBf6gIlBjj3NokY_adZSHceHqk,27735
7
7
  fakesnow/fixtures.py,sha256=G-NkVeruSQAJ7fvSS2fR2oysUn0Yra1pohHlOvacKEk,455
8
8
  fakesnow/info_schema.py,sha256=TyFR4YfZkJhoPXqgbZr0J2xDo7mK9WMpbn-O1XHVhl4,4685
9
9
  fakesnow/macros.py,sha256=pX1YJDnQOkFJSHYUjQ6ErEkYIKvFI6Ncz_au0vv1csA,265
10
10
  fakesnow/py.typed,sha256=B-DLSjYBi7pkKjwxCSdpVj2J02wgfJr-E7B1wOUyxYU,80
11
11
  fakesnow/transforms.py,sha256=8-QKw47_TwCamSai1kndiB-JhrKjlYcWP4y8-6X_m0U,35293
12
- fakesnow-0.9.0.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
13
- fakesnow-0.9.0.dist-info/METADATA,sha256=V9B-3KdQ5AmjluhsGnDyPzn0IxNHYQ3t972eIQIYV9M,17652
14
- fakesnow-0.9.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
15
- fakesnow-0.9.0.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
16
- fakesnow-0.9.0.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
17
- fakesnow-0.9.0.dist-info/RECORD,,
12
+ fakesnow-0.9.1.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
13
+ fakesnow-0.9.1.dist-info/METADATA,sha256=zTlQQFSj4Mhil8y3avulyQ3NFyijceSXambZEgih6fo,17652
14
+ fakesnow-0.9.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
15
+ fakesnow-0.9.1.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
16
+ fakesnow-0.9.1.dist-info/top_level.txt,sha256=500evXI1IFX9so82cizGIEMHAb_dJNPaZvd2H9dcKTA,24
17
+ fakesnow-0.9.1.dist-info/RECORD,,