summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed the ``.python_type`` attribute of :class:`.postgresql.INTERVAL`Mike Bayer2015-11-191-0/+18
| | | | | | | | | 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)
* - Added support for reflecting the source of materialized viewsMike Bayer2015-11-181-0/+10
| | | | | | to the Postgresql version of the :meth:`.Inspector.get_view_definition` method. fixes #3587
* - extend pullreq github:213 to also include DATETIMEOFFSET and TIME,Mike Bayer2015-11-141-1/+87
| | | | | | which also accept zero precision - extend test case here to include a backend-agnostic suite - changelog for MSSQL date fix
* Pass precision value to mssql.DATETIME2 when it is 0pr/213Jacobo de Vera2015-11-131-0/+2
| | | | | The simple check on the precision results in DATETIME2(0) generating a DATETIME2 column, with default precision, which is 7.
* - modernize some very old global-engine tests w/ bad teardownsMike Bayer2015-10-111-238/+260
|
* - repair flake8 issuesMike Bayer2015-10-111-44/+49
|
* - repair laziness about setting time zone here, which is leakingMike Bayer2015-10-111-9/+17
| | | | out depending on connection pool state
* - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-074-52/+95
| | | | | | | | | | | | | | | | | "auto increment" column has been changed, such that autoincrement is no longer implicitly enabled for a :class:`.Table` that has a composite primary key. In order to accommodate being able to enable autoincrement for a composite PK member column while at the same time maintaining SQLAlchemy's long standing behavior of enabling implicit autoincrement for a single integer primary key, a third state has been added to the :paramref:`.Column.autoincrement` parameter ``"auto"``, which is now the default. fixes #3216 - The MySQL dialect no longer generates an extra "KEY" directive when generating CREATE TABLE DDL for a table using InnoDB with a composite primary key with AUTO_INCREMENT on a column that isn't the first column; to overcome InnoDB's limitation here, the PRIMARY KEY constraint is now generated with the AUTO_INCREMENT column placed first in the list of columns.
* - Fixed bug in Oracle dialect where reflection of tables and otherMike Bayer2015-10-051-0/+26
| | | | | | | | symbols with names quoted to force all-lower-case would not be identified properly in reflection queries. The :class:`.quoted_name` construct is now applied to incoming symbol names that detect as forced into all-lower-case within the "name normalize" process. fixes #3548
* - limit the search for schemas to not include "temp", which is sort of an ↵Mike Bayer2015-09-281-23/+17
| | | | | | | | | | implicit schema - repair the CREATE INDEX ddl for schemas - update provisioning to include support for setting up ATTACH DATABASE up front for the test_schema; enable "schemas" testing for SQLite - changelog / migration notes for new SQLite schema support - include the "schema" as the "remote_schema" when we reflect SQLite FKs
* Merge remote-tracking branch 'origin/pr/198' into pr198Mike Bayer2015-09-281-0/+5
|\
| * Support get_schema_names for SQLitepr/198Brian Van Klaveren2015-09-091-0/+5
| | | | | | Should return "main" and the names of attached databases.
* | - The ``legacy_schema_aliasing`` flag, introduced in version 1.0.5Mike Bayer2015-09-193-12/+10
| | | | | | | | | | | | | | as part of :ticket:`3424` to allow disabling of the MSSQL dialect's attempts to create aliases for schema-qualified tables, now defaults to False; the old behavior is now disabled unless explicitly turned on. fixes #3434
* | - The use of a :class:`.postgresql.ARRAY` object that refersMike Bayer2015-09-191-0/+26
| | | | | | | | | | | | | | 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
* | - The :class:`.TypeDecorator` type extender will now work in conjunctionMike Bayer2015-08-271-0/+28
| | | | | | | | | | | | | | | | | | | | | | with a :class:`.SchemaType` implementation, typically :class:`.Enum` or :class:`.Boolean` with regards to ensuring that the per-table events are propagated from the implementation type to the outer type. These events are used to ensure that the constraints or Postgresql types (e.g. ENUM) are correctly created (and possibly dropped) along with the parent table. fixes #2919
* | - add a postgresql-specific form of array_agg() that injects theMike Bayer2015-08-271-0/+11
| | | | | | | | ARRAY type, references #3132
* | - add PG-specific aggregate_order_by(), references #3132Mike Bayer2015-08-271-1/+45
| |
* | - Added support for "set-aggregate" functions of the formticket_3516Mike Bayer2015-08-262-7/+7
| | | | | | | | | | | | | | | | | | | | | | ``<function> WITHIN GROUP (ORDER BY <criteria>)``, using the method :class:`.FunctionElement.within_group`. A series of common set-aggregate functions with return types derived from the set have been added. This includes functions like :class:`.percentile_cont`, :class:`.dense_rank` and others. fixes #1370 - make sure we use func.name for all _literal_as_binds in functions.py so we get consistent naming behavior for parameters.
* | - Added support for the SQL-standard function :class:`.array_agg`,Mike Bayer2015-08-261-0/+27
| | | | | | | | | | | | | | which automatically returns an :class:`.Array` of the correct type and supports index / slice operations. As arrays are only supported on Postgresql at the moment, only actually works on Postgresql. fixes #3132
* | - build out a new base type for Array, as well as new any/all operatorsMike Bayer2015-08-252-7/+156
| | | | | | | | | | | | - any/all work for Array as well as subqueries, accepted by MySQL - Postgresql ARRAY now subclasses Array - fixes #3516
* | - fix the postgresql_jsonb requirement to include the 9.4 requirementMike Bayer2015-08-182-4/+4
| | | | | | | | | | | | | | | | - new test for json col['x']['y']['z'] seems to fail pre PG 9.4, fails on comparisons for non-compatible data instead of not matching - no need to call SpecPredicate(db) directly in exclusion functions, by using Predicate.as_predicate() the spec strings can have version comparisons
* | - merge of ticket_3514 None-handling branchMike Bayer2015-08-171-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | - merge of ticket_3499 indexed access branchMike Bayer2015-08-172-27/+274
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* - Fixed issue where the SQL Server dialect would reflect a string-Mike Bayer2015-07-301-4/+30
| | | | | | | | | | | | 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
* - An adjustment to the new Postgresql feature of reflecting storageMike Bayer2015-07-241-0/+1
| | | | | | | | | 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
* - Fixed issue when using :class:`.VARBINARY` type in conjunction withMike Bayer2015-06-221-67/+92
| | | | | | | | | 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
* Fix typopr/183Pete Hollobon2015-06-221-1/+1
|
* - for #3455Mike Bayer2015-06-192-28/+41
| | | | | | | | | - 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
* Merge remote-tracking branch 'origin/pr/179' into pr179Mike Bayer2015-06-192-0/+63
|\
| * Add reflection of PostgreSQL index access methods (USING clause)pr/179Pete Hollobon2015-06-041-0/+19
| |
| * Add reflection of PostgreSQL index storage optionsPete Hollobon2015-06-041-0/+20
| |
| * Add support for PostgreSQL index storage parametersPete Hollobon2015-06-031-0/+24
| | | | | | | | | | Add support for specifying PostgreSQL index storage paramters (e.g. fillfactor).
* | - Repaired the :class:`.ExcludeConstraint` construct to support commonMike Bayer2015-06-161-3/+43
| | | | | | | | | | | | | | 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
* | - Repaired some typing and test issues related to the pypyMike Bayer2015-06-054-38/+37
|/ | | | | | | | | 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
* - fix this test to not require pyodbc installedMike Bayer2015-06-031-1/+2
|
* - Fixed bug where known boolean values used byMike Bayer2015-05-262-0/+27
| | | | | | | | :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
* - Added a new dialect flag to the MSSQL dialectMike Bayer2015-05-242-41/+171
| | | | | | | | | | | | | | | | | | | | | | | ``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
* - break out binary insert against None, disable for freetds for nowMike Bayer2015-05-241-12/+37
|
* - autopep8Mike Bayer2015-05-242-234/+270
|
* - Fixed a long-standing bug where the :class:`.Enum` type as usedMike Bayer2015-04-041-10/+50
| | | | | | | | | | 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
* - Fixed bug where updated PG index reflection as a result ofMike Bayer2015-04-011-0/+1
| | | | | | | :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
* - totally skip on mysqlconnector for nowMike Bayer2015-03-211-0/+1
|
* - oursql is unsupported on thisMike Bayer2015-03-211-0/+1
|
* - Repaired the commit for issue #2771 which was inadvertently commentedMike Bayer2015-03-201-0/+3
| | | | | | out. - add __backend__ to the dialect suite so that it runs on CI. - will be 1.0.0b3
* - test fixMike Bayer2015-03-201-0/+1
|
* - add a test for #2771, fixes #2771Mike Bayer2015-03-201-0/+8
| | | | - changelog for #2771
* - The Postgresql :class:`.postgresql.ENUM` type will emit aMike Bayer2015-03-111-0/+99
| | | | | | | | | | | | 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
* Merge branch 'postgres-concurrently' of ↵Mike Bayer2015-03-101-0/+10
|\ | | | | | | https://bitbucket.org/iurisilvio/sqlalchemy into pr45
| * Dialect option `postgresql_concurrently` to `Index` construct.Iuri de Silvio2015-02-251-0/+10
| |
* | Merge branch 'sqlite-partial-indexes' of ↵Mike Bayer2015-03-101-1/+22
|\ \ | | | | | | | | | https://bitbucket.org/groner/sqlalchemy into pr42