sqlpiston 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.
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/PKG-INFO +4 -1
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/engine/mysql.py +8 -7
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston.egg-info/PKG-INFO +4 -1
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston.egg-info/requires.txt +4 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/pyproject.toml +5 -1
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/LICENSE +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/README.md +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/_types.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/builder/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/builder/ddl.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/builder/dml.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/builder/nodes.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/builder/selectable.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/compiler/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/compiler/base.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/compiler/mysql.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/compiler/sqlite.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/engine/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/engine/base.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/engine/sqlite.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/pool.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/core/session.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/orm/__init__.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston/orm/mapper.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston.egg-info/SOURCES.txt +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston.egg-info/dependency_links.txt +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/lib/sqlpiston.egg-info/top_level.txt +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/setup.cfg +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_compiler_coverage.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_compiler_ddl.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_compiler_mysql.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_compiler_sqlite.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_coverage_final.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_coverage_final2.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_coverage_final3.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_coverage_gaps.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_ddl.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_dml.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_engine.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_final_gaps.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_integration.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_mapper.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_nodes.py +0 -0
- {sqlpiston-0.1.0 → sqlpiston-0.1.1}/tests/test_selectable.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlpiston
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A low-level SQL library that builds parameterized SQL queries through Python operator overloading
|
|
5
5
|
Author: MuliMuri
|
|
6
6
|
License: MIT
|
|
@@ -23,6 +23,9 @@ Requires-Dist: pytest>=8; extra == "dev"
|
|
|
23
23
|
Requires-Dist: coverage>=7; extra == "dev"
|
|
24
24
|
Requires-Dist: flake8>=7; extra == "dev"
|
|
25
25
|
Requires-Dist: mypy>=1; extra == "dev"
|
|
26
|
+
Requires-Dist: types-PyMySQL>=1; extra == "dev"
|
|
27
|
+
Provides-Extra: mysql
|
|
28
|
+
Requires-Dist: pymysql>=1; extra == "mysql"
|
|
26
29
|
Dynamic: license-file
|
|
27
30
|
|
|
28
31
|
# SQLPiston
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
from typing import Any, Dict, List, Optional, Tuple, cast
|
|
2
2
|
|
|
3
|
+
import pymysql
|
|
4
|
+
|
|
3
5
|
from sqlpiston.builder.nodes import ExprValue
|
|
4
6
|
from sqlpiston._types import SQLValue
|
|
5
7
|
from sqlpiston.compiler.mysql import MySQLDialect
|
|
6
8
|
from sqlpiston.core.engine.base import Connection, Cursor, Engine
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
class MySQLCursor(Cursor): # pragma: no cover — requires
|
|
11
|
+
class MySQLCursor(Cursor): # pragma: no cover — requires pymysql (optional dependency)
|
|
10
12
|
def __init__(self, raw_cursor: Any) -> None:
|
|
11
13
|
self._cursor = raw_cursor
|
|
12
14
|
|
|
@@ -22,14 +24,14 @@ class MySQLCursor(Cursor): # pragma: no cover — requires mysql.connector (opt
|
|
|
22
24
|
return int(self._cursor.rowcount)
|
|
23
25
|
|
|
24
26
|
@property
|
|
25
|
-
def description(self) -> List[Tuple[str, int, Any, Any, Any, Any, Any]]: # pragma: no cover — requires
|
|
27
|
+
def description(self) -> List[Tuple[str, int, Any, Any, Any, Any, Any]]: # pragma: no cover — requires pymysql
|
|
26
28
|
desc = self._cursor.description
|
|
27
29
|
if desc is None:
|
|
28
30
|
return []
|
|
29
31
|
return cast(List[Tuple[str, int, Any, Any, Any, Any, Any]], desc)
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
class MySQLConnection(Connection): # pragma: no cover — requires
|
|
34
|
+
class MySQLConnection(Connection): # pragma: no cover — requires pymysql (optional dependency)
|
|
33
35
|
def __init__(self, raw_conn: Any) -> None:
|
|
34
36
|
self._conn = raw_conn
|
|
35
37
|
|
|
@@ -67,14 +69,13 @@ class MySQLEngine(Engine):
|
|
|
67
69
|
def dialect(self) -> MySQLDialect:
|
|
68
70
|
return MySQLDialect()
|
|
69
71
|
|
|
70
|
-
def connect(self) -> MySQLConnection: # pragma: no cover — requires
|
|
72
|
+
def connect(self) -> MySQLConnection: # pragma: no cover — requires pymysql (optional dependency)
|
|
71
73
|
if self._config is None:
|
|
72
74
|
raise RuntimeError("Call init_engine() before connect()")
|
|
73
|
-
|
|
74
|
-
self._conn = mysql.connector.connect(**self._config)
|
|
75
|
+
self._conn = pymysql.connect(**self._config)
|
|
75
76
|
return MySQLConnection(self._conn)
|
|
76
77
|
|
|
77
|
-
def close(self) -> None: # pragma: no cover — requires
|
|
78
|
+
def close(self) -> None: # pragma: no cover — requires pymysql
|
|
78
79
|
if self._conn:
|
|
79
80
|
self._conn.close()
|
|
80
81
|
self._conn = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlpiston
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A low-level SQL library that builds parameterized SQL queries through Python operator overloading
|
|
5
5
|
Author: MuliMuri
|
|
6
6
|
License: MIT
|
|
@@ -23,6 +23,9 @@ Requires-Dist: pytest>=8; extra == "dev"
|
|
|
23
23
|
Requires-Dist: coverage>=7; extra == "dev"
|
|
24
24
|
Requires-Dist: flake8>=7; extra == "dev"
|
|
25
25
|
Requires-Dist: mypy>=1; extra == "dev"
|
|
26
|
+
Requires-Dist: types-PyMySQL>=1; extra == "dev"
|
|
27
|
+
Provides-Extra: mysql
|
|
28
|
+
Requires-Dist: pymysql>=1; extra == "mysql"
|
|
26
29
|
Dynamic: license-file
|
|
27
30
|
|
|
28
31
|
# SQLPiston
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sqlpiston"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "A low-level SQL library that builds parameterized SQL queries through Python operator overloading"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -32,6 +32,10 @@ dev = [
|
|
|
32
32
|
"coverage>=7",
|
|
33
33
|
"flake8>=7",
|
|
34
34
|
"mypy>=1",
|
|
35
|
+
"types-PyMySQL>=1",
|
|
36
|
+
]
|
|
37
|
+
mysql = [
|
|
38
|
+
"pymysql>=1",
|
|
35
39
|
]
|
|
36
40
|
|
|
37
41
|
[tool.setuptools.packages.find]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|