MySQLX 2.1.1__tar.gz → 2.1.3__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.1.1 → mysqlx-2.1.3}/PKG-INFO +32 -32
- {mysqlx-2.1.1 → mysqlx-2.1.3}/README.rst +31 -31
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx.egg-info/PKG-INFO +32 -32
- mysqlx-2.1.3/mysqlx.egg-info/requires.txt +1 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/setup.py +2 -2
- mysqlx-2.1.1/mysqlx.egg-info/requires.txt +0 -1
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx/__init__.py +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx/db.py +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx/dbx.py +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx/log_support.py +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx/orm.py +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx.egg-info/SOURCES.txt +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx.egg-info/dependency_links.txt +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx.egg-info/not-zip-safe +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/mysqlx.egg-info/top_level.txt +0 -0
- {mysqlx-2.1.1 → mysqlx-2.1.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mysqlx
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: A thread safe sql executor for MySQL like MyBatis with connection pool. It helps you automatically manage database connections and transactions. It also provides ORM operations for single tables.
|
|
5
5
|
Home-page: https://gitee.com/summry/mysqlx
|
|
6
6
|
Author: summy
|
|
@@ -19,28 +19,28 @@ Create a mapper file in 'mapper' folder, you can named
|
|
|
19
19
|
|
|
20
20
|
.. code:: xml
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
23
|
+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://gitee.com/summry/mysqlx/blob/master/dtd/mapper.dtd">
|
|
24
|
+
<mapper namespace="user">
|
|
25
|
+
<select id="select_all">
|
|
26
|
+
select id, name, age from user
|
|
27
|
+
</select>
|
|
28
|
+
|
|
29
|
+
<select id="select_by_name">
|
|
30
|
+
select id, name, age from user where name = ?
|
|
31
|
+
</select>
|
|
32
|
+
|
|
33
|
+
<select id="select_by_name2">
|
|
34
|
+
select id, name, age from user where name = :name
|
|
35
|
+
</select>
|
|
36
|
+
|
|
37
|
+
<select id="select_include" include="select_all">
|
|
38
|
+
{{ select_all }}
|
|
39
|
+
{% if name -%}
|
|
40
|
+
where name = :name
|
|
41
|
+
{%- endif -%}
|
|
42
|
+
</select>
|
|
43
|
+
</mapper>
|
|
44
44
|
|
|
45
45
|
Usage Sample
|
|
46
46
|
''''''''''''
|
|
@@ -158,19 +158,19 @@ Transaction
|
|
|
158
158
|
|
|
159
159
|
.. code:: python
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
from mysqlx import with_transaction, transaction
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
insert_func(....)
|
|
166
|
-
update_func(....)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def test_transaction2():
|
|
170
|
-
with transaction():
|
|
163
|
+
@with_transaction
|
|
164
|
+
def test_transaction():
|
|
171
165
|
insert_func(....)
|
|
172
166
|
update_func(....)
|
|
173
167
|
|
|
168
|
+
|
|
169
|
+
def test_transaction2():
|
|
170
|
+
with transaction():
|
|
171
|
+
insert_func(....)
|
|
172
|
+
update_func(....)
|
|
173
|
+
|
|
174
174
|
You can generate model class with mysqlx-generator: https://pypi.org/project/mysqlx-generator
|
|
175
175
|
|
|
176
176
|
If you want to operate PostgreSQL database, may be you need PgSqlx: https://pypi.org/project/pgsqlx
|
|
@@ -6,28 +6,28 @@ Create a mapper file in 'mapper' folder, you can named
|
|
|
6
6
|
|
|
7
7
|
.. code:: xml
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
10
|
+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://gitee.com/summry/mysqlx/blob/master/dtd/mapper.dtd">
|
|
11
|
+
<mapper namespace="user">
|
|
12
|
+
<select id="select_all">
|
|
13
|
+
select id, name, age from user
|
|
14
|
+
</select>
|
|
15
|
+
|
|
16
|
+
<select id="select_by_name">
|
|
17
|
+
select id, name, age from user where name = ?
|
|
18
|
+
</select>
|
|
19
|
+
|
|
20
|
+
<select id="select_by_name2">
|
|
21
|
+
select id, name, age from user where name = :name
|
|
22
|
+
</select>
|
|
23
|
+
|
|
24
|
+
<select id="select_include" include="select_all">
|
|
25
|
+
{{ select_all }}
|
|
26
|
+
{% if name -%}
|
|
27
|
+
where name = :name
|
|
28
|
+
{%- endif -%}
|
|
29
|
+
</select>
|
|
30
|
+
</mapper>
|
|
31
31
|
|
|
32
32
|
Usage Sample
|
|
33
33
|
''''''''''''
|
|
@@ -145,19 +145,19 @@ Transaction
|
|
|
145
145
|
|
|
146
146
|
.. code:: python
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
from mysqlx import with_transaction, transaction
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
insert_func(....)
|
|
153
|
-
update_func(....)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
def test_transaction2():
|
|
157
|
-
with transaction():
|
|
150
|
+
@with_transaction
|
|
151
|
+
def test_transaction():
|
|
158
152
|
insert_func(....)
|
|
159
153
|
update_func(....)
|
|
160
154
|
|
|
155
|
+
|
|
156
|
+
def test_transaction2():
|
|
157
|
+
with transaction():
|
|
158
|
+
insert_func(....)
|
|
159
|
+
update_func(....)
|
|
160
|
+
|
|
161
161
|
You can generate model class with mysqlx-generator: https://pypi.org/project/mysqlx-generator
|
|
162
162
|
|
|
163
163
|
If you want to operate PostgreSQL database, may be you need PgSqlx: https://pypi.org/project/pgsqlx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mysqlx
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: A thread safe sql executor for MySQL like MyBatis with connection pool. It helps you automatically manage database connections and transactions. It also provides ORM operations for single tables.
|
|
5
5
|
Home-page: https://gitee.com/summry/mysqlx
|
|
6
6
|
Author: summy
|
|
@@ -19,28 +19,28 @@ Create a mapper file in 'mapper' folder, you can named
|
|
|
19
19
|
|
|
20
20
|
.. code:: xml
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
23
|
+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://gitee.com/summry/mysqlx/blob/master/dtd/mapper.dtd">
|
|
24
|
+
<mapper namespace="user">
|
|
25
|
+
<select id="select_all">
|
|
26
|
+
select id, name, age from user
|
|
27
|
+
</select>
|
|
28
|
+
|
|
29
|
+
<select id="select_by_name">
|
|
30
|
+
select id, name, age from user where name = ?
|
|
31
|
+
</select>
|
|
32
|
+
|
|
33
|
+
<select id="select_by_name2">
|
|
34
|
+
select id, name, age from user where name = :name
|
|
35
|
+
</select>
|
|
36
|
+
|
|
37
|
+
<select id="select_include" include="select_all">
|
|
38
|
+
{{ select_all }}
|
|
39
|
+
{% if name -%}
|
|
40
|
+
where name = :name
|
|
41
|
+
{%- endif -%}
|
|
42
|
+
</select>
|
|
43
|
+
</mapper>
|
|
44
44
|
|
|
45
45
|
Usage Sample
|
|
46
46
|
''''''''''''
|
|
@@ -158,19 +158,19 @@ Transaction
|
|
|
158
158
|
|
|
159
159
|
.. code:: python
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
from mysqlx import with_transaction, transaction
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
insert_func(....)
|
|
166
|
-
update_func(....)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def test_transaction2():
|
|
170
|
-
with transaction():
|
|
163
|
+
@with_transaction
|
|
164
|
+
def test_transaction():
|
|
171
165
|
insert_func(....)
|
|
172
166
|
update_func(....)
|
|
173
167
|
|
|
168
|
+
|
|
169
|
+
def test_transaction2():
|
|
170
|
+
with transaction():
|
|
171
|
+
insert_func(....)
|
|
172
|
+
update_func(....)
|
|
173
|
+
|
|
174
174
|
You can generate model class with mysqlx-generator: https://pypi.org/project/mysqlx-generator
|
|
175
175
|
|
|
176
176
|
If you want to operate PostgreSQL database, may be you need PgSqlx: https://pypi.org/project/pgsqlx
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sqlx-batis>=2.1.2
|
|
@@ -19,10 +19,10 @@ setup(
|
|
|
19
19
|
long_description_content_type='text/markdown',
|
|
20
20
|
install_requires=[
|
|
21
21
|
# 'Jinja2>=2.7.0',
|
|
22
|
-
'sqlx-batis>=2.1.
|
|
22
|
+
'sqlx-batis>=2.1.2',
|
|
23
23
|
# 'mysql-connector-python>=8.0.13',
|
|
24
24
|
],
|
|
25
|
-
version='2.1.
|
|
25
|
+
version='2.1.3',
|
|
26
26
|
url='https://gitee.com/summry/mysqlx',
|
|
27
27
|
author='summy',
|
|
28
28
|
author_email='xiazhongbiao@126.com',
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sqlx-batis>=2.1.1
|
|
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
|