You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to dig into the code and find some breadcrumbs but I couldn't get anywhere...
importsqlvalidatorquery='SELECT * FROM table WHERE cast(start_time as date) > dateadd(year,-3,now());'sql_query=sqlvalidator.parse(query)
sql_query.is_valid()
raises:
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/sql_validator.py", line 25, in is_valid
self._validate()
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/sql_validator.py", line 31, in _validate
self.errors = self.sql_query.validate()
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/grammar/sql.py", line 137, in validate
errors += self.where_clause.validate(known_fields)
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/grammar/sql.py", line 272, in validate
errors += self.value.validate(known_fields)
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/grammar/sql.py", line 1439, in validate
errors += self.value.validate(known_fields)
File ".../python-3.9.4/lib/python3.9/site-packages/sqlvalidator/grammar/sql.py", line 557, in validate
errors += a.validate(known_fields)
AttributeError: 'str' object has no attribute 'validate'
The text was updated successfully, but these errors were encountered:
I tried to dig into the code and find some breadcrumbs but I couldn't get anywhere...
raises:
The text was updated successfully, but these errors were encountered: