[Sqlalchemy-commits] commit/sqlalchemy: 5 new changesets
Brought to you by:
zzzeek
From: Bitbucket <com...@bi...> - 2015-08-17 21:13:05
|
5 new commits in sqlalchemy: https://bitbucket.org/zzzeek/sqlalchemy/commits/74a43ee08b34/ Changeset: 74a43ee08b34 Branch: None User: zzzeek Date: 2015-08-17 19:43:14+00:00 Summary: Merge branch 'ticket_3499' into ticket_3514 Affected #: 2 files https://bitbucket.org/zzzeek/sqlalchemy/commits/072a1f716ee9/ Changeset: 072a1f716ee9 Branch: None User: zzzeek Date: 2015-08-17 20:27:33+00:00 Summary: - doc updates - test fixes Affected #: 5 files https://bitbucket.org/zzzeek/sqlalchemy/commits/d0291319eeb3/ Changeset: d0291319eeb3 Branch: ticket_3514 User: zzzeek Date: 2015-08-17 20:43:31+00:00 Summary: - changelogs Affected #: 2 files https://bitbucket.org/zzzeek/sqlalchemy/commits/ceeb033054f0/ Changeset: ceeb033054f0 Branch: None User: zzzeek Date: 2015-08-17 21:07:10+00:00 Summary: - merge of ticket_3499 indexed access branch - The "hashable" flag on special datatypes such as :class:`.postgresql.ARRAY`, :class:`.postgresql.JSON` and :class:`.postgresql.HSTORE` is now set to False, which allows these types to be fetchable in ORM queries that include entities within the row. fixes #3499 - The Postgresql :class:`.postgresql.ARRAY` type now supports multidimensional indexed access, e.g. expressions such as ``somecol[5][6]`` without any need for explicit casts or type coercions, provided that the :paramref:`.postgresql.ARRAY.dimensions` parameter is set to the desired number of dimensions. fixes #3487 - The return type for the :class:`.postgresql.JSON` and :class:`.postgresql.JSONB` when using indexed access has been fixed to work like Postgresql itself, and returns an expression that itself is of type :class:`.postgresql.JSON` or :class:`.postgresql.JSONB`. Previously, the accessor would return :class:`.NullType` which disallowed subsequent JSON-like operators to be used. part of fixes #3503 - The :class:`.postgresql.JSON`, :class:`.postgresql.JSONB` and :class:`.postgresql.HSTORE` datatypes now allow full control over the return type from an indexed textual access operation, either ``column[someindex].astext`` for a JSON type or ``column[someindex]`` for an HSTORE type, via the :paramref:`.postgresql.JSON.astext_type` and :paramref:`.postgresql.HSTORE.text_type` parameters. also part of fixes #3503 - The :attr:`.postgresql.JSON.Comparator.astext` modifier no longer calls upon :meth:`.ColumnElement.cast` implicitly, as PG's JSON/JSONB types allow cross-casting between each other as well. Code that makes use of :meth:`.ColumnElement.cast` on JSON indexed access, e.g. ``col[someindex].cast(Integer)``, will need to be changed to call :attr:`.postgresql.JSON.Comparator.astext` explicitly. This is part of the refactor in references #3503 for consistency in operator use. Affected #: 24 files https://bitbucket.org/zzzeek/sqlalchemy/commits/d14a4b480c3b/ Changeset: d14a4b480c3b Branch: None User: zzzeek Date: 2015-08-17 21:12:16+00:00 Summary: - merge of ticket_3514 None-handling branch - Fixes to the ORM and to the postgresql JSON type regarding the ``None`` constant in conjunction with the Postgresql :class:`.JSON` type. When the :paramref:`.JSON.none_as_null` flag is left at its default value of ``False``, the ORM will now correctly insert the Json "'null'" string into the column whenever the value on the ORM object is set to the value ``None`` or when the value ``None`` is used with :meth:`.Session.bulk_insert_mappings`, **including** if the column has a default or server default on it. This makes use of a new type-level flag "evaluates_none" which is implemented by the JSON type based on the none_as_null flag. fixes #3514 - Added a new constant :attr:`.postgresql.JSON.NULL`, indicating that the JSON NULL value should be used for a value regardless of other settings. part of fixes #3514 Affected #: 8 files Repository URL: https://bitbucket.org/zzzeek/sqlalchemy/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |