sql-blocks 1.2025.628__py3-none-any.whl → 1.2025.629__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/sql_blocks.py CHANGED
@@ -336,7 +336,6 @@ class DateDiff(Function):
336
336
  candidate = re.sub(
337
337
  '[()]', '', obj.split('.')[-1]
338
338
  )
339
- print(f'---------------> #{candidate=}#')
340
339
  return candidate.isidentifier()
341
340
  self.params = [
342
341
  p if is_field_or_func(p) else f"'{p}'"
@@ -676,7 +675,10 @@ class Case:
676
675
 
677
676
  def then(self, result):
678
677
  if isinstance(result, str):
679
- result = quoted(result)
678
+ if result.startswith('='):
679
+ result = result[1:]
680
+ else:
681
+ result = quoted(result)
680
682
  self.__conditions[result] = self.current_condition
681
683
  return self
682
684
 
@@ -2295,13 +2297,4 @@ def detect(text: str, join_queries: bool = True, format: str='') -> Select | lis
2295
2297
  for query in query_list[1:]:
2296
2298
  result += query
2297
2299
  return result
2298
- # ===========================================================================================//
2299
-
2300
- if __name__ == "__main__":
2301
-
2302
- print(
2303
- Select(
2304
- 'Emprestimo e',
2305
- _=Sum(Case('atraso').when(gt(60), 25).when(lt(15), 5).else_value(10)).As('multa', OrderBy)
2306
- )
2307
- )
2300
+ # ===========================================================================================//
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sql_blocks
3
- Version: 1.2025.628
3
+ Version: 1.2025.629
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
@@ -0,0 +1,7 @@
1
+ sql_blocks/__init__.py,sha256=5ItzGCyqqa6kwY8wvF9kapyHsAiWJ7KEXCcC-OtdXKg,37
2
+ sql_blocks/sql_blocks.py,sha256=ODdGib5t0Jdk1-t9CKCEISWRWzVFJR4tCpfZt5Qw4GA,78119
3
+ sql_blocks-1.2025.629.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
4
+ sql_blocks-1.2025.629.dist-info/METADATA,sha256=tk1PPS4ojtXU5oYyqXBwwr_QjzAlIjI7rqzmJhMa4bI,23328
5
+ sql_blocks-1.2025.629.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ sql_blocks-1.2025.629.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
7
+ sql_blocks-1.2025.629.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- sql_blocks/__init__.py,sha256=5ItzGCyqqa6kwY8wvF9kapyHsAiWJ7KEXCcC-OtdXKg,37
2
- sql_blocks/sql_blocks.py,sha256=gbihrdYwzwGUMDO2pXSeIOmxxaOX9A-hXoz-qZv_4Ls,78290
3
- sql_blocks-1.2025.628.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
4
- sql_blocks-1.2025.628.dist-info/METADATA,sha256=mhDyYy5hxk3A-I7CKjekvhTBizZVXpkUA5RtKMHcIks,23328
5
- sql_blocks-1.2025.628.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- sql_blocks-1.2025.628.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
7
- sql_blocks-1.2025.628.dist-info/RECORD,,