sql-testing-tools 0.2.6__tar.gz → 0.2.7__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.6
3
+ Version: 0.2.7
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: sqlparse>=0.5.1
6
6
  Requires-Dist: requests>=2.32.3
@@ -136,6 +136,10 @@ res = checkEquality()
136
136
 
137
137
  ### Changelog
138
138
 
139
+
140
+ ##### V 0.2.7
141
+ - Normalize String unequality: ...<>..., ...!=..., ...NOT LIKE... --> NOT...LIKE...
142
+
139
143
  ##### V 0.2.6
140
144
  - Fixed bug in checkKeywords: if keyword was present in one query and not in the other, the comparison was not performed correctly.
141
145
 
@@ -126,6 +126,10 @@ res = checkEquality()
126
126
 
127
127
  ### Changelog
128
128
 
129
+
130
+ ##### V 0.2.7
131
+ - Normalize String unequality: ...<>..., ...!=..., ...NOT LIKE... --> NOT...LIKE...
132
+
129
133
  ##### V 0.2.6
130
134
  - Fixed bug in checkKeywords: if keyword was present in one query and not in the other, the comparison was not performed correctly.
131
135
 
@@ -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.6',
9
+ version='0.2.7',
10
10
  packages=find_packages(),
11
11
  install_requires=[
12
12
  'sqlparse>=0.5.1',
@@ -143,6 +143,11 @@ def _condition(token, alias_map, baseDict: dict):
143
143
  left = _identifier(left, alias_map, baseDict)
144
144
  right = _identifier(right, alias_map, baseDict)
145
145
 
146
+ if operator.value in ("!=", "<>"):
147
+ return f"NOT {left} LIKE {right}"
148
+ if operator.value in ("NOT LIKE"):
149
+ return f"NOT {left} LIKE {right}"
150
+
146
151
  if flipAllowed and left.lower() >= right.lower():
147
152
  left, right = right, left
148
153
  if operator.value == ">":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sql_testing_tools
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: sqlparse>=0.5.1
6
6
  Requires-Dist: requests>=2.32.3
@@ -136,6 +136,10 @@ res = checkEquality()
136
136
 
137
137
  ### Changelog
138
138
 
139
+
140
+ ##### V 0.2.7
141
+ - Normalize String unequality: ...<>..., ...!=..., ...NOT LIKE... --> NOT...LIKE...
142
+
139
143
  ##### V 0.2.6
140
144
  - Fixed bug in checkKeywords: if keyword was present in one query and not in the other, the comparison was not performed correctly.
141
145