sql-testing-tools 0.2.1__tar.gz → 0.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sql_testing_tools
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: sqlparse>=0.5.1
6
6
  Requires-Dist: requests>=2.32.3
@@ -11,10 +11,17 @@ Dynamic: requires-dist
11
11
  A library that normalizes simple SQL queries and compares them first by equality of the normalized string and then using the cosette API.
12
12
 
13
13
 
14
+
14
15
  ### [Beta in Development!]
15
16
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml)
16
17
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml)
17
18
 
19
+ Submit bug reports and features requests at: https://github.com/ValentinHerrmann/sql_testing_tools
20
+
21
+ ### V 0.2.2
22
+ - Support LIKE
23
+ - Support '<=' and '>=' (geq and leq)
24
+
18
25
  ### V 0.2.1
19
26
  - Support LIMIT
20
27
 
@@ -1,10 +1,17 @@
1
1
  A library that normalizes simple SQL queries and compares them first by equality of the normalized string and then using the cosette API.
2
2
 
3
3
 
4
+
4
5
  ### [Beta in Development!]
5
6
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml)
6
7
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml)
7
8
 
9
+ Submit bug reports and features requests at: https://github.com/ValentinHerrmann/sql_testing_tools
10
+
11
+ ### V 0.2.2
12
+ - Support LIKE
13
+ - Support '<=' and '>=' (geq and leq)
14
+
8
15
  ### V 0.2.1
9
16
  - Support LIMIT
10
17
 
@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
6
6
 
7
7
  setup(
8
8
  name='sql_testing_tools',
9
- version='0.2.1',
9
+ version='0.2.2',
10
10
  packages=find_packages(),
11
11
  install_requires=[
12
12
  'sqlparse>=0.5.1',
@@ -120,6 +120,10 @@ def _condition(token, alias_map, baseDict: dict):
120
120
  operator.value = "<"
121
121
  elif operator.value == "<":
122
122
  operator.value = ">"
123
+ elif operator.value == ">=":
124
+ operator.value = "<="
125
+ elif operator.value == "<=":
126
+ operator.value = ">="
123
127
  leftLiteral = rightLiteral
124
128
  rightLiteral = True
125
129
  flipAllowed = False
@@ -133,6 +137,10 @@ def _condition(token, alias_map, baseDict: dict):
133
137
  operator = "<"
134
138
  elif operator.value == "<":
135
139
  operator = ">"
140
+ if operator.value == ">=":
141
+ operator = "<="
142
+ elif operator.value == "<=":
143
+ operator = ">="
136
144
 
137
145
  return f"{left if leftLiteral else left.lower()} {operator} {right if rightLiteral else right.lower()}"
138
146
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sql_testing_tools
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: sqlparse>=0.5.1
6
6
  Requires-Dist: requests>=2.32.3
@@ -11,10 +11,17 @@ Dynamic: requires-dist
11
11
  A library that normalizes simple SQL queries and compares them first by equality of the normalized string and then using the cosette API.
12
12
 
13
13
 
14
+
14
15
  ### [Beta in Development!]
15
16
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-build.yml)
16
17
  [![Build and Test](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml/badge.svg)](https://github.com/ValentinHerrmann/sql_testing_tools/actions/workflows/python-unittests.yml)
17
18
 
19
+ Submit bug reports and features requests at: https://github.com/ValentinHerrmann/sql_testing_tools
20
+
21
+ ### V 0.2.2
22
+ - Support LIKE
23
+ - Support '<=' and '>=' (geq and leq)
24
+
18
25
  ### V 0.2.1
19
26
  - Support LIMIT
20
27