summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
Commit message (Collapse)AuthorAgeFilesLines
* - inline get_effective_schema and preparer setup to get profilesticket_2685Mike Bayer2016-01-081-2/+5
| | | | back down
* - add a test for the cache coverageMike Bayer2016-01-081-5/+2
|
* - docs, changelogsMike Bayer2016-01-081-4/+1
| | | | | - support reflection, has_table - more tests
* - wip for #2685Mike Bayer2016-01-081-5/+16
|
* - pg8000 fixes for jsonMike Bayer2016-01-071-0/+1
|
* - Added a new entrypoint system to the engine to allow "plugins" toMike Bayer2016-01-061-0/+2
| | | | | | | | | | | be stated in the query string for a URL. Custom plugins can be written which will be given the chance up front to alter and/or consume the engine's URL and keyword arguments, and then at engine create time will be given the engine itself to allow additional modifications or event registration. Plugins are written as a subclass of :class:`.CreateEnginePlugin`; see that class for details. fixes #3536
* - Added :class:`.mysql.JSON` for MySQL 5.7. The JSON type providesMike Bayer2016-01-069-191/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* - break out mysql/base into modules as it's getting huge with more to comeMike Bayer2016-01-044-1488/+1534
|
* - An adjustment to the regular expression used to parse MySQL views,Mike Bayer2015-12-221-1/+1
| | | | | | | such that we no longer assume the "ALGORITHM" keyword is present in the reflected view source, as some users have reported this not being present in some Amazon RDS environments. fixes #3613
* Add new reserved words for MySQL 5.7.pr/222Hanno Schlichting2015-12-141-0/+2
|
* - Fixed bug in MySQL reflection where the "fractional sections portion"Mike Bayer2015-12-071-0/+5
| | | | | | | | of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and :class:`.mysql.TIME` types would be incorrectly placed into the ``timestamp`` attribute, which is unused by MySQL, instead of the ``fsp`` attribute. fixes #3602
* - Added the error "20006: Write to the server failed" to the listMike Bayer2015-11-301-1/+2
| | | | | | of disconnect errors for the pymssql driver, as this has been observed to render a connection unusable. fixes #3585
* Merge remote-tracking branch 'origin/pr/216'Mike Bayer2015-11-301-1/+1
|\
| * - Postgres: Do not prefix table with schema in: "FOR UPDATE of <table>"pr/216Diana Clarke2015-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge remote-tracking branch 'origin/pr/215'Mike Bayer2015-11-301-1/+1
|\ \
| * | fix postgresql exclude contraint to check when= against None rather than ↵pr/215aisch2015-11-231-1/+1
| |/ | | | | | | __bool__ eval
* | - A descriptive ValueError is now raised in the event that SQL serverMike Bayer2015-11-301-2/+10
|/ | | | | | | returns an invalid date or time format from a DATE or TIME column, rather than failing with a NoneType error. Pull request courtesy Ed Avis. pullreq github:206
* - Fixed the ``.python_type`` attribute of :class:`.postgresql.INTERVAL`Mike Bayer2015-11-191-0/+6
| | | | | | | | | 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-5/+21
| | | | | | 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-2/+2
| | | | | | 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-1/+1
| | | | | The simple check on the precision results in DATETIME2(0) generating a DATETIME2 column, with default precision, which is 7.
* Updated PostgreSQL links to point to "current" rather than hardcoded versionJeff Widman2015-11-051-2/+2
|
* Update links in SQLAlchemy docs that point to postgres docs to use 'devel' ↵Jeff Widman2015-11-041-2/+2
| | | | rather than hardcoded version
* - cross-linking for pool recycle featureMike Bayer2015-10-301-0/+5
|
* Merge remote-tracking branch 'origin/pr/208'Mike Bayer2015-10-081-1/+1
|\
| * Update base.pypr/208Peter Demin2015-10-071-1/+1
| | | | | | Docstring typo keysowrds => keywords
* | - for DB's w/o a real "autoincrement", reflection should be returningMike Bayer2015-10-073-3/+3
|/ | | | "auto", doesn't matter if there's a default here
* - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-072-38/+15
| | | | | | | | | | | | | | | | | "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/+3
| | | | | | | | 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-6/+20
| | | | | | | | | | 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/+7
|\
| * Support get_schema_names for SQLiteBrian Van Klaveren2015-09-091-0/+7
| |
* | - The ``legacy_schema_aliasing`` flag, introduced in version 1.0.5Mike Bayer2015-09-191-67/+37
| | | | | | | | | | | | | | 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
* | - Added a new type-level modifier :meth:`.TypeEngine.evaluates_none`Mike Bayer2015-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | - The use of a :class:`.postgresql.ARRAY` object that refersMike Bayer2015-09-191-1/+14
| | | | | | | | | | | | | | 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
* | - add a postgresql-specific form of array_agg() that injects theMike Bayer2015-08-274-4/+24
| | | | | | | | ARRAY type, references #3132
* | - consolidate "constraints.py" into the more general "ext.py",Mike Bayer2015-08-273-100/+92
| | | | | | | | for all assorted PG SQL extensions
* | - add PG-specific aggregate_order_by(), references #3132Mike Bayer2015-08-273-1/+71
| |
* | - build out a new base type for Array, as well as new any/all operatorsMike Bayer2015-08-253-192/+48
| | | | | | | | | | | | - any/all work for Array as well as subqueries, accepted by MySQL - Postgresql ARRAY now subclasses Array - fixes #3516
* | - forgot to implement py3k logic for JSON.NULLMike Bayer2015-08-181-23/+21
| |
* | - as the Concatenable mixin was changed to support calling down toMike Bayer2015-08-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | "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
* | - document workaround type for ARRAY of ENUM, fixes #3467Mike Bayer2015-08-182-0/+45
| |
* | - merge of ticket_3514 None-handling branchMike Bayer2015-08-171-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-176-707/+756
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 two issues regarding Sybase reflection, allowing tablesMike Bayer2015-08-101-6/+9
| | | | | | | | | 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
* - Fixed issue where the SQL Server dialect would reflect a string-Mike Bayer2015-07-301-1/+1
| | | | | | | | | | | | 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
* - Fixed support for cx_Oracle version 5.2, which was trippingMike Bayer2015-07-291-2/+5
| | | | | | | | 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
* - An adjustment to the new Postgresql feature of reflecting storageMike Bayer2015-07-241-1/+3
| | | | | | | | | 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 bug in SQLite dialect where reflection of UNIQUE constraintsMike Bayer2015-07-211-1/+1
| | | | | | that included non-alphabetic characters in the names, like dots or spaces, would not be reflected with their name. fixes #3495
* - add a note, references #3487Mike Bayer2015-07-151-0/+10
|