summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug where the combination of "limit" rendering asMike Bayer2014-04-301-2/+5
| | | | | | | | | "SELECT FIRST n ROWS" using a bound parameter (only firebird has both), combined with column-level subqueries which also feature "limit" as well as "positional" bound parameters (e.g. qmark style) would erroneously assign the subquery-level positions before that of the enclosing SELECT, thus returning parameters which are out of order. Fixes #3038
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-264-4/+4
| | | | Found using: https://github.com/intgr/topy
* - Fixed regression caused by release 0.8.5 / 0.9.3's compatibilityMike Bayer2014-03-251-1/+1
| | | | | | | | | enhancements where index reflection on Postgresql versions specific to only the 8.1, 8.2 series again broke, surrounding the ever problematic int2vector type. While int2vector supports array operations as of 8.1, apparently it only supports CAST to a varchar as of 8.3. fix #3000
* - Fixed a few errant ``u''`` strings that would prevent tests from passingMike Bayer2014-03-221-2/+2
| | | | in Py3.2. Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980
* - Added new datatype :class:`.oracle.DATE`, which is a subclass ofMike Bayer2014-03-221-10/+15
| | | | | | | | | | | | :class:`.DateTime`. As Oracle has no "datetime" type per se, it instead has only ``DATE``, it is appropriate here that the ``DATE`` type as present in the Oracle dialect be an instance of :class:`.DateTime`. This issue doesn't change anything as far as the behavior of the type, as data conversion is handled by the DBAPI in any case, however the improved subclass layout will help the use cases of inspecting types for cross-database compatibility. Also removed uppercase ``DATETIME`` from the Oracle dialect as this type isn't functional in that context. fixes #2987
* - cx_oracle test for "unicode returns" needs to be cx_oracle only,Mike Bayer2014-03-061-0/+4
| | | | | | | and also will fail on py3k. - enhance exclusions so that a requirement attribute can be passed to fails_if/skip_if. - fix coverage docs to mention pytest.
* Merge branch 'master' of https://github.com/Cito/sqlalchemy into tMike Bayer2014-03-051-2/+8
|\
| * Restore coercion to unicode with cx_Oracle.pr/74Christoph Zwerschke2014-02-271-2/+8
| | | | | | | | This feature is now turned off by default.
* | pytest calls all the descriptors. and we can't call this one unconditionallyMike Bayer2014-03-041-7/+6
| |
* | - Support has been added for pytest to run tests. This runnerMike Bayer2014-03-034-41/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | is currently being supported in addition to nose, and will likely be preferred to nose going forward. The nose plugin system used by SQLAlchemy has been split out so that it works under pytest as well. There are no plans to drop support for nose at the moment and we hope that the test suite itself can continue to remain as agnostic of testing platform as possible. See the file README.unittests.rst for updated information on running tests with pytest. The test plugin system has also been enhanced to support running tests against mutiple database URLs at once, by specifying the ``--db`` and/or ``--dburi`` flags multiple times. This does not run the entire test suite for each database, but instead allows test cases that are specific to certain backends make use of that backend as the test is run. When using pytest as the test runner, the system will also run specific test suites multiple times, once for each database, particularly those tests within the "dialect suite". The plan is that the enhanced system will also be used by Alembic, and allow Alembic to run migration operation tests against multiple backends in one run, including third-party backends not included within Alembic itself. Third party dialects and extensions are also encouraged to standardize on SQLAlchemy's test suite as a basis; see the file README.dialects.rst for background on building out from SQLAlchemy's test platform.
* - Added new MySQL-specific :class:`.mysql.DATETIME` which includesMike Bayer2014-02-191-3/+24
| | | | | | | 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-0/+30
|\ | | | | | | into t
| * Fixes MySQL dialect partitioningMarcus McCurdy2014-02-141-0/+30
| |
* | - Support has been improved for Postgresql reflection behavior on very oldMike Bayer2014-02-184-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | (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.
* | - dont need this import and it's not in 2.6 anywayMike Bayer2014-02-171-1/+0
| |
* | - rewrite SQLite reflection tests into one consistent fixture, which testsMike Bayer2014-02-161-159/+144
| | | | | | | | 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-4/+16
| | | | | | | | | | | | 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.
* | Merge branch 'master' of https://github.com/eblume/sqlalchemy into tMike Bayer2014-02-161-5/+63
|\ \ | |/ |/|
| * SQLite dialect - support relection from affinitypr/65Erich Blume2014-02-031-5/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!).
* | - Added :paramref:`.MetaData.reflect.**dialect_kwargs`Mike Bayer2014-02-021-88/+175
|/ | | | | | | | | | | | | | | | | | 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]
* Support mssql_clustered option on UniqueConstraint (plus docs and test)donkopotamus2014-01-171-0/+12
|
* Remove support for mssql_clustered on Tabledonkopotamus2014-01-171-12/+1
|
* Support mssql_clustered option in mssql dialect for both Table and ↵donkopotamus2014-01-141-0/+22
| | | | PrimaryKeyConstraint
* - The MySQL CAST compilation now takes into account aspects of a stringMike Bayer2014-01-132-2/+12
| | | | | | | | | | | | | | | | | | | | | 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]
* - support addition of fails_if()/only_on(), just wraps the decoratorsMike Bayer2014-01-021-1/+2
| | | | - update a few exclusions to support current pymssql. passes all of test_suite and dialect/mssql
* - rework the JSON expression system so that "astext" is called *after*Mike Bayer2013-12-271-7/+25
| | | | | | | | | 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].
* - The firebird dialect will quote identifiers which begin with anMike Bayer2013-12-271-0/+9
| | | | underscore. Courtesy Treeve Jelbert. [ticket:2897]
* Merge pull request #51 from sontek/pymssql_handle_terminated_connectionmike bayer2013-12-271-3/+4
|\ | | | | Remove terminated connections from the pool.
| * Remove terminated connections from the pool.pr/51John Anderson2013-12-161-3/+4
| | | | | | | | | | | | 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.
* | remove printMike Bayer2013-12-191-1/+0
| |
* | - Improvements to the system by which SQL types generate withinMike Bayer2013-12-181-3/+18
| | | | | | | | | | | | | | | | ``__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]
* | - make the json serializer and deserializer per-dialect, so that we areMike Bayer2013-12-171-22/+69
| | | | | | | | | | compatible with psycopg2's per-connection/cursor approach. add round trip tests for both native and non-native.
* | this test appears to be failing with pg 9.3, not sure how to restore itMike Bayer2013-12-171-1/+3
| |
* | - using AssertsCompiledSQL so need __dialect__Mike Bayer2013-12-171-0/+3
| |
* | - rework JSON expressions to be based off __getitem__ exclusivelyMike Bayer2013-12-171-29/+78
| | | | | | | | | | | | | | | | | | - add support for "standalone" JSON objects; this involves getting CAST to upgrade the given type of a bound parameter. should add a core-only test for this. - add tests for "standalone" json round trips both with and without unicode - add mechanism by which we remove psycopg2's "json" handler in order to get the effect of using our non-native result handlers
* | Merge branch 'issue_2581' of github.com:nathan-rice/sqlalchemy into pg_jsonMike Bayer2013-12-171-1/+190
|\ \ | |/ |/|
| * sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-111-3/+37
| | | | | | | | | | - Added support for additional operators - Made return as json default (rather than text)
| * sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Fixed reference to HSTORE - Corrected spelling of SQLAlchemy sqlalchemy/dialects/postgresql/psycopg2: - Added psycopg2 specific wrapper type for JSON which uses inherent json deserialization facilities - Added code to detect and utilize the JSON wrapper if psycopg2 >= 2.5 test/dialect/postgresql/test_types: - removed reference to use_native_hstore
| * Merge branch 'rel_0_9' of https://github.com/nathan-rice/sqlalchemy into rel_0_9nathan2013-12-091-0/+11
| |\
| * | sqlalchemy/dialects/postgresql/__init__.py:nathan2013-12-091-1/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added import references to JSON class sqlalchemy/dialects/postgresql/base.py: - Added visitor method for JSON class sqlalchemy/dialects/postgresql/pgjson (new): - JSON class, supports automatic serialization and deserialization of json data, as well as basic json operators.
* | | - round trip testMike Bayer2013-12-091-0/+11
| | | | | | | | | | | | | | | - changelog - some doc rearrangement
* | | Adds test to verify tsvector creation.Noufal Ibrahim2013-12-101-1/+2
| |/ |/| | | | | Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
* | - changelog + test for pullreq #7, MSSQL dialect for DROP INDEXMike Bayer2013-12-051-0/+11
|/
* - move additional enum compilation tests to postgresql/test_compiler.pyMike Bayer2013-11-302-26/+26
|
* - Fixed bug where values within an ENUM weren't escaped for singleMike Bayer2013-11-301-0/+16
| | | | | quote signs. Note that this is backwards-incompatible for existing workarounds that manually escape the single quotes. [ticket:2878]
* - add support for specifying tables or entities for "of"Mike Bayer2013-11-282-1/+8
| | | | | - implement Query with_for_update() - rework docs and tests
* - fix up rendering of "of"Mike Bayer2013-11-283-0/+113
| | | | | | - move out tests, dialect specific out of compiler, compiler tests use new API, legacy API tests in test_selecatble - add support for adaptation of ForUpdateArg, alias support in compilers
* - this test only for mysqlMike Bayer2013-11-231-2/+5
|
* - The precision used when coercing a returned floating point value toMike Bayer2013-11-221-1/+18
| | | | | | | | | | Python ``Decimal`` via string is now configurable. The flag ``decimal_return_scale`` is now supported by all :class:`.Numeric` and :class:`.Float` types, which will ensure this many digits are taken from the native floating point value when it is converted to string. If not present, the type will make use of the value of ``.scale``, if the type supports this setting and it is non-None. Otherwise the original default length of 10 is used. [ticket:2867]
* Fixed bug where Oracle ``VARCHAR`` types given with no lengthMike Bayer2013-11-221-0/+6
| | | | | (e.g. for a ``CAST`` or similar) would incorrectly render ``None CHAR`` or similar. [ticket:2870]