- Added canonical PostgreSQL client parameter
sslmode, implementingsslmode=requireto connect to SSL-enabled CrateDB instances without verifying the host name. The previousssl=trueparameter is flagged for deprecation, thereforesslmodetakes precedence while both options coexist.
- Dependencies: Updated to
crate-2.0.0, which usesorjsonfor JSON marshalling
- CI: Verified support on Python 3.13
- Dependencies: Updated to
crate-1.0.0.dev2
- Propagate error traces properly, using the
error_traceconnect_argsoption, by usingcrate-1.0.0.dev1 - Use slightly amended
do_execute,do_execute_no_params,do_executemanyto store their responses into the request context instance
- Added
quote_relation_namesupport utility function
- Added/reactivated documentation as
sqlalchemy-cratedb - Added
CrateIdentifierPreparer, in order to quote reserved words likeobjectproperly, for example when used as column names. - Fixed
CrateDialect.get_pk_constraintto returnlistinstead ofsettype - Added re-usable patches and polyfills from application adapters.
New utilities:
patch_autoincrement_timestamp,refresh_after_dml,check_uniqueness_factory - Added
table_kwargscontext manager to enable pandas/Dask to support CrateDB dialect table options. - Fixed SQL rendering of special DDL table options in
CrateDDLCompiler. Before, configuringcrate_"translog.durability"was not possible. - Unlocked supporting timezone-aware
DateTimefields - Added support for marshalling Python
datetime.datevalues onsa.DateTimefields
- Added support for CrateDB's FLOAT_VECTOR data type and its accompanying
KNN_MATCH function, for HNSW matches. For SQLAlchemy column definitions,
you can use it like
FloatVector(dimensions=1536). - Fixed
get_table_names()reflection method to respect theschemaquery argument in SQLAlchemy connection URLs.
- Dependencies: Use
crate==1.0.0dev0
- Dependencies: Use
dask[dataframe] - Maintenance release after splitting packages
crate-pythonvs.sqlalchemy-cratedb
- Fix handling URL parameters
timeoutandpool_size - Improve DDL compiler to ignore foreign key and uniqueness constraints.
- Ignore SQL's
FOR UPDATEclause. Thanks, @surister.
-
Rename leftover occurrences of
Object. The new symbol to represent CrateDB'sOBJECTcolumn type is nowObjectType. -
DQL: Use CrateDB's native
ILIKEoperator instead of using SA's generic implementationlower() LIKE lower(). Thanks, @hlcianfagna.
-
DDL: Allow turning off column store using
crate_columnstore=False. Thanks, @fetzerms. -
DDL: Allow setting
server_defaulton columns to enable server-generated defaults. Thanks, @JanLikar. -
Allow handling datetime values tagged with time zone info when inserting or updating.
-
Fix SQL statement caching for CrateDB's
OBJECTtype. Thanks, @faymarie. -
Refactor
OBJECTtype to use SQLAlchemy's JSON type infrastructure. -
Added
insert_bulkfast-pathINSERTmethod for pandas, in order to support efficient batch inserts using CrateDB's "bulk operations" endpoint. -
Add documentation and software tests for usage with Dask
- Core: Re-enable support for
INSERT/UPDATE...RETURNINGin SQLAlchemy 2.0 by adding the newinsert_returningandupdate_returningflags in the CrateDB dialect.
-
Core: Support
INSERT...VALUESwith multiple value sets by enablingsupports_multivalues_inserton the CrateDB dialect, it is used by pandas'method="multi"option -
Core: Enable the
insertmanyvaluesfeature, which lets you control the batch size ofINSERToperations using theinsertmanyvalues_page_sizeengine-, connection-, and statement-options. -
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.
- Fixed SQLAlchemy 2.0 incompatibility with
CrateDialect.{has_schema,has_table}
-
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.
-
Added support for
crate_indexandnullableattributes in ORM column definitions. -
Added support for converting
TIMESTAMPcolumns to timezone-awaredatetimeobjects, using the newtime_zonekeyword argument.
-
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 like
LIMIT -1could have been generated. Both PostgreSQL and CrateDB only acceptLIMIT ALLinstead. -
Added support for ORM computed columns
- Improved
CrateDialect.get_pk_constraintto be compatible with breaking changes in CrateDB >=5.1.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.
-
Added support for enabling SSL using SQLAlchemy DB URI with parameter
?ssl=true. -
Added support for SQLAlchemy 1.4
For learning about the transition to SQLAlchemy 1.4, we recommend the corresponding documentation What’s New in SQLAlchemy 1.4?.
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
- Propagate connect parameter
pool_sizeto urllib3 asmaxsizeparameter in order to make the connection pool size configurable.
- Added support for the
RETURNINGclause. 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 off this feature by passingimplicit_returning=Falsein thecreate_engine()call. - Added support for
geo_pointandgeo_jsontypes
- Upgraded SQLAlchemy support to 1.3.
- Added official Python 3.8 support.
- Made it so that the dialect is now aware of the return type of the
date_truncfunction. - Added driver attribute, as SQLAlchemy relies on interfaces having that string for identification.
- Extended the type mapping for the upcoming type name changes in CrateDB 4.0.
- Added support for Python 3.7 and made that version the recommended one.
- BREAKING: Dropped support for Python 2.7 and 3.3 If you are using this package with Python 2.7 or 3.3 already, you will not be able to install newer versions of this package.
- Add support for SQLAlchemy 1.2
- Updated
get_table_names()method to only return tables but not views. This enables compatibility with CrateDB 3.0 and newer.
- Fixed an issue that caused
metadata.create_all(bind=engine)to fail creating tables that contain anObjectArraycolumn.
- Fixed an issue that prevented the usage of SQLAlchemy types
NUMERICandDECIMALas column types.
- Prepared primary key retrieval for CrateDB 2.3.0. Preserved backwards-compatibility for lower versions.
- Added support for
Insertfrom select - Support
get_columnsandget_pk_constraint
- BREAKING: Dropped support for SQLAlchemy < 1.0.0
- Fix: The dialect didn't work properly with alpha and beta versions of sqlalchemy due to a wrong version check (e.g.: sandman2 depends on 1.1.0b3)
- Added support for native Arrays
- Fix:
sa.inspect(engine).get_table_namesfailed due to an attribute error
- Added compatibility for SQLAlchemy version 1.1
- Fix: Updates in nested
OBJECTcolumns have been ignored
- Fix:
Datecolumn type is now correctly created asTIMESTAMPcolumn when creating the table
- Added support for serialization of Decimals
- Added support for client certificates
- Dropped support for Python 2.6
- Added support for serialization of date and datetime objects
- Fix: use proper
CLUSTEREDclause syntax inCREATE TABLEstatement
- Fix: Allow
ObjectArrays to be set toNone
- Fixed compatibility issues with SQLAlchemy 1.0.x
- Map SQLAlchemy's
TEXTcolumn type to CrateDB'sSTRINGtype
- Add support for table creation using the SQLAlchemy ORM functionality
- Fix: Match predicate now properly handles term literal
- Changed update statement generation to be compatible with CrateDB 0.47.X
- Add missing functionality in
CrateDialect, including: default schema name, server version info, check if table/schema exists, list all tables/schemas
- Add
matchpredicate to support fulltext search
- Fix: Columns that have an onupdate definition are now correctly updated
- Implemented
ANYoperator on object array containment checks
- Bugfix: Updates of complex types will only be rewritten if the dialect
is set to
crate
- use new crate doc theme
- Fix a bug where setting an empty list on a multivalued field results in
returning
Noneafter refreshing the session
- Add the
ObjectArraytype - Rename
Cratytype toObject.Cratycan still be imported to maintain backward compatibility.
- Compatibility adjustments for SQLAlchemy >= 0.9.x
- Support native booleans
- Raise an exception if timezone aware datetime objects are stored
- Fix datetime parsing that didn't work with crate >= 0.18.4 due to the fixed datetime mapping
- Document
count()andgroup_by()support
DateTimeandDatecan now be nullable
- Fix an ORM error with the
Cratytype and where theupdatestatement wasn't correctly generated
- Support the
DateandDateTimetypes
- Initial release of SQLAlchemy dialect including complex types
- Initial release of Python DBAPI driver