MySQLX 2.2.6__tar.gz → 2.2.8__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.
- {mysqlx-2.2.6 → MySQLX-2.2.8/MySQLX.egg-info}/PKG-INFO +8 -4
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8/MySQLX.egg-info}/SOURCES.txt +7 -7
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8}/PKG-INFO +8 -4
- {mysqlx-2.2.6 → MySQLX-2.2.8}/README.rst +6 -2
- MySQLX-2.2.8/mysqlx/sql_id_exec.py +42 -0
- MySQLX-2.2.8/mysqlx/sql_page_exec.py +30 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/setup.py +2 -2
- mysqlx-2.2.6/mysqlx/sql_id_exec.py +0 -25
- mysqlx-2.2.6/mysqlx/sql_page_exec.py +0 -12
- {mysqlx-2.2.6 → MySQLX-2.2.8}/LICENSE +0 -0
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8/MySQLX.egg-info}/dependency_links.txt +0 -0
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8/MySQLX.egg-info}/not-zip-safe +0 -0
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8/MySQLX.egg-info}/requires.txt +0 -0
- {mysqlx-2.2.6/mysqlx.egg-info → MySQLX-2.2.8/MySQLX.egg-info}/top_level.txt +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/__init__.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/constant.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/db.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/dbx.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/log_support.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/sql_holder.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/sql_mapper.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/sql_support.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/mysqlx/support.py +0 -0
- {mysqlx-2.2.6 → MySQLX-2.2.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2.2.
|
|
2
|
+
Name: MySQLX
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: A thread safe sql executor for MySQL like MyBatis with connection pool. It helps you automatically manage database connections and transactions.
|
|
5
5
|
Home-page: https://gitee.com/summry/mysqlx
|
|
6
6
|
Author: summy
|
|
@@ -115,10 +115,10 @@ Usage Sample
|
|
|
115
115
|
# (3, 'zhangsan', 15)
|
|
116
116
|
|
|
117
117
|
# you can direct execute sql with db
|
|
118
|
-
effected_rowcount = db.table('
|
|
118
|
+
effected_rowcount = db.table('user').insert(name='zhangsan', age=15)
|
|
119
119
|
# 1
|
|
120
120
|
|
|
121
|
-
primary_key = db.table('
|
|
121
|
+
primary_key = db.table('user').save(name='lisi', age=26)
|
|
122
122
|
# 4
|
|
123
123
|
|
|
124
124
|
effected_rowcount = db.insert(table='user', name='wangwu', age=38)
|
|
@@ -134,6 +134,10 @@ Usage Sample
|
|
|
134
134
|
# result:
|
|
135
135
|
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
136
136
|
|
|
137
|
+
users = db.table('user').columns('id, name, age').where(name__eq='zhangsan').query()
|
|
138
|
+
# result:
|
|
139
|
+
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
140
|
+
|
|
137
141
|
users = db.select('select id, name, age from user')
|
|
138
142
|
# result:
|
|
139
143
|
# (3, 'zhangsan', 15)
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.rst
|
|
3
3
|
setup.py
|
|
4
|
+
MySQLX.egg-info/PKG-INFO
|
|
5
|
+
MySQLX.egg-info/SOURCES.txt
|
|
6
|
+
MySQLX.egg-info/dependency_links.txt
|
|
7
|
+
MySQLX.egg-info/not-zip-safe
|
|
8
|
+
MySQLX.egg-info/requires.txt
|
|
9
|
+
MySQLX.egg-info/top_level.txt
|
|
4
10
|
mysqlx/__init__.py
|
|
5
11
|
mysqlx/constant.py
|
|
6
12
|
mysqlx/db.py
|
|
@@ -11,10 +17,4 @@ mysqlx/sql_id_exec.py
|
|
|
11
17
|
mysqlx/sql_mapper.py
|
|
12
18
|
mysqlx/sql_page_exec.py
|
|
13
19
|
mysqlx/sql_support.py
|
|
14
|
-
mysqlx/support.py
|
|
15
|
-
mysqlx.egg-info/PKG-INFO
|
|
16
|
-
mysqlx.egg-info/SOURCES.txt
|
|
17
|
-
mysqlx.egg-info/dependency_links.txt
|
|
18
|
-
mysqlx.egg-info/not-zip-safe
|
|
19
|
-
mysqlx.egg-info/requires.txt
|
|
20
|
-
mysqlx.egg-info/top_level.txt
|
|
20
|
+
mysqlx/support.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2.2.
|
|
2
|
+
Name: MySQLX
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: A thread safe sql executor for MySQL like MyBatis with connection pool. It helps you automatically manage database connections and transactions.
|
|
5
5
|
Home-page: https://gitee.com/summry/mysqlx
|
|
6
6
|
Author: summy
|
|
@@ -115,10 +115,10 @@ Usage Sample
|
|
|
115
115
|
# (3, 'zhangsan', 15)
|
|
116
116
|
|
|
117
117
|
# you can direct execute sql with db
|
|
118
|
-
effected_rowcount = db.table('
|
|
118
|
+
effected_rowcount = db.table('user').insert(name='zhangsan', age=15)
|
|
119
119
|
# 1
|
|
120
120
|
|
|
121
|
-
primary_key = db.table('
|
|
121
|
+
primary_key = db.table('user').save(name='lisi', age=26)
|
|
122
122
|
# 4
|
|
123
123
|
|
|
124
124
|
effected_rowcount = db.insert(table='user', name='wangwu', age=38)
|
|
@@ -134,6 +134,10 @@ Usage Sample
|
|
|
134
134
|
# result:
|
|
135
135
|
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
136
136
|
|
|
137
|
+
users = db.table('user').columns('id, name, age').where(name__eq='zhangsan').query()
|
|
138
|
+
# result:
|
|
139
|
+
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
140
|
+
|
|
137
141
|
users = db.select('select id, name, age from user')
|
|
138
142
|
# result:
|
|
139
143
|
# (3, 'zhangsan', 15)
|
|
@@ -101,10 +101,10 @@ Usage Sample
|
|
|
101
101
|
# (3, 'zhangsan', 15)
|
|
102
102
|
|
|
103
103
|
# you can direct execute sql with db
|
|
104
|
-
effected_rowcount = db.table('
|
|
104
|
+
effected_rowcount = db.table('user').insert(name='zhangsan', age=15)
|
|
105
105
|
# 1
|
|
106
106
|
|
|
107
|
-
primary_key = db.table('
|
|
107
|
+
primary_key = db.table('user').save(name='lisi', age=26)
|
|
108
108
|
# 4
|
|
109
109
|
|
|
110
110
|
effected_rowcount = db.insert(table='user', name='wangwu', age=38)
|
|
@@ -120,6 +120,10 @@ Usage Sample
|
|
|
120
120
|
# result:
|
|
121
121
|
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
122
122
|
|
|
123
|
+
users = db.table('user').columns('id, name, age').where(name__eq='zhangsan').query()
|
|
124
|
+
# result:
|
|
125
|
+
# [{'id': 3, 'name': 'zhangsan', 'age': 15}]
|
|
126
|
+
|
|
123
127
|
users = db.select('select id, name, age from user')
|
|
124
128
|
# result:
|
|
125
129
|
# (3, 'zhangsan', 15)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from . import dbx
|
|
2
|
+
from sqlexecx.sql_exec import SqlExec
|
|
3
|
+
from sqlexecx.page_exec import PageExec
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SqlIdExec(SqlExec):
|
|
7
|
+
|
|
8
|
+
def save(self, *args, **kwargs):
|
|
9
|
+
"""
|
|
10
|
+
Insert data into table, return primary key.
|
|
11
|
+
|
|
12
|
+
:param args:
|
|
13
|
+
:return: Primary key
|
|
14
|
+
"""
|
|
15
|
+
return self.exec.save(self.sql, *args, **kwargs)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def sql(sql_id: str):
|
|
19
|
+
"""
|
|
20
|
+
Get a SqlIdExec instance
|
|
21
|
+
|
|
22
|
+
Examples
|
|
23
|
+
--------
|
|
24
|
+
>>> from mysqlx import dbx
|
|
25
|
+
>>> dbx.sql('user.select_all')
|
|
26
|
+
SqlIdExec()
|
|
27
|
+
"""
|
|
28
|
+
assert sql_id, "Parameter 'sql_id' must not be none"
|
|
29
|
+
return SqlIdExec(dbx, sql_id)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def page(page_num: int, page_size: int):
|
|
33
|
+
"""
|
|
34
|
+
Get a PageExec instance
|
|
35
|
+
|
|
36
|
+
Examples
|
|
37
|
+
--------
|
|
38
|
+
>>> from mysqlx import dbx
|
|
39
|
+
>>> dbx.page(1, 10)
|
|
40
|
+
PageExec()
|
|
41
|
+
"""
|
|
42
|
+
return PageExec(dbx, page_num, page_size)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from . import db
|
|
2
|
+
from sqlexecx.sql_exec import SqlExec
|
|
3
|
+
from sqlexecx.page_exec import PageExec
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def sql(sql: str):
|
|
7
|
+
"""
|
|
8
|
+
Get a SqlExec instance
|
|
9
|
+
|
|
10
|
+
Examples
|
|
11
|
+
--------
|
|
12
|
+
>>> from mysqlx import db
|
|
13
|
+
>>> db.sql('SELECT id, name, age FROM person')
|
|
14
|
+
SqlExec()
|
|
15
|
+
"""
|
|
16
|
+
assert sql, "Parameter 'sql' must not be none"
|
|
17
|
+
return SqlExec(db, sql)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def page(page_num: int, page_size: int):
|
|
21
|
+
"""
|
|
22
|
+
Get a PageExec instance
|
|
23
|
+
|
|
24
|
+
Examples
|
|
25
|
+
--------
|
|
26
|
+
>>> from mysqlx import db
|
|
27
|
+
>>> db.page(1, 10)
|
|
28
|
+
PageExec()
|
|
29
|
+
"""
|
|
30
|
+
return PageExec(db, page_num, page_size)
|
|
@@ -12,7 +12,7 @@ def read(rel_path: str) -> str:
|
|
|
12
12
|
long_description = read("README.rst")
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
|
-
name='
|
|
15
|
+
name='MySQLX',
|
|
16
16
|
packages=['mysqlx'],
|
|
17
17
|
description="A thread safe sql executor for MySQL like MyBatis with connection pool. It helps you automatically manage database connections and transactions.",
|
|
18
18
|
long_description=long_description,
|
|
@@ -21,7 +21,7 @@ setup(
|
|
|
21
21
|
'Jinja2>=2.7.0',
|
|
22
22
|
'sqlexecx>=2.1.4',
|
|
23
23
|
],
|
|
24
|
-
version='2.2.
|
|
24
|
+
version='2.2.8',
|
|
25
25
|
url='https://gitee.com/summry/mysqlx',
|
|
26
26
|
author='summy',
|
|
27
27
|
author_email='xiazhongbiao@126.com',
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from . import dbx
|
|
2
|
-
from sqlexecx.sql_exec import SqlExec as _SqlExec
|
|
3
|
-
from sqlexecx.page_exec import PageExec
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class SqlExec(_SqlExec):
|
|
7
|
-
|
|
8
|
-
def save(self, *args, **kwargs):
|
|
9
|
-
"""
|
|
10
|
-
Insert data into table, return primary key.
|
|
11
|
-
|
|
12
|
-
:param select_key: sql for select primary key
|
|
13
|
-
:param args:
|
|
14
|
-
:return: Primary key
|
|
15
|
-
"""
|
|
16
|
-
return self.exec.save(self.sql, *args, **kwargs)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def sql(sql: str) :
|
|
20
|
-
assert sql, "Parameter 'sql' must not be none"
|
|
21
|
-
return SqlExec(dbx, sql)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def page(page_num: int, page_size: int) :
|
|
25
|
-
return PageExec(dbx, page_num, page_size)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from . import db
|
|
2
|
-
from sqlexecx.sql_exec import SqlExec
|
|
3
|
-
from sqlexecx.page_exec import PageExec
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def sql(sql: str):
|
|
7
|
-
assert sql, "Parameter 'sql' must not be none"
|
|
8
|
-
return SqlExec(db, sql)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def page(page_num: int, page_size: int) :
|
|
12
|
-
return PageExec(db, page_num, page_size)
|
|
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
|