- Multi-row inserts are always passed as a single list argument, e.g.
module.create([ { 'x': 1 }, { 'x': 2 }])
. Previously this was inconsisent when running inside or outside a transaction. See #73 for discussion. Thanks to Guillaume Pelletier!
- Upgraded sqlalchemy version to >2.0.
- Dropped support for Python before 3.8.1.
- Now accepting interstitial whitespace in the leading comment block.
- Transactions are now automatically committed when leaving a transaction context when using nested transactions, thanks to Oleksandr Fedorov.
- Improved feedback when mistakenly passing positional arguments to statements that don't support it.
- Dropped support for Python 3.5 and 3.6.
- Added test coverage for some postgres-specific tests.
- Migrated test suite from TravisCI to GitHub Actions.
- Fixed broken test suite on Python 3.10
- Fixes Python 3.5 tests which were broken in 0.2.2. Began release testing with 3.8.
- Support for nested transactions #40 thanks to Hosein Yeganloo.
- Modules expose the SQLAlchemy engine they are using (#5).
- Added support for adding queries from another path to a module (see #29).
- Dropped automatic caching of modules. See #19 for discussion.
- An
encoding
parameter for interpreting sql files can be passed when creating a pugsql module, thanks to newturok. - Better exception feedback when calling statements incorrectly with positional arguments.
- Added some development setup notes to the README.
- Custom connection
kwargs
are passed through tocreate_engine
, thanks to Brad Greenlee.
- Added support for multiple statements per file thanks to Brad Greenlee.
- Fixed #28 - better errors when trying to use a query name that is already defined as a method on the
Module
class. - Modules are now iterable (thanks to Haoyu Qiu).
- Better error messages from malformed SQL files.
IN
clauses also acceptset
parameters (in addition totuple
andlist
).
IN
clauses now work. Passing a tuple or a list as the value of a named parameter will automatically treat the parameter as an expanding (i.e.(?, ?, ?, ?)
, etc) bind parameter.
- Added support for passing
multiparams
through to SQLAlchemy'sexecute
method, which among other things makes multi-row inserts work (#9). - Parsed statements use very slightly less memory.
- Added the
:scalar
return type, which returns the first value in the first row. - The
:insert
return type defaults to:scalar
behavior when a DBAPI does not supportlastrowid
(#7).
- Fixed #11, exception when a PugSQL module is initialized on another thread.
- Documentation fixes.
- Added support for
Module.transaction()
, which returns a context manager which maintains thread-local transaction scope.
- Effective function signature is shown with
str(statement)
orrepr(statement)
. - Added an
:insert
return type which returns the ID of the last row inserted, for engines which support it (thanks to Jelle Besseling). :one
queries resulting in null no longer break (#10)
- Added the
pugsql.get_modules()
API. - Dropped support for Python 3.4.
- Greatly improved docstrings throughout (in progress).
- Now generating module documentation with https://pypi.org/project/pdoc3/.
- Better PyPI package page.
- Improved homepage.
- PugSQL now provides detailed file/line/column syntax errors.
- Illegal characters in Python function names will now fail to parse.
- Duplicate function names in one library will now fail.
- Fixed broken flake8 tests in 0.1.4 release.
- Improved exception feedback.
- Improved docstrings on public interface and important objects.
- Added some PyPI project metadata.
- Starting to keep track of release history.
- Supporting python 3.4 through 3.7