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
Databasesupports to keep connection open. - The
Databaseis 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.formatignores false – in bool context – clause argument. - The
mosql.util.Statement.formatraisesTypeErrorif 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
OptionErrortoDirectionError. - The
delimit_identifier(),allowed_operators, andallowed_directionsdon’t allow to disable anymore. Userawinstead. - The deprecated modules in /deprecated will be removed in 0.11.
- Refined all the documentation.
v0.9.1¶
- Now
qualifier()supports to encodeunicodeinto utf-8strautomatically.
v0.9¶
v0.8¶
columnsnow is the alias ofselect.- Fixed the complain of inserting with empty dict.
- Added
mosql.sqlitefor better SQLite support. - Added
mosql.query.replace(). - Renamed
mosql.statementtomosql.stmt. - Added
mosql.funcfor basic SQL functions supprt. - Support using pair (2-tuple) to build
ASstatement. - 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.Clauseandmosql.util.Statementbetter. - Added the
mosql.util.Query. - Added the
mosql.query,mosql.statement,mosql.clause, andmosql.chainfor the instances in common use.
v0.5.3¶
- Fixed the compatibility of
mosql.utilwith types which inherit the basic types.
v0.5.2¶
- Fixed the compatibility of
mosql.jsonwithmosql.result.Model.
v0.5.1¶
- The
mosql.result.Model.save()usesmosql.result.Model.arrange_byto 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_allfor 1:1 table. - Added
mosql.result.Model.rows()for iterating the rows. - The rows in
mosql.result.Modelcan 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_escapeormosql.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.resultis totally rewritten, and does not provide the backward-compatibility. See the doc for more info. - The
mosql.commonis renamed asmosql.build. - The
mosql.extis removed. - The
mosql.build.insert()uses set instead of pairs_or_columns. - The
mosql.build.insert()supports “on duplicate key update” now. - The
mosql.selectuses * if user passNonein. - MoSQL passed all of the injection tests from sqlmap on value and identifier with PostgreSQL and MySQL.
v0.1.6¶
- The
mosql.utilis faster (1.35x~1.7x) after rewriting. - The
mosql.utilalso 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.paramnow. - The
mosql.extis deprecated now, please usemosql.commoninstead.
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.Modelnow 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_bynow uses the value ofidentify_by, by default. - The
order_bystops using the value ofidentify_by.
v0.1.1¶
- Added the
mosql.json. - Added the
mosql.result.Model.customize(). - The
Modelnow can use attributes to access data. - The
Modelnow allows user to customize insert, select, update and delete. - It respects the
column_nameswhen do a select. - Fixed the wrong sql without specifying
identify_by. - Fixed the SQL dumped with None. (issue #1)