The Change Log¶
v0.12.3¶
- When ~mosql.db.Database goes nest, only commit the changes after exit the first with.
v0.12.2¶
- Fix the connection leaking issue.
v0.12.1¶
- Fix the Python 2 support.
v0.12¶
Thanks for the contribution from Toki Tseng and Pinkoi.
- Enhance multithreading and multiprocessing support.
v0.11¶
This version is totally made by Tzu-ping Chung (uranusjr). Thanks for his contribution.
- Supports Python 3!
- Combined the doctests and nose tests by the sphinx-nose which is also made by uranusjr.
- Fixed the bug which caused the instllation on Windows failed.
- Works better on Windows.
v0.10¶
The Majoy Changes¶
- The
Database
supports to keep connection open. - The
Database
is thread-safe now. - The
insert()
supports multi-value. - The
build_where()
translatesx IN ()
intoFALSE
. - The
build_where()
allows to use pair as key to include operator. - The
mosql.util.Statement.format
ignores false – in bool context – clause argument. - The
mosql.util.Statement.format
raisesTypeError
if there is any unused clause argument. - Added
mosql.util.Query.enable_echo()
to echo the SQL it builds.
The Minor Changes¶
- Added
dot()
,as_()
,asc()
,desc()
,subq()
, andin_operand()
. - All of the patch modules in The Patches for Non-standard SQLs have a
.patch()
method to apply the patch again. - The
identifier()
was split intoidentifier()
,identifier_as()
, andidentifier_dir()
. - The
identifier()
supports to use pair to include table and column name; and - The
identifier_as()
andidentifier_dir()
also supports to use pair to include alias or direction. - Renamed
OptionError
toDirectionError
. - The
delimit_identifier()
,allowed_operators
, andallowed_directions
don’t allow to disable anymore. Useraw
instead. - The deprecated modules in /deprecated will be removed in 0.11.
- Refined all the documentation.
v0.9.1¶
- Now
qualifier()
supports to encodeunicode
into utf-8str
automatically.
v0.9¶
v0.8¶
columns
now is the alias ofselect
.- Fixed the complain of inserting with empty dict.
- Added
mosql.sqlite
for better SQLite support. - Added
mosql.query.replace()
. - Renamed
mosql.statement
tomosql.stmt
. - Added
mosql.func
for basic SQL functions supprt. - Support using pair (2-tuple) to build
AS
statement. - Support subquery perfectly.
Thanks Tzu-ping Chung (uranusjr) contributed the PRs (#27, #15, #14, and #12) which bring the improvement 2, 6, 7 and 8.
Thanks lucemia contributed the PRs (#19, #13) which bring the improvement 3 and 4.
And, thanks PyCon TW and your sprint event in 2013 Oct! :)
v0.7.3¶
- Added
mosql.util.and_()
.
v0.7.2¶
mosql.util.or_()
should add paren.
v0.7.1¶
- Improved the compatibility with MySQLdb.
v0.7¶
- Added the Travis CI badge. Thanks for the contribution from xKerman.
- Added Make DB API 2.0 Easier to Use — mosql.db.
- Arranged the examples.
v0.6.1¶
- Nothing but the change of the docs.
v0.6¶
Note
Some of the modules are deprecated after v0.6, check /deprecated for more information.
- Deprecated some of the modules. Check /deprecated for detail.
- Made the
mosql.util.Clause
andmosql.util.Statement
better. - Added the
mosql.util.Query
. - Added the
mosql.query
,mosql.statement
,mosql.clause
, andmosql.chain
for the instances in common use.
v0.5.3¶
- Fixed the compatibility of
mosql.util
with types which inherit the basic types.
v0.5.2¶
- Fixed the compatibility of
mosql.json
withmosql.result.Model
.
v0.5.1¶
- The
mosql.result.Model.save()
usesmosql.result.Model.arrange_by
to save the changes on column squashed. - The
mosql.result.Model.clear()
is also improved. - Improved the program of loading result set.
- The
mosql.result.Model.select()
ormosql.result.Model.where()
returns None if no row is returned.
v0.5¶
- Improved the code of
mosql.result.Model
. - Added
mosql.result.Model.new()
. - Added
mosql.result.Model.add()
. - Added
mosql.result.Model.clear()
. - The
mosql.result.Model.perform()
now supports to call procedure, execute SQL with parameter and executemany. - Fixed the compatibility with MySQL.
v0.4¶
- Improved the code of
mosql.result.Model
. - Added
mosql.result.Model.squash_all
for 1:1 table. - Added
mosql.result.Model.rows()
for iterating the rows. - The rows in
mosql.result.Model
can be accessed by row index now. - Added
mosql.result.Model.getcur()
for customizing cursor. - The
mosql.result.Model.pop()
returns the row it poped now. - The
mosql.result.Model.row()
andmosql.result.Model.col()
are removed.
v0.3¶
- Improved memory usage of
mosql.result.Model.arrange()
. - MoSQL supports to use native escape functions now (via
mosql.psycopg2_escape
ormosql.MySQLdb_escape
).
v0.2.1¶
- Fixed a bug of
mosql.result.Model.append()
.
v0.2¶
Note
The versions after v0.2 are a new branch and it does not provide backward-compatibility for v0.1.x.
- The
mosql.result
is totally rewritten, and does not provide the backward-compatibility. See the doc for more info. - The
mosql.common
is renamed asmosql.build
. - The
mosql.ext
is removed. - The
mosql.build.insert()
uses set instead of pairs_or_columns. - The
mosql.build.insert()
supports “on duplicate key update” now. - The
mosql.select
uses * if user passNone
in. - MoSQL passed all of the injection tests from sqlmap on value and identifier with PostgreSQL and MySQL.
v0.1.6¶
- The
mosql.util
is faster (1.35x~1.7x) after rewriting. - The
mosql.util
also supports to delimit the identifier (for avoiding injection from identifier), - use arbitrary SQL statements by
mosql.util.raw
, - and customize parameter name of prepared statement by
mosql.util.param
now. - The
mosql.ext
is deprecated now, please usemosql.common
instead.
v0.1.5¶
- This version refined the
mosql.mysql
. - MoSQL with PostgreSQL or MySQL passed all of the injection tests from sqlmap.
v0.1.4¶
- Fixed the dumped value of datetime, date and time.
v0.1.3¶
- This version reverted the #3 changes in the previous version.
- By default, the
mosql.result.Model
now orders the result set by nothing.
v0.1.2¶
- Added the
mosql.mysql
. - The
mosql.result.Model.seek()
now respects the arguments from users. - The
group_by
now uses the value ofidentify_by
, by default. - The
order_by
stops using the value ofidentify_by
.
v0.1.1¶
- Added the
mosql.json
. - Added the
mosql.result.Model.customize()
. - The
Model
now can use attributes to access data. - The
Model
now allows user to customize insert, select, update and delete. - It respects the
column_names
when do a select. - Fixed the wrong sql without specifying
identify_by
. - Fixed the SQL dumped with None. (issue #1)