diff --git a/CHANGES.txt b/CHANGES.txt index 19b3db02..429e9c4f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,7 +28,7 @@ Unreleased - Allow handling datetime values tagged with time zone info when inserting or updating. -- SQLAlchemy: Fix SQL statement caching for CrateDB's ``OBJECT`` type. +- SQLAlchemy: Fix SQL statement caching for CrateDB's ``OBJECT`` type. Thanks, @faymarie. - SQLAlchemy: Refactor ``OBJECT`` type to use SQLAlchemy's JSON type infrastructure. diff --git a/docs/build.json b/docs/build.json index 49cbd2be..5647caf4 100644 --- a/docs/build.json +++ b/docs/build.json @@ -1,5 +1,5 @@ { "schemaVersion": 1, "label": "docs build", - "message": "2.1.0" + "message": "2.1.1" } diff --git a/docs/by-example/sqlalchemy/advanced-querying.rst b/docs/by-example/sqlalchemy/advanced-querying.rst index 9108bb49..7c4d6781 100644 --- a/docs/by-example/sqlalchemy/advanced-querying.rst +++ b/docs/by-example/sqlalchemy/advanced-querying.rst @@ -5,8 +5,9 @@ SQLAlchemy: Advanced querying ============================= This section of the documentation demonstrates running queries using a fulltext -index with analyzer, queries using counting and aggregations, and support for -the ``INSERT...FROM SELECT`` construct, all using the CrateDB SQLAlchemy dialect. +index with an analyzer, queries using counting and aggregations, and support for +the ``INSERT...FROM SELECT`` and ``INSERT...RETURNING`` constructs, all using the +CrateDB SQLAlchemy dialect. .. rubric:: Table of Contents diff --git a/docs/conf.py b/docs/conf.py index 59cc622f..3804b4b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,7 @@ intersphinx_mapping.update({ 'py': ('https://docs.python.org/3/', None), - 'sa': ('https://docs.sqlalchemy.org/en/14/', None), + 'sa': ('https://docs.sqlalchemy.org/en/20/', None), 'urllib3': ('https://urllib3.readthedocs.io/en/1.26.13/', None), 'dask': ('https://docs.dask.org/en/stable/', None), 'pandas': ('https://pandas.pydata.org/docs/', None), diff --git a/docs/sqlalchemy.rst b/docs/sqlalchemy.rst index c3d0c7af..c31396ab 100644 --- a/docs/sqlalchemy.rst +++ b/docs/sqlalchemy.rst @@ -28,7 +28,7 @@ The CrateDB SQLAlchemy dialect is validated to work with SQLAlchemy versions .. SEEALSO:: For general help using SQLAlchemy, consult the :ref:`SQLAlchemy tutorial - ` or the `SQLAlchemy library`_. + ` or the `SQLAlchemy library`_. Supplementary information about the CrateDB SQLAlchemy dialect can be found in the :ref:`data types appendix `. diff --git a/src/crate/testing/layer.py b/src/crate/testing/layer.py index 5fd6d8fd..ef8bfe2b 100644 --- a/src/crate/testing/layer.py +++ b/src/crate/testing/layer.py @@ -248,7 +248,7 @@ def __init__(self, transport_port or '4300-4399', settings) # ES 5 cannot parse 'True'/'False' as booleans so convert to lowercase - start_cmd = (crate_exec, ) + tuple(["-C%s=%s" % ((key, str(value).lower()) if type(value) == bool else (key, value)) + start_cmd = (crate_exec, ) + tuple(["-C%s=%s" % ((key, str(value).lower()) if isinstance(value, bool) else (key, value)) for key, value in settings.items()]) self._wd = wd = os.path.join(CrateLayer.tmpdir, 'crate_layer', name)