mysqlengine 0.1.11.5__cp311-cp311-macosx_10_9_universal2.whl → 0.1.11.7__cp311-cp311-macosx_10_9_universal2.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 mysqlengine might be problematic. Click here for more details.
- mysqlengine/charset.cpython-311-darwin.so +0 -0
- mysqlengine/column.cpython-311-darwin.so +0 -0
- mysqlengine/connection.c +9160 -10193
- mysqlengine/connection.cpython-311-darwin.so +0 -0
- mysqlengine/connection.py +25 -66
- mysqlengine/constant.cpython-311-darwin.so +0 -0
- mysqlengine/database.c +13436 -12308
- mysqlengine/database.cpython-311-darwin.so +0 -0
- mysqlengine/database.py +35 -1
- mysqlengine/dtype.c +140 -140
- mysqlengine/dtype.cpython-311-darwin.so +0 -0
- mysqlengine/engine.c +503 -287
- mysqlengine/engine.cpython-311-darwin.so +0 -0
- mysqlengine/engine.py +7 -0
- mysqlengine/errors.cpython-311-darwin.so +0 -0
- mysqlengine/index.cpython-311-darwin.so +0 -0
- mysqlengine/protocol.cpython-311-darwin.so +0 -0
- mysqlengine/query.c +140 -140
- mysqlengine/query.cpython-311-darwin.so +0 -0
- mysqlengine/regex.cpython-311-darwin.so +0 -0
- mysqlengine/settings.cpython-311-darwin.so +0 -0
- mysqlengine/transcode.c +140 -140
- mysqlengine/transcode.cpython-311-darwin.so +0 -0
- mysqlengine/utils.c +810 -650
- mysqlengine/utils.cpython-311-darwin.so +0 -0
- {mysqlengine-0.1.11.5.dist-info → mysqlengine-0.1.11.7.dist-info}/METADATA +2 -2
- {mysqlengine-0.1.11.5.dist-info → mysqlengine-0.1.11.7.dist-info}/RECORD +30 -30
- {mysqlengine-0.1.11.5.dist-info → mysqlengine-0.1.11.7.dist-info}/LICENSE +0 -0
- {mysqlengine-0.1.11.5.dist-info → mysqlengine-0.1.11.7.dist-info}/WHEEL +0 -0
- {mysqlengine-0.1.11.5.dist-info → mysqlengine-0.1.11.7.dist-info}/top_level.txt +0 -0
|
Binary file
|
mysqlengine/database.py
CHANGED
|
@@ -24,6 +24,7 @@ from cython.cimports.cpython.unicode import PyUnicode_GET_LENGTH as str_len # t
|
|
|
24
24
|
from cython.cimports.cpython.unicode import PyUnicode_Contains as str_contains # type: ignore
|
|
25
25
|
from cython.cimports.cytimes.pydt import pydt # type: ignore
|
|
26
26
|
from cython.cimports.cytimes.pddt import pddt # type: ignore
|
|
27
|
+
from cython.cimports.cytimes import cydatetime as cydt # type: ignore
|
|
27
28
|
from cython.cimports.mysqlengine import errors, settings, transcode, utils # type: ignore
|
|
28
29
|
from cython.cimports.mysqlengine.regex import Regex, TableRegex # type: ignore
|
|
29
30
|
from cython.cimports.mysqlengine.index import TableIndexes, Index # type: ignore
|
|
@@ -37,13 +38,14 @@ np.import_array()
|
|
|
37
38
|
datetime.import_datetime()
|
|
38
39
|
|
|
39
40
|
# Python imports
|
|
40
|
-
from typing import Any, Union, Literal, Iterator
|
|
41
41
|
import os, datetime
|
|
42
42
|
from uuid import uuid4
|
|
43
43
|
from asyncio import gather, wait_for
|
|
44
|
+
from typing import Any, Union, Literal, Iterator
|
|
44
45
|
from pandas import DataFrame, Series, read_parquet
|
|
45
46
|
from cytimes.pydt import pydt
|
|
46
47
|
from cytimes.pddt import pddt
|
|
48
|
+
from cytimes import cydatetime as cydt
|
|
47
49
|
from mysqlengine.logs import logger
|
|
48
50
|
from mysqlengine import errors, settings, transcode, utils
|
|
49
51
|
from mysqlengine.regex import Regex, TableRegex
|
|
@@ -2601,6 +2603,22 @@ class Table:
|
|
|
2601
2603
|
"""
|
|
2602
2604
|
return Series(df.values.tolist(), index=df.index).apply(self._escape_item)
|
|
2603
2605
|
|
|
2606
|
+
def gen_dt_now(self) -> datetime.datetime:
|
|
2607
|
+
"Generate datetime based on the current local time `<datetime.datetime>`."
|
|
2608
|
+
return cydt.gen_dt_now()
|
|
2609
|
+
|
|
2610
|
+
def gen_dt_utcnow(self) -> datetime.datetime:
|
|
2611
|
+
"Generate datetime based on the UTC time (timezone-aware) `<datetime.datetime>`."
|
|
2612
|
+
return cydt.gen_dt_utcnow()
|
|
2613
|
+
|
|
2614
|
+
def gen_time_now(self) -> datetime.time:
|
|
2615
|
+
"Generate time based on the current local time `<datetime.time>."
|
|
2616
|
+
return cydt.gen_time_now()
|
|
2617
|
+
|
|
2618
|
+
def gen_time_utcnow(self) -> datetime.time:
|
|
2619
|
+
"Generate time based on the UTC time (timezone-aware) `<datetime.time>."
|
|
2620
|
+
return cydt.gen_time_utcnow()
|
|
2621
|
+
|
|
2604
2622
|
# Export & Import -----------------------------------------------------
|
|
2605
2623
|
async def export_data(self, dir: str) -> int:
|
|
2606
2624
|
"""Export table data to a local directory.
|
|
@@ -6229,6 +6247,22 @@ class Database:
|
|
|
6229
6247
|
"""
|
|
6230
6248
|
return Series(df.values.tolist(), index=df.index).apply(self._escape_item)
|
|
6231
6249
|
|
|
6250
|
+
def gen_dt_now(self) -> datetime.datetime:
|
|
6251
|
+
"Generate datetime based on the current local time `<datetime.datetime>`."
|
|
6252
|
+
return cydt.gen_dt_now()
|
|
6253
|
+
|
|
6254
|
+
def gen_dt_utcnow(self) -> datetime.datetime:
|
|
6255
|
+
"Generate datetime based on the UTC time (timezone-aware) `<datetime.datetime>`."
|
|
6256
|
+
return cydt.gen_dt_utcnow()
|
|
6257
|
+
|
|
6258
|
+
def gen_time_now(self) -> datetime.time:
|
|
6259
|
+
"Generate time based on the current local time `<datetime.time>."
|
|
6260
|
+
return cydt.gen_time_now()
|
|
6261
|
+
|
|
6262
|
+
def gen_time_utcnow(self) -> datetime.time:
|
|
6263
|
+
"Generate time based on the UTC time (timezone-aware) `<datetime.time>."
|
|
6264
|
+
return cydt.gen_time_utcnow()
|
|
6265
|
+
|
|
6232
6266
|
# Export & Import -----------------------------------------------------
|
|
6233
6267
|
async def export_data(self, dir: str) -> int:
|
|
6234
6268
|
"""Export Database table data to a local directory synchronously.
|