| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
"super" instead of hardcoding to "self.type" for the default return
value, the base Comparator was returning other_comparator.type. It's
not clear what the rationale for this was, though in theory the
base Comparator should possibly even throw an exception if the two
types aren't the same (or of the same affinity?) .
- mysql.SET was broken on this because the bitwise version adds "0"
to the value to force an integer within column_expression, we are doing type_coerces here
now in any case so that there is no type ambiguity for this
operation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
| |
without primary keys to be reflected as well as ensured that
a SQL statement involved in foreign key detection is pre-fetched up
front to avoid driver issues upon nested queries. Fixes here
courtesy Eugene Zapolsky; note that we cannot currently test
Sybase to locally verify these changes.
fixes #3508 fixes #3509
|
|
|
|
|
|
|
|
|
|
|
|
| |
or other variable-length column type with unbounded length
by assigning the token ``"max"`` to the
length attribute of the string. While using the ``"max"`` token
explicitly is supported by the SQL Server dialect, it isn't part
of the normal contract of the base string types, and instead the
length should just be left as None. The dialect now assigns the
length to None on reflection of the type so that the type behaves
normally in other contexts.
fixes #3504
|
|
|
|
|
|
|
|
| |
up SQLAlchemy's version detection under Python 3 and inadvertently
not using the correct unicode mode for Python 3. This would cause
issues such as bound variables mis-interpreted as NULL and rows
silently not being returned.
fixes #3491
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
that included non-alphabetic characters in the names, like dots or
spaces, would not be reflected with their name.
fixes #3495
|
| |
|
|
|
|
|
|
|
|
|
| |
an INSERT of NULL + pyodbc; pyodbc requires a special
object be passed in order to persist NULL. As the :class:`.VARBINARY`
type is now usually the default for :class:`.LargeBinary` due to
:ticket:`3039`, this issue is partially a regression in 1.0.
The pymssql driver appears to be unaffected.
fixes #3464
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
"max_row_buffer" execution option for BufferedRowResultProxy
- also add documentation, changelog and version notes
- rework the max_row_buffer argument to be interpreted from
the execution options upfront when the BufferedRowResultProxy
is first initialized.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
psycopg2cffi dialect, in particular that the current 2.7.0 version
does not have native support for the JSONB type. The version detection
for psycopg2 features has been tuned into a specific sub-version
for psycopg2cffi. Additionally, test coverage has been enabled
for the full series of psycopg2 features under psycopg2cffi.
fixes #3439
|
|/ |
|
|
|
|
| |
valid version (Microsoft released the spec late).
|
|
|
|
|
|
|
|
| |
:func:`.engine_from_config` were not being parsed correctly;
these included ``pool_threadlocal`` and the psycopg2 argument
``use_native_unicode``. fixes #3435
- add legacy_schema_aliasing config parsing for mssql
- move use_native_unicode config arg to the psycopg2 dialect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``legacy_schema_aliasing`` which when set to False will disable a
very old and obsolete behavior, that of the compiler's
attempt to turn all schema-qualified table names into alias names,
to work around old and no longer locatable issues where SQL
server could not parse a multi-part identifier name in all
circumstances. The behavior prevented more
sophisticated statements from working correctly, including those which
use hints, as well as CRUD statements that embed correlated SELECT
statements. Rather than continue to repair the feature to work
with more complex statements, it's better to just disable it
as it should no longer be needed for any modern SQL server
version. The flag defaults to True for the 1.0.x series, leaving
current behavior unchanged for this version series. In the 1.1
series, it will default to False. For the 1.0 series,
when not set to either value explicitly, a warning is emitted
when a schema-qualified table is first used in a statement, which
suggests that the flag be set to False for all modern SQL Server
versions.
fixes #3424
fixes #3430
|
|
|
|
| |
non-Integer column types, fixes #2075
|
|
|
|
|
|
|
|
|
|
|
| |
pep-249 exception names linked to exception classes of an entirely
different name, preventing SQLAlchemy's own exception wrapping from
wrapping the error appropriately.
The SQLAlchemy dialect in use needs to implement a new
accessor :attr:`.DefaultDialect.dbapi_exception_translation_map`
to support this feature; this is implemented now for the py-postgresql
dialect.
fixes #3421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(hence becoming two regressions); reports that
SELECT statements would GROUP BY a label name and fail was misconstrued
that certain backends such as SQL Server should not be emitting
ORDER BY or GROUP BY on a simple label name at all; when in fact,
we had forgotten that 0.9 was already emitting ORDER BY on a simple
label name for all backends, as described in :ref:`migration_1068`,
as 1.0 had rewritten this logic as part of :ticket:`2992`.
In 1.0.2, the bug is fixed both that SQL Server, Firebird and others
will again emit ORDER BY on a simple label name when passed a
:class:`.Label` construct that is expressed in the columns clause,
and no backend will emit GROUP BY on a simple label name in this case,
as even Postgresql can't reliably do GROUP BY on a simple name
in every case.
fixes #3338, fixes #3385
|
|
|
|
|
|
| |
with Firebird, so that the values are again rendered inline when
this is selected. Related to :ticket:`3034`.
fixes #3381
|
|
|
| |
Fix TypeError: Boolean value of this clause is not defined
|
|
|
|
| |
See https://github.com/pymssql/pymssql/commit/e7fb15dd29090e1f1bb570842b53aea1ec32d8f0
|
|
|
|
|
|
|
|
|
|
| |
with the psycopg2 dialect in conjunction with non-ascii values
and ``native_enum=False`` would fail to decode return results properly.
This stemmed from when the PG :class:`.postgresql.ENUM` type used
to be a standalone type without a "non native" option.
fixes #3354
- corrected the assertsql comparison rule to expect a non-ascii
SQL string
|
|
|
|
|
|
|
| |
:ticket:`3184` would cause index operations to fail on Postgresql
versions 8.4 and earlier. The enhancements are now
disabled when using an older version of Postgresql.
fixes #3343
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
is the flag that per :ticket:`2992` causes an order by or group by
an expression that's also in the columns clause to be copied by
label, even if referenced as the expression object. The behavior
for MSSQL is now the old behavior that copies the whole expression
in by default, as MSSQL can be picky on these particularly in
GROUP BY expressions.
fixes #3338
- Add a test that includes a composed label in a GROUP BY
|
|
|
|
|
|
|
|
|
| |
operation with unicode parameters. SQLAlchemy now passes both
the statement as well as the bound parameters as unicode
objects, as PyMySQL generally uses string interpolation
internally to produce the final statement, and in the case of
executemany does the "encode" step only on the final statement.
fixes #3337
|
|
|
|
| |
as up-to-date recommendations as possible
|
| |
|
|
|
|
|
|
| |
out.
- add __backend__ to the dialect suite so that it runs on CI.
- will be 1.0.0b3
|
|\
| |
| |
| |
| | |
Conflicts:
lib/sqlalchemy/dialects/mysql/mysqldb.py
|
| | |
|
| |
| |
| |
| | |
these files are present.
|
| | |
|
|\ \
| | |
| | |
| | | |
https://bitbucket.org/graingert/sqlalchemy into pr49
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
That is, after exhausing all rows using the fetch methods, the
DBAPI cursor is released as before and the object may be safely
discarded, but the fetch methods may continue to be called for which
they will return an end-of-result object (None for fetchone, empty list
for fetchmany and fetchall). Only if :meth:`.ResultProxy.close`
is called explicitly will these methods raise the "result is closed"
error.
fixes #3330 fixes #3329
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DROP TYPE instruction when a plain ``table.drop()`` is called,
assuming the object is not associated directly with a
:class:`.MetaData` object. In order to accomodate the use case of
an enumerated type shared between multiple tables, the type should
be associated directly with the :class:`.MetaData` object; in this
case the type will only be created at the metadata level, or if
created directly. The rules for create/drop of
Postgresql enumerated types have been highly reworked in general.
fixes #3319
|