singlestore-sql-validator 0.1.0__tar.gz → 0.1.1__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.4
2
2
  Name: singlestore-sql-validator
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: SQL grammar validator for SingleStore queries
5
5
  License: Apache License (2.0)
6
6
  License-File: LICENSE
@@ -119,7 +119,7 @@ else:
119
119
 
120
120
  ## Notes
121
121
 
122
- - This library is intended to be used with a running SingleStore Language Server instance (version 0.1.3 or later).
122
+ - This library is intended to be used with a running SingleStore Language Server instance (version 0.1.13 or later).
123
123
  - It does not start or manage the server process itself.
124
124
  - Documentation for the SingleStore Language Server can be found at: [https://github.com/singlestore-labs/language-server](https://github.com/singlestore-labs/language-server)
125
125
 
@@ -98,7 +98,7 @@ else:
98
98
 
99
99
  ## Notes
100
100
 
101
- - This library is intended to be used with a running SingleStore Language Server instance (version 0.1.3 or later).
101
+ - This library is intended to be used with a running SingleStore Language Server instance (version 0.1.13 or later).
102
102
  - It does not start or manage the server process itself.
103
103
  - Documentation for the SingleStore Language Server can be found at: [https://github.com/singlestore-labs/language-server](https://github.com/singlestore-labs/language-server)
104
104
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "singlestore-sql-validator"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "SQL grammar validator for SingleStore queries"
5
5
  authors = [
6
6
  {name = "Volodymyr Tkachuk",email = "vtkachuk-ua@singlestore.com"}
@@ -45,12 +45,14 @@ class ValidationResult:
45
45
  """
46
46
  Represents the result of validating an SQL query.
47
47
  - is_valid: Indicates if the SQL query is valid.
48
+ - is_complete: Indicates if the SQL query is complete and does not require additional tokens.
48
49
  - error_token: The token that caused the validation error, if any.
49
50
  - error_token_position: The position of the error token, if any.
50
51
  - alternative_tokens: A list of alternative tokens that could be used to fix the error, if any.
51
52
  """
52
53
 
53
54
  is_valid: bool
55
+ is_complete: bool
54
56
  error_token: Optional[str] = None
55
57
  error_token_position: Optional[TokenPosition] = None
56
58
  alternative_tokens: Optional[CompletionList] = None
@@ -64,6 +66,7 @@ class ValidationResult:
64
66
  """
65
67
  result = resp.get("result", {})
66
68
  is_valid = result.get("isValid", False)
69
+ is_complete = result.get("isComplete", False)
67
70
  error_token = result.get("errorToken")
68
71
 
69
72
  error_token_position = None
@@ -94,6 +97,7 @@ class ValidationResult:
94
97
 
95
98
  return cls(
96
99
  is_valid=is_valid,
100
+ is_complete=is_complete,
97
101
  error_token=error_token,
98
102
  error_token_position=error_token_position,
99
103
  alternative_tokens=alternative_tokens,