| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed regression in JSON datatypes where the "literal processor" for
a JSON index value, that needs to take effect for example within DDL,
would not be invoked for the value. The native String and Integer
datatypes are now called upon from within the JSONIndexType
and JSONPathType. This is applied to the generic, Postgresql, and
MySQL JSON types.
Change-Id: Ifa5f2acfeee57a79d01d7fc85d265a37bd27c716
Fixes: #3765
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the dialect impl memoization for TypeDecorator
necessarily keeps the top-level TypeDecorator type
around, since a user-defined type will have bind and result
set processing behavior. For both TypeDecorator and Variant,
PG dialect needs to ensure it's looking at the SQLAlchemy
type to check for SmallInteger / BigInteger.
Fixes: 3739
Change-Id: I2d45fb997f17c6272d6bb826a77d2dba665adae7
(cherry picked from commit 421fa6b8bf9f0c3c5041579c89ec405ce0f5e0b0)
|
|
|
|
|
|
|
| |
Fixes: #3529
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie3bf6ad70d9be9f0e44938830e922db03573991a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/258
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also adds version detection so that DROP INDEX CONCURRENTLY
only renders if the Postgresql version is 9.2 or higher;
for CREATE INDEX CONCURRENTLY, version detection is added
to allow the phrase to omit if the Postgresql version is
less than 8.2.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I597287e0ebbbe256c957a3579b58ace6848ab4f4
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/84
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fixes: #3588
Change-Id: Ifbfcab67375f289ddb5c4522f4b803cb8b7c34de
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250
|
|/
|
|
|
|
|
|
| |
Adds ``key_share=True`` for with_for_update().
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I74e0c3fcbc023e1dc98a1fa0c7db67b4c3693a31
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/279
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This refines get_schema_names(), get_table_names(),
get_view_defintion(), _get_foreign_table_names(),
and get_view_names() to use better queries and
remove unnecessary explicit encoding logic.
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/250
Change-Id: I7e87b29c34b97b37f21bbc83392b2274af4db0ab
|
|/
|
|
|
| |
Change-Id: I98cd60b6830ee94e39ba9307523a9e8fb93bf4e8
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/280
|
|
|
|
|
|
|
|
| |
This adds `SELECT ... FOR UPDATE SKIP LOCKED`/
`SELECT ... FOR SHARE SKIP LOCKED` rendering.
Change-Id: Id1dc4f1cafc1de23f397a6f73d54ab2c58d5910d
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/86
|
|
|
|
|
|
|
|
|
| |
This complements the same-named parameter
available on Table.
Fixes: #3720
Change-Id: I56e081e2a551f37c3f392ca4b301c9ef82b94e59
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/233
|
|
|
|
|
|
| |
Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie6cf2d2958d1c567324db9e08fef2d3186e97350
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/80
|
|
|
|
|
|
|
|
|
| |
This is another psycopg2 error message representing an
unusable connection.
Fixes #3715
Change-Id: Ida6e212963e9c7336bf2944e7ef928619ac3a0e7
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/85
|
|
|
|
|
| |
Change-Id: I040b75ff3b4110e7e8b26442a4eb226ba8c26715
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/234
|
|
|
|
|
| |
for the SQL standard LATERAL keyword, currently only supported
by Postgresql. fixes #2857
|
|
|
|
|
|
| |
- make docs for isolation level more consistent between postgresql
and mysql
- move mysql autocommit tests
|
| |
|
|
|
| |
Prior to this change a value of `'{}'` would split into the list `['']`.
|
|
|
|
| |
back by using an attrgetter for the default case
|
|
|
|
|
|
|
|
|
| |
This supports the use case of an application that uses the same set of
:class:`.Table` objects in many schemas, such as schema-per-user.
A new execution option
:paramref:`.Connection.execution_options.schema_translate_map` is
added. fixes #2685
- latest tox doesn't like the {posargs} in the profile rerunner
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
persistence of JSON values in MySQL as well as basic operator support
of "getitem" and "getpath", making use of the ``JSON_EXTRACT``
function in order to refer to individual paths in a JSON structure.
fixes #3547
- Added a new type to core :class:`.types.JSON`. This is the
base of the PostgreSQL :class:`.postgresql.JSON` type as well as that
of the new :class:`.mysql.JSON` type, so that a PG/MySQL-agnostic
JSON column may be used. The type features basic index and path
searching support.
fixes #3619
- reorganization of migration docs etc. to try to refer both to
the fixes to JSON that helps Postgresql while at the same time
indicating these are new features of the new base JSON type.
- a rework of the Array/Indexable system some more, moving things
that are specific to Array out of Indexable.
- new operators for JSON indexing added to core so that these can
be compiled by the PG and MySQL dialects individually
- rename sqltypes.Array to sqltypes.ARRAY - as there is no generic
Array implementation, this is an uppercase type for now, consistent
with the new sqltypes.JSON type that is also not a generic implementation.
There may need to be some convention change to handle the case of
datatypes that aren't generic, rely upon DB-native implementations,
but aren't necessarily all named the same thing.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For example, this query:
SELECT s1.users.name FROM s1.users FOR UPDATE OF s1.users
should actually be:
SELECT s1.users.name FROM s1.users FOR UPDATE OF users
fixes #3573
|
|/
|
|
| |
__bool__ eval
|
|
|
|
|
|
|
|
|
| |
to return ``datetime.timedelta`` in the same way as that of
:obj:`.types.Interval.python_type`, rather than raising
``NotImplementedError``.
fixes #3571
(cherry picked from commit 29d6f6e19b014bb5ce79032bd8803e32b4da0e5e)
|
|
|
|
|
|
| |
to the Postgresql version of the :meth:`.Inspector.get_view_definition`
method.
fixes #3587
|
| |
|
|
|
|
| |
rather than hardcoded version
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which indicates to the ORM that a positive set of None should be
persisted as the value NULL, instead of omitting the column from
the INSERT statement. This feature is used both as part of the
implementation for :ticket:`3514` as well as a standalone feature
available on any type. fixes #3250
- add new documentation section illustrating the "how to force null"
use case of #3250
- alter our change from #3514 so that the class-level flag is now
called "should_evaluate_none"; so that "evaluates_none" is now
a generative method.
|
|
|
|
|
|
|
| |
to a :class:`.types.Enum` or :class:`.postgresql.ENUM` subtype
will now emit the expected "CREATE TYPE" and "DROP TYPE" DDL when
the type is used within a "CREATE TABLE" or "DROP TABLE".
fixes #2729
|
|
|
|
| |
ARRAY type, references #3132
|
|
|
|
| |
for all assorted PG SQL extensions
|
| |
|
|
|
|
|
|
| |
- any/all work for Array as well as subqueries, accepted by MySQL
- Postgresql ARRAY now subclasses Array
- fixes #3516
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
| |
options and USING of :ticket:`3455` released in 1.0.6,
to disable the feature for Postgresql versions < 8.2 where the
``reloptions`` column is not provided; this allows Amazon Redshift
to again work as it is based on an 8.0.x version of Postgresql.
Fix courtesy Pete Hollobon.
references #3455
|
| |
|
|
|
|
|
|
|
|
| |
JSONB support once again, as they suddenly
switched on unconditional decoding of JSONB types in version 2.7.1.
Version detection now specifies 2.7.1 as where we should expect
the DBAPI to do json encoding for us.
fixes #3439
|
|
|
|
|
|
|
|
|
| |
- changelog
- versionadded + reflink for new pg storage parameters doc
- pep8ing
- add additional tests to definitely check that the Index object
is created all the way with the opts we want
fixes #3455
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Add support for specifying PostgreSQL index storage paramters (e.g.
fillfactor).
|
| |
| |
| |
| |
| |
| |
| | |
features that other objects like :class:`.Index` now do, that
the column expression may be specified as an arbitrary SQL
expression such as :obj:`.cast` or :obj:`.text`.
fixes #3454
|