Releases: crate/crate-python
0.31.0
What's Changed
-
SQLAlchemy Core: Support
INSERT...VALUESwith multiple value sets by enabling
supports_multivalues_inserton the CrateDB dialect, it is used by pandas'
method="multi"option -
SQLAlchemy Core: Enable the
insertmanyvaluesfeature, which lets you control
the batch size ofINSERToperations using theinsertmanyvalues_page_size
engine-, connection-, and statement-options. -
SQLAlchemy ORM: Remove support for the legacy
session.bulk_save_objectsAPI
on SQLAlchemy 2.0, in favor of the newinsertmanyvaluesfeature. Performance
optimizations frombulk_save()have been made inherently part ofadd_all().
Note: The legacy mode will still work on SQLAlchemy 1.x, while SQLAlchemy 2.x users
MUST switch to the new method now.
Full Changelog: 0.30.1...0.31.0
0.30.1
What's Changed
- Fixed SQLAlchemy 2.0 incompatibility with
CrateDialect.{has_schema,has_table}
Full Changelog: 0.30.0...0.30.1
0.30.0
What's Changed
- Added deprecation warning about dropping support for SQLAlchemy 1.3 soon, it is effectively EOL.
- Added support for SQLAlchemy 2.0. See also What's New in SQLAlchemy 2.0 and SQLAlchemy 2.0 migration guide.
- Updated to geojson 3.0.0.
Full Changelog: 0.29.0...0.30.0
0.29.0
What's Changed
-
SQLAlchemy: Added support for
crate_indexandnullableattributes in ORM column definitions. -
Added support for converting
TIMESTAMPcolumns to timezone-awaredatetimeobjects, using the newtime_zonekeyword argument.
Full Changelog: 0.28.0...0.29.0
0.28.0
What's Changed
-
Added a generic data type converter to the
Cursorobject, for converting
fetched data from CrateDB data types to Python data types. -
Fixed generating appropriate syntax for OFFSET/LIMIT clauses. It was possible
that SQL statement clauses likeLIMIT -1could have been generated. Both
PostgreSQL and CrateDB only acceptLIMIT ALLinstead. -
Added support for computed columns in the SQLAlchemy ORM.
Full Changelog: 0.27.2...0.28.0
0.27.2
What's Changed
- Improved SQLAlchemy's
CrateDialect.get_pk_constraintto be compatible with breaking changes in CrateDB >=5.1.0.
Full Changelog: 0.27.1...0.27.2
0.27.1
What's Changed
- Fixed regression introduced by
0.27.0resulting in unavailable servers if
all configured servers aren't reachable once.
Full Changelog: 0.27.0...0.27.1
0.27.0
- Added support for Python 3.9 and 3.10.
- Dropped support for Python 3.4, 3.5 and 3.6.
- Dropped support for SQLAlchemy 1.1 and 1.2.
- Dropped support for CrateDB < 2.0.0.
- Adjusted connect arguments to accept credentials within the HTTP URI.
- Added support for enabling SSL using SQLAlchemy DB URI with parameter
?ssl=true. - Added support for SQLAlchemy 1.4
Note: For learning about the transition to SQLAlchemy 1.4, we recommend the
corresponding documentation What’s New in SQLAlchemy 1.4?.
Breaking changes
Other than the changes on dropping support for various EOL software components, there are two behavioral changes which might affect "userspace".
SSL certificate verification
The driver now verifies SSL certificates when connecting via HTTP by default. Previously, this setting defaulted to false. This setting can be changed via the verify_ssl_cert connection parameter.
Textual column expressions
SQLAlchemy 1.4 became stricter on some details. It requires to wrap CrateDB system columns like _score in a SQLAlchemy literal_column type. Before, it was possible to use a query like this::
session.query(Character.name, '_score')
It must now be written like::
session.query(Character.name, sa.literal_column('_score'))
Otherwise, SQLAlchemy will complain like::
sqlalchemy.exc.ArgumentError: Textual column expression '_score' should be
explicitly declared with text('_score'), or use column('_score') for more
specificity
Full Changelog: 0.26.0...0.27.0
0.26.0
-
Enabled TCP keepalive on socket level and support for setting socket options
when creating the connection. The supported options are:TCP_KEEPIDLE(overridingnet.ipv4.tcp_keepalive_time)TCP_KEEPINTVL(overridingnet.ipv4.tcp_keepalive_intvl)TCP_KEEPCNT(overridingnet.ipv4.tcp_keepalive_probes)
-
Propagate connect parameter
pool_sizeto urllib3 asmaxsizeparameter
in order to make the connection pool size configurable.
Full Changelog: 0.25.0...0.26.0
0.25.0
- Added support for the
RETURNINGclause to the SQLAlchemy dialect. This
requires CrateDB 4.2 or greater. In case you use any server side generated
columns in your primary key constraint with earlier CrateDB versions, you can
turn this feature off by passingimplicit_returning=Falsein the
create_engine()call. - Added support for
geo_pointandgeo_jsontypes to the SQLAlchemy
dialect.
Full Changelog: 0.24.0...0.25.0