Skip to content

Releases: MonetDB/pymonetdb

1.8.1

22 Apr 14:22
Compare
Choose a tag to compare

changes since 1.8.0

  • Restore behavior where sockdir can be changed by setting host to something that starts with a slash. Mtest.py relies on this.

1.8.0

15 Apr 11:29
Compare
Choose a tag to compare

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 of pymonetdb.connect() or by using a monetdbs:// URL.

  • Add support for monetdb:// and monetdbs:// URLs. See MonetDB URLs for details. The mapi:monetdb:// URLs are now deprecated.

  • Support for Python 3.6 has been dropped

1.7.1

22 Sep 09:01
Compare
Choose a tag to compare

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

20 Jun 10:12
Compare
Choose a tag to compare

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 and maxprefetch parameters. See the section on 'Result set batch size' in the documentation.

  • Add optional binary, replysize and maxprefetch parameters to the MAPI URL syntax, equivalent to the pymonetdb.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() return None for DDL statements such as CREATE and DROP, not -1. Note that PEP 249 leaves the return value of Cursor.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

03 Mar 10:34
Compare
Choose a tag to compare

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

26 Sep 09:00
Compare
Choose a tag to compare

changes since 1.6.2

  • Fix crash with local control connections (#111)
  • Suppress unnecessary 'close result set' commands to improve round-trip time (#110)
  • Fix typo in the documentation

1.6.2

30 Jun 09:22
Compare
Choose a tag to compare

changes since 1.6.1

  • correctly deal with DATE results where the year is less than 1000 (#108)
  • fix bug for ON CLIENT binary files
  • tweak documentation config for recent Sphynx versions

1.6.1

13 Apr 14:43
Compare
Choose a tag to compare

What's Changed

  • Fixed some packaging issues

What changed in 1.6.0

Full Changelog: 1.5.1...1.6.1

1.6.0

13 Apr 11:59
05411c0
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.5.1...1.6.0

1.5.1

03 Mar 16:32
0158dae
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.5.0...1.5.1