singlestoredb 0.3.3__py3-none-any.whl → 1.0.3__py3-none-any.whl
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/__init__.py +33 -2
- singlestoredb/alchemy/__init__.py +90 -0
- singlestoredb/auth.py +6 -4
- singlestoredb/config.py +116 -16
- singlestoredb/connection.py +489 -523
- singlestoredb/converters.py +275 -26
- singlestoredb/exceptions.py +30 -4
- singlestoredb/functions/__init__.py +1 -0
- singlestoredb/functions/decorator.py +142 -0
- singlestoredb/functions/dtypes.py +1639 -0
- singlestoredb/functions/ext/__init__.py +2 -0
- singlestoredb/functions/ext/arrow.py +375 -0
- singlestoredb/functions/ext/asgi.py +661 -0
- singlestoredb/functions/ext/json.py +427 -0
- singlestoredb/functions/ext/mmap.py +306 -0
- singlestoredb/functions/ext/rowdat_1.py +744 -0
- singlestoredb/functions/signature.py +673 -0
- singlestoredb/fusion/__init__.py +11 -0
- singlestoredb/fusion/graphql.py +213 -0
- singlestoredb/fusion/handler.py +621 -0
- singlestoredb/fusion/handlers/__init__.py +0 -0
- singlestoredb/fusion/handlers/stage.py +257 -0
- singlestoredb/fusion/handlers/utils.py +162 -0
- singlestoredb/fusion/handlers/workspace.py +412 -0
- singlestoredb/fusion/registry.py +164 -0
- singlestoredb/fusion/result.py +399 -0
- singlestoredb/http/__init__.py +27 -0
- singlestoredb/http/connection.py +1192 -0
- singlestoredb/management/__init__.py +3 -2
- singlestoredb/management/billing_usage.py +148 -0
- singlestoredb/management/cluster.py +19 -14
- singlestoredb/management/manager.py +100 -40
- singlestoredb/management/organization.py +188 -0
- singlestoredb/management/region.py +6 -8
- singlestoredb/management/utils.py +253 -4
- singlestoredb/management/workspace.py +1153 -35
- singlestoredb/mysql/__init__.py +177 -0
- singlestoredb/mysql/_auth.py +298 -0
- singlestoredb/mysql/charset.py +214 -0
- singlestoredb/mysql/connection.py +1814 -0
- singlestoredb/mysql/constants/CLIENT.py +38 -0
- singlestoredb/mysql/constants/COMMAND.py +32 -0
- singlestoredb/mysql/constants/CR.py +78 -0
- singlestoredb/mysql/constants/ER.py +474 -0
- singlestoredb/mysql/constants/FIELD_TYPE.py +32 -0
- singlestoredb/mysql/constants/FLAG.py +15 -0
- singlestoredb/mysql/constants/SERVER_STATUS.py +10 -0
- singlestoredb/mysql/constants/__init__.py +0 -0
- singlestoredb/mysql/converters.py +271 -0
- singlestoredb/mysql/cursors.py +713 -0
- singlestoredb/mysql/err.py +92 -0
- singlestoredb/mysql/optionfile.py +20 -0
- singlestoredb/mysql/protocol.py +388 -0
- singlestoredb/mysql/tests/__init__.py +19 -0
- singlestoredb/mysql/tests/base.py +126 -0
- singlestoredb/mysql/tests/conftest.py +37 -0
- singlestoredb/mysql/tests/test_DictCursor.py +132 -0
- singlestoredb/mysql/tests/test_SSCursor.py +141 -0
- singlestoredb/mysql/tests/test_basic.py +452 -0
- singlestoredb/mysql/tests/test_connection.py +851 -0
- singlestoredb/mysql/tests/test_converters.py +58 -0
- singlestoredb/mysql/tests/test_cursor.py +141 -0
- singlestoredb/mysql/tests/test_err.py +16 -0
- singlestoredb/mysql/tests/test_issues.py +514 -0
- singlestoredb/mysql/tests/test_load_local.py +75 -0
- singlestoredb/mysql/tests/test_nextset.py +88 -0
- singlestoredb/mysql/tests/test_optionfile.py +27 -0
- singlestoredb/mysql/tests/thirdparty/__init__.py +6 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/__init__.py +9 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/capabilities.py +323 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/dbapi20.py +865 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py +110 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py +224 -0
- singlestoredb/mysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py +101 -0
- singlestoredb/mysql/times.py +23 -0
- singlestoredb/pytest.py +283 -0
- singlestoredb/tests/empty.sql +0 -0
- singlestoredb/tests/ext_funcs/__init__.py +385 -0
- singlestoredb/tests/test.sql +210 -0
- singlestoredb/tests/test2.sql +1 -0
- singlestoredb/tests/test_basics.py +482 -117
- singlestoredb/tests/test_config.py +13 -15
- singlestoredb/tests/test_connection.py +241 -289
- singlestoredb/tests/test_dbapi.py +27 -0
- singlestoredb/tests/test_exceptions.py +0 -2
- singlestoredb/tests/test_ext_func.py +1193 -0
- singlestoredb/tests/test_ext_func_data.py +1101 -0
- singlestoredb/tests/test_fusion.py +465 -0
- singlestoredb/tests/test_http.py +32 -28
- singlestoredb/tests/test_management.py +588 -10
- singlestoredb/tests/test_plugin.py +33 -0
- singlestoredb/tests/test_results.py +11 -14
- singlestoredb/tests/test_types.py +0 -2
- singlestoredb/tests/test_udf.py +687 -0
- singlestoredb/tests/test_xdict.py +0 -2
- singlestoredb/tests/utils.py +3 -4
- singlestoredb/types.py +4 -5
- singlestoredb/utils/config.py +71 -12
- singlestoredb/utils/convert_rows.py +0 -2
- singlestoredb/utils/debug.py +13 -0
- singlestoredb/utils/mogrify.py +151 -0
- singlestoredb/utils/results.py +4 -3
- singlestoredb/utils/xdict.py +12 -12
- singlestoredb-1.0.3.dist-info/METADATA +139 -0
- singlestoredb-1.0.3.dist-info/RECORD +112 -0
- {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/WHEEL +1 -1
- singlestoredb-1.0.3.dist-info/entry_points.txt +2 -0
- singlestoredb/drivers/__init__.py +0 -46
- singlestoredb/drivers/base.py +0 -200
- singlestoredb/drivers/cymysql.py +0 -40
- singlestoredb/drivers/http.py +0 -49
- singlestoredb/drivers/mariadb.py +0 -42
- singlestoredb/drivers/mysqlconnector.py +0 -51
- singlestoredb/drivers/mysqldb.py +0 -62
- singlestoredb/drivers/pymysql.py +0 -39
- singlestoredb/drivers/pyodbc.py +0 -67
- singlestoredb/http.py +0 -794
- singlestoredb-0.3.3.dist-info/METADATA +0 -105
- singlestoredb-0.3.3.dist-info/RECORD +0 -46
- {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/LICENSE +0 -0
- {singlestoredb-0.3.3.dist-info → singlestoredb-1.0.3.dist-info}/top_level.txt +0 -0
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
#
|
|
19
19
|
# This file originally copied from https://github.com/sassoftware/python-swat
|
|
20
20
|
#
|
|
21
|
-
from __future__ import annotations
|
|
22
|
-
|
|
23
21
|
import unittest
|
|
24
22
|
|
|
25
23
|
from singlestoredb.config import check_bool
|
|
@@ -77,17 +75,17 @@ class TestConfig(unittest.TestCase):
|
|
|
77
75
|
reset_option('results')
|
|
78
76
|
|
|
79
77
|
def test_shortcut_options(self):
|
|
80
|
-
|
|
78
|
+
asize = get_option('results.arraysize')
|
|
81
79
|
token = get_option('management.token')
|
|
82
80
|
|
|
83
|
-
self.assertEqual(get_option('
|
|
84
|
-
self.assertEqual(options.
|
|
81
|
+
self.assertEqual(get_option('arraysize'), asize)
|
|
82
|
+
self.assertEqual(options.arraysize, asize)
|
|
85
83
|
|
|
86
|
-
options.
|
|
84
|
+
options.arraysize = 20
|
|
87
85
|
|
|
88
|
-
self.assertEqual(get_option('results.
|
|
89
|
-
self.assertEqual(options.results.
|
|
90
|
-
self.assertEqual(options.
|
|
86
|
+
self.assertEqual(get_option('results.arraysize'), 20)
|
|
87
|
+
self.assertEqual(options.results.arraysize, 20)
|
|
88
|
+
self.assertEqual(options.arraysize, 20)
|
|
91
89
|
|
|
92
90
|
self.assertEqual(get_option('token'), token)
|
|
93
91
|
self.assertEqual(get_option('management.token'), token)
|
|
@@ -127,14 +125,14 @@ class TestConfig(unittest.TestCase):
|
|
|
127
125
|
|
|
128
126
|
def test_errors(self):
|
|
129
127
|
with self.assertRaises(ValueError):
|
|
130
|
-
set_option('
|
|
128
|
+
set_option('credential_type', 'foo')
|
|
131
129
|
|
|
132
130
|
def test_doc(self):
|
|
133
|
-
out = describe_option('results.
|
|
131
|
+
out = describe_option('results.arraysize', 'local_infile', _print_desc=False)
|
|
134
132
|
for line in out.split('\n'):
|
|
135
133
|
if not line or line.startswith(' '):
|
|
136
134
|
continue
|
|
137
|
-
self.assertRegex(line, r'^(results\.
|
|
135
|
+
self.assertRegex(line, r'^(results\.arraysize|local_infile)')
|
|
138
136
|
|
|
139
137
|
# Displays entire option hierarchy
|
|
140
138
|
out = describe_option('management', _print_desc=False)
|
|
@@ -157,7 +155,7 @@ class TestConfig(unittest.TestCase):
|
|
|
157
155
|
def test_suboptions(self):
|
|
158
156
|
self.assertEqual(
|
|
159
157
|
list(sorted(get_suboptions('results').keys())),
|
|
160
|
-
['arraysize', '
|
|
158
|
+
['arraysize', 'type'],
|
|
161
159
|
)
|
|
162
160
|
|
|
163
161
|
with self.assertRaises(KeyError):
|
|
@@ -165,10 +163,10 @@ class TestConfig(unittest.TestCase):
|
|
|
165
163
|
|
|
166
164
|
# This is an option, not a level in the hierarchy
|
|
167
165
|
with self.assertRaises(TypeError):
|
|
168
|
-
get_suboptions('results.
|
|
166
|
+
get_suboptions('results.arraysize')
|
|
169
167
|
|
|
170
168
|
def test_get_default(self):
|
|
171
|
-
self.assertEqual(get_default('results.
|
|
169
|
+
self.assertEqual(get_default('results.arraysize'), 1)
|
|
172
170
|
|
|
173
171
|
with self.assertRaises(KeyError):
|
|
174
172
|
get_default('results.foo')
|