summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
Commit message (Collapse)AuthorAgeFilesLines
* dialects/mssql/pymssql.py: Remove second two paragraphs, as requested by ↵pr/75Marc Abramowitz2014-03-031-9/+0
| | | | @zzzeek.
* Update pymssql dialect description, remove "limitations" sectionMarc Abramowitz2014-02-271-9/+16
|
* Update URL for pymssqlMarc Abramowitz2014-02-271-1/+1
|
* fix typorel_0_9_3Mike Bayer2014-02-191-1/+1
|
* - Added an additional message to psycopg2 disconnect detection,Mike Bayer2014-02-191-0/+1
| | | | | | "could not send data to server", which complements the existing "could not receive data from server" and has been observed by users, fixes #2936
* - add a topological rule here to place PARTITIONS after PARTITION_BY,Mike Bayer2014-02-191-1/+2
| | | | for output consistency within the tests as well as in practice
* - Added new MySQL-specific :class:`.mysql.DATETIME` which includesMike Bayer2014-02-191-17/+73
| | | | | | | fractional seconds support; also added fractional seconds support to :class:`.mysql.TIMESTAMP`. DBAPI support is limited, though fractional seconds are known to be supported by MySQL Connector/Python. Patch courtesy Geert JM Vanderkelen. #2941
* Merge branch 'master' of https://bitbucket.org/50onred/sqlalchemy/overview ↵Mike Bayer2014-02-191-2/+2
|\ | | | | | | into t
| * Fixes MySQL dialect partitioningMarcus McCurdy2014-02-141-2/+2
| |
* | - update mysql connector python link, #2938Mike Bayer2014-02-181-1/+1
| |
* | - Support has been improved for Postgresql reflection behavior on very oldMike Bayer2014-02-181-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | (pre 8.1) versions of Postgresql, and potentially other PG engines such as Redshift (assuming Redshift reports the version as < 8.1). The query for "indexes" as well as "primary keys" relies upon inspecting a so-called "int2vector" datatype, which refuses to coerce to an array prior to 8.1 causing failures regarding the "ANY()" operator used in the query. Extensive googling has located the very hacky, but recommended-by-PG-core-developer query to use when PG version < 8.1 is in use, so index and primary key constraint reflection now work on these versions.
* | update docs re: cx_oracle unicode as of 0.9.2, no more outputtypehandlersMike Bayer2014-02-182-22/+33
| |
* | - rewrite SQLite reflection tests into one consistent fixture, which testsMike Bayer2014-02-161-25/+31
| | | | | | | | both _resolve_type_affinity() directly as well as round trip tests fully.
* | - The SQLite dialect will now skip unsupported arguments when reflectingMike Bayer2014-02-161-1/+8
| | | | | | | | | | | | types; such as if it encounters a string like ``INTEGER(5)``, the :class:`.INTEGER` type will be instantiated without the "5" being included, based on detecting a ``TypeError`` on the first attempt.
* | - changelog + documentation for pullreq github:65Mike Bayer2014-02-161-6/+57
| |
* | Merge branch 'master' of https://github.com/eblume/sqlalchemy into tMike Bayer2014-02-162-154/+165
|\ \
| * | SQLite dialect - support relection from affinitypr/65Erich Blume2014-02-031-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite allows column types that aren't technically understood in sqlite by using 'data affinity', which is an algorithm for converting column types in to some sort of useful type that can be stored and retrieved from the db. Unfortunatly, this breaks reflection since we (previously) expected a sqlite db to reflect column types that we permit in the `ischema_names` for that dialect. This patch changes the logic for 'unknown' column types during reflection to instead run through SQLite's data affinity algorithm, and assigns appropriate types from that. It also expands the matching for column type to include column types with spaces (strongly discouraged but allowed by sqlite) and also completely empty column types (in which case the NullType is assigned, which sqlite will treat as a Blob - or rather, Blob is treated as NullType). These changes mean that SQLite will never raise an error for an unknown type during reflection - there will always be some 'useful' type returned, which follows the spirit of SQLite (accomodation before sanity!).
| * | PEP-8 compliance for dialects/sqlite/base.pyErich Blume2014-01-302-143/+129
| | |
* | | Merge pull request #64 from LevonXXL/mastermike bayer2014-02-161-0/+4
|\ \ \ | | | | | | | | python_type for ARRAY (PGArray)
| * | | python_type for ARRAY (PGArray)pr/64Terentev2014-02-031-0/+4
| | | |
* | | | - add documentation regarding native hstore flag, psycopg2Mike Bayer2014-02-161-4/+31
| | | | | | | | | | | | | | | | hstore extension. #2959
* | | | - expand docs on MySQL table arguments beyond just storage enginesMike Bayer2014-02-151-30/+63
| | | | | | | | | | | | | | | | | | | | - clarify section on "foreign key reflection" and group this in a section that refers to foreign keys.
* | | | - Added server version detection to the newly added dialect startupMike Bayer2014-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | query for "show standard_conforming_strings"; as this variable was added as of PG 8.2, we skip the query for PG versions older than that as well as for backends like Redshift. #2946
* | | | - Revised this very old issue where the Postgresql "get primary key"Mike Bayer2014-02-141-1/+15
| |_|/ |/| | | | | | | | | | | | | | | | | reflection query were updated to take into account primary key constraints that were renamed; the newer query fails on very old versions of Postgresql such as version 7, so the old query is restored in those cases when server_version_info < (8, 0) is detected. #2291
* | | Parse server version info more robustlypr/69Matt (work)2014-02-111-1/+8
| | | | | | | | | | | | Closes #2934
* | | - Fixed bug which prevented MySQLdb-based dialects (e.g.Mike Bayer2014-02-031-0/+1
|/ / | | | | | | | | | | | | | | | | | | pymysql) from working in Py3K, where a check for "connection charset" would fail due to Py3K's more strict value comparison rules. The call in question wasn't taking the database version into account in any case as the server version was still None at that point, so the method overall has been simplified to rely upon connection.character_set_name(). [ticket:2933]
* | - add a few missing methods to the cymysql dialectMike Bayer2014-02-021-0/+8
| |
* | - Added :paramref:`.MetaData.reflect.**dialect_kwargs`Mike Bayer2014-02-021-38/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to support dialect-level reflection options for all :class:`.Table` objects reflected. - Added a new dialect-level argument ``postgresql_ignore_search_path``; this argument is accepted by both the :class:`.Table` constructor as well as by the :meth:`.MetaData.reflect` method. When in use against Postgresql, a foreign-key referenced table which specifies a remote schema name will retain that schema name even if the name is present in the ``search_path``; the default behavior since 0.7.3 has been that schemas present in ``search_path`` would not be copied to reflected :class:`.ForeignKey` objects. The documentation has been updated to describe in detail the behavior of the ``pg_get_constraintdef()`` function and how the ``postgresql_ignore_search_path`` feature essentially determines if we will honor the schema qualification reported by this function or not. [ticket:2922]
* | - Fixed bug whereby SQLite compiler failed to propagate compiler argumentsMike Bayer2014-01-311-2/+2
|/ | | | | | | | | | such as "literal binds" into a CAST expression. - Fixed bug whereby binary type would fail in some cases if used with a "test" dialect, such as a DefaultDialect or other dialect with no DBAPI. - Fixed bug where "literal binds" wouldn't work with a bound parameter that's a binary type. A similar, but different, issue is fixed in 0.8.
* - Added new test coverage for so-called "down adaptions" of SQL types,Mike Bayer2014-01-222-8/+10
| | | | | | | | | | | where a more specific type is adapted to a more generic one - this use case is needed by some third party tools such as ``sqlacodegen``. The specific cases that needed repair within this test suite were that of :class:`.mysql.ENUM` being downcast into a :class:`.types.Enum`, and that of SQLite date types being cast into generic date types. The ``adapt()`` method needed to become more specific here to counteract the removal of a "catch all" ``**kwargs`` collection on the base :class:`.TypeEngine` class that was removed in 0.9. [ticket:2917]
* - some test fixesMike Bayer2014-01-191-2/+4
| | | | - clean up some shenanigans in reflection
* - implement kwarg validation and type system for dialect-specificMike Bayer2014-01-187-33/+77
| | | | | arguments; [ticket:2866] - add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
* - changelog for pullreq:11Mike Bayer2014-01-181-1/+1
| | | | - be specific about version 0.9.2
* Merge branch 'patch-msql-pkc-clustered' of bitbucket.org:dharland/sqlalchemy ↵Mike Bayer2014-01-181-8/+71
|\ | | | | | | into m
| * Bug Fix: Stop generating bad sql if an empty UniqueConstraint() is givendonkopotamus2014-01-171-0/+2
| |
| * Support mssql_clustered option on UniqueConstraint (plus docs and test)donkopotamus2014-01-171-4/+29
| |
| * Remove support for mssql_clustered on Tabledonkopotamus2014-01-171-15/+5
| |
| * Support mssql_clustered option in mssql dialect for both Table and ↵donkopotamus2014-01-141-8/+54
| | | | | | | | PrimaryKeyConstraint
* | - rework Oracle to no longer do its own unicode conversion; this has been ↵Mike Bayer2014-01-171-3/+0
|/ | | | | | | | | | | observed to be very slow. this now has the effect of producing "conditional" unicode conversion for the Oracle backend, as it still returns NVARCHAR etc. as unicode [ticket:2911] - add new "conditional" functionality to unicode processors; the C-level function now uses PyUnicode_Check() as a fast alternative to the isinstance() check in Python
* - The MySQL CAST compilation now takes into account aspects of a stringMike Bayer2014-01-132-10/+50
| | | | | | | | | | | | | | | | | | | | | type such as "charset" and "collation". While MySQL wants all character- based CAST calls to use the CHAR type, we now create a real CHAR object at CAST time and copy over all the parameters it has, so that an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will render ``CAST(t.col AS CHAR CHARACTER SET utf8)``. - Added new "unicode returns" detection to the MySQL dialect and to the default dialect system overall, such that any dialect can add extra "tests" to the on-first-connect "does this DBAPI return unicode directly?" detection. In this case, we are adding a check specifically against the "utf8" encoding with an explicit "utf8_bin" collation type (after checking that this collation is available) to test for some buggy unicode behavior observed with MySQLdb version 1.2.3. While MySQLdb has resolved this issue as of 1.2.4, the check here should guard against regressions. The change also allows the "unicode" checks to log in the engine logs, which was not previously the case. [ticket:2906]
* - happy new yearMike Bayer2014-01-0547-49/+49
|
* - apply a similar fix for floats to mssql+pyodbc as we did to firebirdMike Bayer2013-12-281-3/+9
| | | | | - wrangle through osx+pyodbc+freetds to get at least test_suite to pass again with mssql+pyodbc. invovled adding some silly requirements
* - rework the JSON expression system so that "astext" is called *after*Mike Bayer2013-12-272-33/+91
| | | | | | | | | the indexing. this is for more natural operation. - also add cast() to the JSON expression to complement astext. This integrates the CAST call which will be needed frequently. Part of [ticket:2687]. - it's a little unclear how more advanced unicode attribute-access is going to go, some quick attempts at testing yielded strange error messages from psycopg2. - do other cross linking as mentioned in [ticket:2687].
* - Changed the queries used by Firebird to list table and view namesMike Bayer2013-12-271-5/+21
| | | | | | | | | to query from the ``rdb$relations`` view instead of the ``rdb$relation_fields`` and ``rdb$view_relations`` views. Variants of both the old and new queries are mentioned on many FAQ and blogs, however the new queries are taken straight from the "Firebird FAQ" which appears to be the most official source of info. [ticket:2898]
* - The firebird dialect will quote identifiers which begin with anMike Bayer2013-12-271-0/+1
| | | | underscore. Courtesy Treeve Jelbert. [ticket:2897]
* - Fixed bug in Firebird index reflection where the columns within theMike Bayer2013-12-271-1/+1
| | | | | index were not sorted correctly; they are now sorted in order of RDB$FIELD_POSITION.
* - The "asdecimal" flag used with the :class:`.Float` type will nowMike Bayer2013-12-271-1/+8
| | | | | | work with Firebird dialects; previously the decimal conversion was not occurring. - scale back some firebird FP numeric tests
* Merge pull request #51 from sontek/pymssql_handle_terminated_connectionmike bayer2013-12-271-0/+1
|\ | | | | Remove terminated connections from the pool.
| * Remove terminated connections from the pool.pr/51John Anderson2013-12-161-0/+1
| | | | | | | | | | | | In pymssql, if you terminate a long running query manually it will give you a connection reset by peer message, but this connection remains in the pool and will be re-used.
* | - Improvements to the system by which SQL types generate withinMike Bayer2013-12-181-8/+27
| | | | | | | | | | | | | | | | ``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]