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
singlestoredb/tests/test.sql
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
CREATE ROWSTORE TABLE IF NOT EXISTS data (
|
|
2
3
|
id VARCHAR(255) NOT NULL,
|
|
3
4
|
name VARCHAR(255) NOT NULL,
|
|
@@ -13,6 +14,21 @@ INSERT INTO data SET id='e', name='elephants', value=0;
|
|
|
13
14
|
|
|
14
15
|
COMMIT;
|
|
15
16
|
|
|
17
|
+
CREATE ROWSTORE TABLE IF NOT EXISTS data_with_nulls (
|
|
18
|
+
id VARCHAR(255) NOT NULL,
|
|
19
|
+
name VARCHAR(255),
|
|
20
|
+
value BIGINT,
|
|
21
|
+
PRIMARY KEY (id) USING HASH
|
|
22
|
+
) DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci;
|
|
23
|
+
|
|
24
|
+
INSERT INTO data_with_nulls SET id='a', name='antelopes', value=2;
|
|
25
|
+
INSERT INTO data_with_nulls SET id='b', name=NULL, value=2;
|
|
26
|
+
INSERT INTO data_with_nulls SET id='c', name=NULL, value=5;
|
|
27
|
+
INSERT INTO data_with_nulls SET id='d', name='dogs', value=NULL;
|
|
28
|
+
INSERT INTO data_with_nulls SET id='e', name='elephants', value=0;
|
|
29
|
+
|
|
30
|
+
COMMIT;
|
|
31
|
+
|
|
16
32
|
CREATE OR REPLACE PROCEDURE get_animal(nm VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci) AS
|
|
17
33
|
BEGIN
|
|
18
34
|
ECHO SELECT value FROM data WHERE name = nm; --
|
|
@@ -186,4 +202,198 @@ INSERT INTO alltypes SET
|
|
|
186
202
|
`bit`=NULL
|
|
187
203
|
;
|
|
188
204
|
|
|
205
|
+
-- Minimum values
|
|
206
|
+
INSERT INTO alltypes SET
|
|
207
|
+
`id`=2,
|
|
208
|
+
`tinyint`=-128,
|
|
209
|
+
`unsigned_tinyint`=0,
|
|
210
|
+
`bool`=-128,
|
|
211
|
+
`boolean`=-128,
|
|
212
|
+
`smallint`=-32768,
|
|
213
|
+
`unsigned_smallint`=0,
|
|
214
|
+
`mediumint`=-8388608,
|
|
215
|
+
`unsigned_mediumint`=0,
|
|
216
|
+
`int24`=-8388608,
|
|
217
|
+
`unsigned_int24`=0,
|
|
218
|
+
`int`=-2147483648,
|
|
219
|
+
`unsigned_int`=0,
|
|
220
|
+
`integer`=-2147483648,
|
|
221
|
+
`unsigned_integer`=0,
|
|
222
|
+
`bigint`=-9223372036854775808,
|
|
223
|
+
`unsigned_bigint`=0,
|
|
224
|
+
`float`=0,
|
|
225
|
+
`double`=-1.7976931348623158e308,
|
|
226
|
+
`real`=-1.7976931348623158e308,
|
|
227
|
+
`decimal`=-99999999999999.999999,
|
|
228
|
+
`dec`=-99999999999999.999999,
|
|
229
|
+
`fixed`=-99999999999999.999999,
|
|
230
|
+
`numeric`=-99999999999999.999999,
|
|
231
|
+
`date`='1000-01-01',
|
|
232
|
+
`time`='-838:59:59',
|
|
233
|
+
`time_6`='-838:59:59.000000',
|
|
234
|
+
`datetime`='1000-01-01 00:00:00',
|
|
235
|
+
`datetime_6`='1000-01-01 00:00:00.000000',
|
|
236
|
+
`timestamp`='1970-01-01 00:00:01',
|
|
237
|
+
`timestamp_6`='1970-01-01 00:00:01.000000',
|
|
238
|
+
`year`=1901,
|
|
239
|
+
`char_100`='',
|
|
240
|
+
`binary_100`=x'',
|
|
241
|
+
`varchar_200`='',
|
|
242
|
+
`varbinary_200`=x'',
|
|
243
|
+
`longtext`='',
|
|
244
|
+
`mediumtext`='',
|
|
245
|
+
`text`='',
|
|
246
|
+
`tinytext`='',
|
|
247
|
+
`longblob`=x'',
|
|
248
|
+
`mediumblob`=x'',
|
|
249
|
+
`blob`=x'',
|
|
250
|
+
`tinyblob`=x'',
|
|
251
|
+
`json`='{}',
|
|
252
|
+
`enum`='one',
|
|
253
|
+
`set`='two',
|
|
254
|
+
`bit`=0
|
|
255
|
+
;
|
|
256
|
+
|
|
257
|
+
-- Maximum values
|
|
258
|
+
INSERT INTO alltypes SET
|
|
259
|
+
`id`=3,
|
|
260
|
+
`tinyint`=127,
|
|
261
|
+
`unsigned_tinyint`=255,
|
|
262
|
+
`bool`=127,
|
|
263
|
+
`boolean`=127,
|
|
264
|
+
`smallint`=32767,
|
|
265
|
+
`unsigned_smallint`=65535,
|
|
266
|
+
`mediumint`=8388607,
|
|
267
|
+
`unsigned_mediumint`=16777215,
|
|
268
|
+
`int24`=8388607,
|
|
269
|
+
`unsigned_int24`=16777215,
|
|
270
|
+
`int`=2147483647,
|
|
271
|
+
`unsigned_int`=4294967295,
|
|
272
|
+
`integer`=2147483647,
|
|
273
|
+
`unsigned_integer`=4294967295,
|
|
274
|
+
`bigint`=9223372036854775807,
|
|
275
|
+
`unsigned_bigint`=18446744073709551615,
|
|
276
|
+
`float`=0,
|
|
277
|
+
`double`=1.7976931348623158e308,
|
|
278
|
+
`real`=1.7976931348623158e308,
|
|
279
|
+
`decimal`=99999999999999.999999,
|
|
280
|
+
`dec`=99999999999999.999999,
|
|
281
|
+
`fixed`=99999999999999.999999,
|
|
282
|
+
`numeric`=99999999999999.999999,
|
|
283
|
+
`date`='9999-12-31',
|
|
284
|
+
`time`='838:59:59',
|
|
285
|
+
`time_6`='838:59:59.999999',
|
|
286
|
+
`datetime`='9999-12-31 23:59:59',
|
|
287
|
+
`datetime_6`='9999-12-31 23:59:59.999999',
|
|
288
|
+
`timestamp`='2038-01-18 21:14:07',
|
|
289
|
+
`timestamp_6`='2038-01-18 21:14:07.999999',
|
|
290
|
+
`year`=2155,
|
|
291
|
+
`char_100`='',
|
|
292
|
+
`binary_100`=x'',
|
|
293
|
+
`varchar_200`='',
|
|
294
|
+
`varbinary_200`=x'',
|
|
295
|
+
`longtext`='',
|
|
296
|
+
`mediumtext`='',
|
|
297
|
+
`text`='',
|
|
298
|
+
`tinytext`='',
|
|
299
|
+
`longblob`=x'',
|
|
300
|
+
`mediumblob`=x'',
|
|
301
|
+
`blob`=x'',
|
|
302
|
+
`tinyblob`=x'',
|
|
303
|
+
`json`='{}',
|
|
304
|
+
`enum`='one',
|
|
305
|
+
`set`='two',
|
|
306
|
+
`bit`=18446744073709551615
|
|
307
|
+
;
|
|
308
|
+
|
|
309
|
+
-- Zero values
|
|
310
|
+
--
|
|
311
|
+
-- Note that v8 of SingleStoreDB does not allow zero date/times by
|
|
312
|
+
-- default, so they are set to NULL here.
|
|
313
|
+
--
|
|
314
|
+
INSERT INTO alltypes SET
|
|
315
|
+
`id`=4,
|
|
316
|
+
`tinyint`=0,
|
|
317
|
+
`unsigned_tinyint`=0,
|
|
318
|
+
`bool`=0,
|
|
319
|
+
`boolean`=0,
|
|
320
|
+
`smallint`=0,
|
|
321
|
+
`unsigned_smallint`=0,
|
|
322
|
+
`mediumint`=0,
|
|
323
|
+
`unsigned_mediumint`=0,
|
|
324
|
+
`int24`=0,
|
|
325
|
+
`unsigned_int24`=0,
|
|
326
|
+
`int`=0,
|
|
327
|
+
`unsigned_int`=0,
|
|
328
|
+
`integer`=0,
|
|
329
|
+
`unsigned_integer`=0,
|
|
330
|
+
`bigint`=0,
|
|
331
|
+
`unsigned_bigint`=0,
|
|
332
|
+
`float`=0,
|
|
333
|
+
`double`=0.0,
|
|
334
|
+
`real`=0.0,
|
|
335
|
+
`decimal`=0.0,
|
|
336
|
+
`dec`=0.0,
|
|
337
|
+
`fixed`=0.0,
|
|
338
|
+
`numeric`=0.0,
|
|
339
|
+
`date`=NULL,
|
|
340
|
+
`time`='00:00:00',
|
|
341
|
+
`time_6`='00:00:00.000000',
|
|
342
|
+
`datetime`=NULL,
|
|
343
|
+
`datetime_6`=NULL,
|
|
344
|
+
`timestamp`=NULL,
|
|
345
|
+
`timestamp_6`=NULL,
|
|
346
|
+
`year`=NULL,
|
|
347
|
+
`char_100`='',
|
|
348
|
+
`binary_100`=x'',
|
|
349
|
+
`varchar_200`='',
|
|
350
|
+
`varbinary_200`=x'',
|
|
351
|
+
`longtext`='',
|
|
352
|
+
`mediumtext`='',
|
|
353
|
+
`text`='',
|
|
354
|
+
`tinytext`='',
|
|
355
|
+
`longblob`=x'',
|
|
356
|
+
`mediumblob`=x'',
|
|
357
|
+
`blob`=x'',
|
|
358
|
+
`tinyblob`=x'',
|
|
359
|
+
`json`='{}',
|
|
360
|
+
`enum`='one',
|
|
361
|
+
`set`='two',
|
|
362
|
+
`bit`=0
|
|
363
|
+
;
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
--
|
|
367
|
+
-- Table of extended data types
|
|
368
|
+
--
|
|
369
|
+
CREATE ROWSTORE TABLE IF NOT EXISTS `extended_types` (
|
|
370
|
+
`id` INT(11),
|
|
371
|
+
`geography` GEOGRAPHY,
|
|
372
|
+
`geographypoint` GEOGRAPHYPOINT,
|
|
373
|
+
`vectors` BLOB,
|
|
374
|
+
`dt` DATETIME,
|
|
375
|
+
`d` DATE,
|
|
376
|
+
`t` TIME,
|
|
377
|
+
`td` TIME,
|
|
378
|
+
`testkey` LONGTEXT
|
|
379
|
+
)
|
|
380
|
+
COLLATE='utf8_unicode_ci';
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
--
|
|
384
|
+
-- Invalid utf8 table
|
|
385
|
+
--
|
|
386
|
+
-- These sequences were breaking during fetch on a customer's machine
|
|
387
|
+
-- however, they seem to work fine in our tests.
|
|
388
|
+
--
|
|
389
|
+
CREATE TABLE IF NOT EXISTS `badutf8` (
|
|
390
|
+
`text` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
|
|
391
|
+
)
|
|
392
|
+
COLLATE='utf8_unicode_ci';
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
INSERT INTO `badutf8` VALUES ('π₯·π§π».eth');
|
|
396
|
+
INSERT INTO `badutf8` VALUES ('π₯rick.eth');
|
|
397
|
+
|
|
398
|
+
|
|
189
399
|
COMMIT;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-- Nearly empty file for Stages test
|