sql-blocks 0.0.5__py3-none-any.whl → 0.0.6__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.
sql_blocks/__init__.py CHANGED
@@ -1 +1 @@
1
- from sql_blocks import *
1
+ from sql_blocks.sql_blocks import *
sql_blocks/sql_blocks.py CHANGED
@@ -511,32 +511,3 @@ SubSelect = SelectIN
511
511
 
512
512
  class NotSelectIN(SelectIN):
513
513
  condition_class = Not
514
-
515
-
516
- if __name__ == "__main__":
517
- query_list = Select.parse("""
518
- SELECT
519
- cas.role,
520
- m.title,
521
- m.release_date,
522
- a.name as actors_name
523
- FROM
524
- Actor a
525
- LEFT JOIN Cast cas ON (a.cast = cas.id)
526
- LEFT JOIN Movie m ON (cas.movie = m.id)
527
- WHERE
528
- m.genre NOT in (SELECT g.id from Genres g where g.name in ('sci-fi', 'horror', 'distopia'))
529
- AND (m.hashtag = '#cult' OR m.awards LIKE '%Oscar%')
530
- AND m.id IN (select DISTINCT r.movie FROM Review r GROUP BY r.movie HAVING Avg(r.rate) > 4.5)
531
- AND a.age <= 69 AND a.age >= 45
532
- ORDER BY
533
- m.release_date
534
- """)
535
- for query in query_list:
536
- descr = ' {} ({}) '.format(
537
- query.table_name,
538
- query.__class__.__name__
539
- )
540
- print(descr.center(50, '-'))
541
- print(query)
542
- print('='*50)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sql_blocks
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: Allows you to create objects for parts of SQL query commands. Also to combine these objects by joining them, adding or removing parts...
5
5
  Home-page: https://github.com/julio-cascalles/sql_blocks
6
6
  Author: Júlio Cascalles
@@ -306,9 +306,9 @@ m2 = Select(
306
306
  Select(
307
307
  'Product',
308
308
  label=Case('price').when(
309
- lt(50), 'cheap'
309
+ Where.lt(50), 'cheap'
310
310
  ).when(
311
- gt(100), 'expensive'
311
+ Where.gt(100), 'expensive'
312
312
  ).else_value(
313
313
  'normal'
314
314
  )
@@ -0,0 +1,7 @@
1
+ sql_blocks/__init__.py,sha256=5ItzGCyqqa6kwY8wvF9kapyHsAiWJ7KEXCcC-OtdXKg,37
2
+ sql_blocks/sql_blocks.py,sha256=Fs636uSwXTxlzHH9SCOxmGTgt2MjhQ6Pf6v92CRtQ9E,16229
3
+ sql_blocks-0.0.6.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
4
+ sql_blocks-0.0.6.dist-info/METADATA,sha256=-2-vPw1nkpqKvlp0l2Bt8VF_sBZ_TM8BGf-Nmk8X2oo,7037
5
+ sql_blocks-0.0.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ sql_blocks-0.0.6.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
7
+ sql_blocks-0.0.6.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- sql_blocks/__init__.py,sha256=TodC5q-UEdYEz9v1RRoogVqqRcsKnZRY1WDGinrI2zo,26
2
- sql_blocks/sql_blocks.py,sha256=lTdPxelcWQC9oRFGuDcdEm2g5r6q1typyQAc7sGjmVY,17230
3
- sql_blocks-0.0.5.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
4
- sql_blocks-0.0.5.dist-info/METADATA,sha256=xi_F_iiC8Wr8Hgk6WTp0tQ_KBiv3rDOpSA5hhVulzdk,7025
5
- sql_blocks-0.0.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- sql_blocks-0.0.5.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
7
- sql_blocks-0.0.5.dist-info/RECORD,,