Releases: MonetDB/pymonetdb
1.8.1
1.8.0
changes since 1.7.2
-
Incompatible change: If multiple queries are executed at once, the first result set is returned rather than the last. For example,
Cursor.execute("SELECT 1; SELECT 2")
used to return 2 but now returns 1. -
Add support for Cursor.nextset to allow retrieving result sets other than the first.
-
Add support for encrypted connections using TLS. This can be enabled using the
tls
parameter ofpymonetdb.connect()
or by using amonetdbs://
URL. -
Add support for
monetdb://
andmonetdbs://
URLs. See MonetDB URLs for details. Themapi:monetdb://
URLs are now deprecated. -
Support for Python 3.6 has been dropped
1.7.1
changes since 1.7.0
-
Bug fix: let TimeTzFromTicks and TimestampTzFromTicks use the correct time zone
-
Feature: add support for the named parameter syntax that will be introduced in
the next major version of MonetDB AFTER Jun2023. (Not Jun2023 itself.)
Example of the named parameters:
import pymonetdb
# classic behavior: paramstyle pyformat
assert pymonetdb.paramstyle == 'pyformat'
with pymonetdb.connect('demo') as conn, conn.cursor() as cursor:
parameters = dict(number=42, fruit="ban'ana")
cursor.execute("SELECT %(number)s, %(fruit)s", parameters)
assert cursor.fetchone() == (42, "ban'ana")
# enable named parameters
pymonetdb.paramstyle = 'named'
with pymonetdb.connect('demo') as conn, conn.cursor() as cursor:
parameters = dict(number=42, fruit="ban'ana")
cursor.execute("SELECT :number, :fruit", parameters)
assert cursor.fetchone() == (42, "ban'ana")
1.7.0
Changes since 1.6.4
-
Add support for a new, binary result set format. This makes transferring large result sets much faster, often by a factor 3 or more. Only works in combination with MonetDB version Jun2023 or later. This is enabled by default but can be controlled with the
binary
parameter. -
Automatically transfer large result sets in batches that grow progressively larger. This behavior can be controlled with the
replysize
andmaxprefetch
parameters. See the section on 'Result set batch size' in the documentation. -
Add optional
binary
,replysize
andmaxprefetch
parameters to the MAPI URL syntax, equivalent to thepymonetdb.connect()
parameters mentioned above. -
Allow to use Connection and Cursor as context managers, for example:
with pymonetdb.connect(db') as conn, conn.cursor() as cursor:
cursor.execute("SELECT 42")
-
Let
Cursor.execute()
returnNone
for DDL statements such asCREATE
andDROP
, not -1. Note that PEP 249 leaves the return value ofCursor.execute()
deliberately unspecified. -
Preserve precision of INTERVAL SECOND values, do not round them to whole seconds.
-
Raise a more readable exception on DATE and TIMESTAMP values whose year is zero or negative.
-
At connect time, prime the connection with a number of NUL bytes. This serves two purposes: it prevents a hang when accidentally connecting to a TLS-protected server, and interestingly, it slightly improves connection setup speed.
-
Various other optimizations
1.6.4
changes since 1.6.3
-
Correctly handle result of PREPARE statement, leave id of the prepared statement in Cursor.lastrowid for use in subsequent EXEC statement.
-
Fix COPY ON CLIENT bug with filenames that contain spaces.
-
Fix bug where not all server side result sets were closed if multiple statements were passed to one Cursor.execute() call, leading to a resource leak until the connection was closed.
-
Rename Cursor.nextset(), the Python DB API reserves that name for something else.
1.6.3
1.6.2
1.6.1
What's Changed
- Fixed some packaging issues
What changed in 1.6.0
- Support for COPY INTO ON CLIENT by @joerivanruth (#57) in #102
- Connection object leaks the password (#93) by @gijzelaerr in #105
- Make code style checking stricter (mypy and flake8) (#104) by @gijzelaerr in #105
- Make python UDF debug code work with Python3 (#45) by @joerivanruth in #103
Full Changelog: 1.5.1...1.6.1
1.6.0
What's Changed
- Support for COPY INTO ON CLIENT by @joerivanruth (#57) in #102
- Connection object leaks the password (#93) by @gijzelaerr in #105
- Make code style checking stricter (mypy and flake8) (#104) by @gijzelaerr in #105
- Make python UDF debug code work with Python3 (#45) by @joerivanruth in #103
Full Changelog: 1.5.1...1.6.0
1.5.1
What's Changed
- Fix failing unicode test by @gijzelaerr in #98
- Perform bin<->hex conversion directly, not in pymonetdb.Binary by @joerivanruth in #100
- prepare for 1.5.1 by @gijzelaerr in #101
Full Changelog: 1.5.0...1.5.1