singlestoredb 1.5.0__tar.gz → 1.6.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.
Potentially problematic release.
This version of singlestoredb might be problematic. Click here for more details.
- {singlestoredb-1.5.0/singlestoredb.egg-info → singlestoredb-1.6.1}/PKG-INFO +1 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/setup.cfg +1 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/__init__.py +1 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/handler.py +17 -9
- singlestoredb-1.6.1/singlestoredb/fusion/handlers/job.py +658 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/handlers/workspace.py +33 -10
- singlestoredb-1.6.1/singlestoredb/management/job.py +887 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/organization.py +17 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/utils.py +47 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/connection.py +7 -6
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_fusion.py +250 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_management.py +152 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/utils.py +7 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1/singlestoredb.egg-info}/PKG-INFO +1 -1
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb.egg-info/SOURCES.txt +2 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/LICENSE +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/README.md +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/accel.c +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/setup.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/ai/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/ai/embeddings.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/alchemy/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/auth.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/config.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/connection.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/converters.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/exceptions.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/decorator.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/dtypes.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/arrow.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/asgi.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/json.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/mmap.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/rowdat_1.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/ext/utils.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/functions/signature.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/graphql.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/handlers/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/handlers/stage.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/handlers/utils.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/registry.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/fusion/result.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/http/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/http/connection.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/billing_usage.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/cluster.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/manager.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/region.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/management/workspace.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/_auth.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/charset.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/CLIENT.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/COMMAND.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/CR.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/ER.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/EXTENDED_TYPE.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/FIELD_TYPE.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/FLAG.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/SERVER_STATUS.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/VECTOR_TYPE.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/constants/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/converters.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/cursors.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/err.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/optionfile.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/protocol.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/base.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/conftest.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_DictCursor.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_SSCursor.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_basic.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_connection.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_converters.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_cursor.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_err.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_issues.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_load_local.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_nextset.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/test_optionfile.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/capabilities.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/dbapi20.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/mysql/times.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/notebook/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/notebook/_objects.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/notebook/_portal.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/pytest.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/empty.sql +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/ext_funcs/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/local_infile.csv +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test.sql +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test2.sql +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_basics.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_config.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_connection.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_dbapi.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_exceptions.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_ext_func.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_ext_func_data.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_http.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_plugin.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_results.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_types.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_udf.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/tests/test_xdict.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/types.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/__init__.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/config.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/convert_rows.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/debug.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/dtypes.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/events.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/mogrify.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/results.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb/utils/xdict.py +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb.egg-info/dependency_links.txt +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb.egg-info/entry_points.txt +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb.egg-info/requires.txt +0 -0
- {singlestoredb-1.5.0 → singlestoredb-1.6.1}/singlestoredb.egg-info/top_level.txt +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import abc
|
|
3
3
|
import functools
|
|
4
4
|
import re
|
|
5
|
+
import sys
|
|
5
6
|
import textwrap
|
|
6
7
|
from typing import Any
|
|
7
8
|
from typing import Callable
|
|
@@ -102,7 +103,7 @@ def json_unescape(s: str) -> str:
|
|
|
102
103
|
|
|
103
104
|
def get_keywords(grammar: str) -> Tuple[str, ...]:
|
|
104
105
|
"""Return all all-caps words from the beginning of the line."""
|
|
105
|
-
m = re.match(r'^\s*((?:[A-Z0-9_]+)(\s+|$|;))+', grammar)
|
|
106
|
+
m = re.match(r'^\s*((?:[@A-Z0-9_]+)(\s+|$|;))+', grammar)
|
|
106
107
|
if not m:
|
|
107
108
|
return tuple()
|
|
108
109
|
return tuple(re.split(r'\s+', m.group(0).replace(';', '').strip()))
|
|
@@ -110,7 +111,7 @@ def get_keywords(grammar: str) -> Tuple[str, ...]:
|
|
|
110
111
|
|
|
111
112
|
def is_bool(grammar: str) -> bool:
|
|
112
113
|
"""Determine if the rule is a boolean."""
|
|
113
|
-
return bool(re.match(r'^[A-Z0-9_\s*]+$', grammar))
|
|
114
|
+
return bool(re.match(r'^[@A-Z0-9_\s*]+$', grammar))
|
|
114
115
|
|
|
115
116
|
|
|
116
117
|
def process_optional(m: Any) -> str:
|
|
@@ -137,8 +138,9 @@ def process_repeats(m: Any) -> str:
|
|
|
137
138
|
|
|
138
139
|
def lower_and_regex(m: Any) -> str:
|
|
139
140
|
"""Lowercase and convert literal to regex."""
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
start = m.group(1) or ''
|
|
142
|
+
sql = m.group(2)
|
|
143
|
+
return f'~"{start}{sql.lower()}"i'
|
|
142
144
|
|
|
143
145
|
|
|
144
146
|
def split_unions(grammar: str) -> str:
|
|
@@ -415,7 +417,7 @@ def process_grammar(
|
|
|
415
417
|
sql = re.sub(r'\]\s+\[', r' | ', sql)
|
|
416
418
|
|
|
417
419
|
# Lower-case keywords and make them case-insensitive
|
|
418
|
-
sql = re.sub(r'\b([A-Z0-9]+)\b', lower_and_regex, sql)
|
|
420
|
+
sql = re.sub(r'(\b|@+)([A-Z0-9]+)\b', lower_and_regex, sql)
|
|
419
421
|
|
|
420
422
|
# Convert literal strings to 'qs'
|
|
421
423
|
sql = re.sub(r"'[^']+'", r'qs', sql)
|
|
@@ -479,10 +481,16 @@ def process_grammar(
|
|
|
479
481
|
cmds = ' / '.join(x for x in rules if x.endswith('_cmd'))
|
|
480
482
|
cmds = f'init = ws* ( {cmds} ) ws* ";"? ws*\n'
|
|
481
483
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
grammar = cmds + CORE_GRAMMAR + '\n'.join(out)
|
|
485
|
+
|
|
486
|
+
try:
|
|
487
|
+
return (
|
|
488
|
+
Grammar(grammar), command_key,
|
|
489
|
+
rule_info, syntax_txt, help_txt,
|
|
490
|
+
)
|
|
491
|
+
except ParseError:
|
|
492
|
+
print(grammar, file=sys.stderr)
|
|
493
|
+
raise
|
|
486
494
|
|
|
487
495
|
|
|
488
496
|
def flatten(items: Iterable[Any]) -> List[Any]:
|