- CI: Verified support on Python 3.13
- Dependencies: Updated to
crate-1.0.0.dev2
- Propagate error traces properly, using the
error_trace
connect_args
option, by usingcrate-1.0.0.dev1
- Use slightly amended
do_execute
,do_execute_no_params
,do_executemany
to store their responses into the request context instance
- Added
quote_relation_name
support utility function
- Added/reactivated documentation as
sqlalchemy-cratedb
- Added
CrateIdentifierPreparer
, in order to quote reserved words likeobject
properly, for example when used as column names. - Fixed
CrateDialect.get_pk_constraint
to returnlist
instead ofset
type - Added re-usable patches and polyfills from application adapters.
New utilities:
patch_autoincrement_timestamp
,refresh_after_dml
,check_uniqueness_factory
- Added
table_kwargs
context 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
DateTime
fields - Added support for marshalling Python
datetime.date
values onsa.DateTime
fields
- 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 theschema
query argument in SQLAlchemy connection URLs.
- Dependencies: Use
crate==1.0.0dev0
- Dependencies: Use
dask[dataframe]
- Maintenance release after splitting packages
crate-python
vs.sqlalchemy-cratedb
- Fix handling URL parameters
timeout
andpool_size
- Improve DDL compiler to ignore foreign key and uniqueness constraints.
- Ignore SQL's
FOR UPDATE
clause. Thanks, @surister.
-
Rename leftover occurrences of
Object
. The new symbol to represent CrateDB'sOBJECT
column type is nowObjectType
. -
DQL: Use CrateDB's native
ILIKE
operator 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_default
on 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
OBJECT
type. Thanks, @faymarie. -
Refactor
OBJECT
type to use SQLAlchemy's JSON type infrastructure. -
Added
insert_bulk
fast-pathINSERT
method 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...RETURNING
in SQLAlchemy 2.0 by adding the newinsert_returning
andupdate_returning
flags in the CrateDB dialect.
-
Core: Support
INSERT...VALUES
with multiple value sets by enablingsupports_multivalues_insert
on the CrateDB dialect, it is used by pandas'method="multi"
option -
Core: Enable the
insertmanyvalues
feature, which lets you control the batch size ofINSERT
operations using theinsertmanyvalues_page_size
engine-, connection-, and statement-options. -
ORM: Remove support for the legacy
session.bulk_save_objects
API on SQLAlchemy 2.0, in favor of the newinsertmanyvalues
feature. 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_index
andnullable
attributes in ORM column definitions. -
Added support for converting
TIMESTAMP
columns to timezone-awaredatetime
objects, using the newtime_zone
keyword argument.
-
Added a generic data type converter to the
Cursor
object, 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 -1
could have been generated. Both PostgreSQL and CrateDB only acceptLIMIT ALL
instead. -
Added support for ORM computed columns
- Improved
CrateDialect.get_pk_constraint
to 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_size
to urllib3 asmaxsize
parameter in order to make the connection pool size configurable.
- Added support for the
RETURNING
clause. 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=False
in thecreate_engine()
call. - Added support for
geo_point
andgeo_json
types
- 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_trunc
function. - 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 anObjectArray
column.
- Fixed an issue that prevented the usage of SQLAlchemy types
NUMERIC
andDECIMAL
as column types.
- Prepared primary key retrieval for CrateDB 2.3.0. Preserved backwards-compatibility for lower versions.
- Added support for
Insert
from select - Support
get_columns
andget_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_names
failed due to an attribute error
- Added compatibility for SQLAlchemy version 1.1
- Fix: Updates in nested
OBJECT
columns have been ignored
- Fix:
Date
column type is now correctly created asTIMESTAMP
column 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
CLUSTERED
clause syntax inCREATE TABLE
statement
- Fix: Allow
ObjectArray
s to be set toNone
- Fixed compatibility issues with SQLAlchemy 1.0.x
- Map SQLAlchemy's
TEXT
column type to CrateDB'sSTRING
type
- 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
match
predicate to support fulltext search
- Fix: Columns that have an onupdate definition are now correctly updated
- Implemented
ANY
operator 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
None
after refreshing the session
- Add the
ObjectArray
type - Rename
Craty
type toObject
.Craty
can 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
DateTime
andDate
can now be nullable
- Fix an ORM error with the
Craty
type and where theupdate
statement wasn't correctly generated
- Support the
Date
andDateTime
types
- Initial release of SQLAlchemy dialect including complex types
- Initial release of Python DBAPI driver