Release 0.1.5
sripathikrishnan
released this
09 Nov 15:24
·
48 commits
to master
since this release
The major feature is support for multiple param styles. Per PEP-249, database libraries can support 5 different styles of parameter types. These are :
- format ANSI C printf format codes, e.g.
...WHERE name=%s
. This is the default style. - qmark Question mark style, e.g.
...WHERE name=?
- numeric Numeric, positional style, e.g.
...WHERE name=:1
- named Named style, e.g.
...WHERE name=:name
- pyformat Python extended format codes, e.g.
...WHERE name=%(name)s
You can specify the param_style by passing it to the constructor like this
jinja = JinjaSql(param_style='qmark')
Note that named
and pyformat
are special. The bind_parameters
object returned by prepare_query
will be a dictionary. For all other param styles, the bind_parameters
object will be a list.
Other Changes
- Added support for declarative tests via a YAML configuration file
- Dropped support for python 2.6.x. This is because
ordereddict
is not available in python 2.6.x. Although workaround exist to addorderedict
to python 2.6.x, the special handling wasn't worth it. If required, this can be added back fairly easily.