summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
* - additional mysql cast-related test fixesMike Bayer2015-02-091-0/+1
|
* - The MySQL dialect now supports CAST on types that are constructedMike Bayer2015-02-091-1/+11
| | | | as :class:`.TypeDecorator` objects.
* - A warning is emitted when :func:`.cast` is used with the MySQLMike Bayer2015-02-091-29/+46
| | | | | | | | | | | dialect on a type where MySQL does not support CAST; MySQL only supports CAST on a subset of datatypes. SQLAlchemy has for a long time just omitted the CAST for unsupported types in the case of MySQL. While we don't want to change this now, we emit a warning to show that it's taken place. A warning is also emitted when a CAST is used with an older MySQL version (< 4) that doesn't support CAST at all, it's skipped in this case as well. fixes #3237
* - flake8Mike Bayer2015-02-091-74/+99
|
* - cx_Oracle.makedsn can now be passed service_name; squashSławek Ehlert2014-04-021-0/+20
| | | | commit of pr152
* - make even more tablesMike Bayer2015-02-071-27/+30
|
* - break up the tables here to avoid the error we're gettingMike Bayer2015-02-061-15/+24
| | | | on jenkins
* - The MySQL dialect now renders TIMESTAMP with NULL / NOT NULL inMike Bayer2015-02-052-29/+133
| | | | | | | | | all cases, so that MySQL 5.6.6 with the ``explicit_defaults_for_timestamp`` flag enabled will will allow TIMESTAMP to continue to work as expected when ``nullable=False``. Existing applications are unaffected as SQLAlchemy has always emitted NULL for a TIMESTAMP column that is ``nullable=True``. fixes #3155
* - Repaired support for Postgresql UUID types in conjunction withMike Bayer2015-02-011-6/+28
| | | | | | | | | | the ARRAY type when using psycopg2. The psycopg2 dialect now employs use of the psycopg2.extras.register_uuid() hook so that UUID values are always passed to/from the DBAPI as UUID() objects. The :paramref:`.UUID.as_uuid` flag is still honored, except with psycopg2 we need to convert returned UUID objects back into strings when this is disabled. fixes #2940
* Merge remote-tracking branch 'origin/pr/68' into pr68Mike Bayer2015-02-011-0/+13
|\
| * Add unit test for UUID arrays in PostgreSQL.pr/68Kevin Deldycke2014-02-061-0/+13
| |
* | - Added support for the :class:`postgresql.JSONB` datatype whenMike Bayer2015-01-311-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using psycopg2 2.5.4 or greater, which features native conversion of JSONB data so that SQLAlchemy's converters must be disabled; additionally, the newly added psycopg2 extension ``extras.register_default_jsonb`` is used to establish a JSON deserializer passed to the dialect via the ``json_deserializer`` argument. Also repaired the Postgresql integration tests which weren't actually round-tripping the JSONB type as opposed to the JSON type. Pull request courtesy Mateusz Susik. - Repaired the use of the "array_oid" flag when registering the HSTORE type with older psycopg2 versions < 2.4.3, which does not support this flag, as well as use of the native json serializer hook "register_default_json" with user-defined ``json_deserializer`` on psycopg2 versions < 2.5, which does not include native json.
* | - additional test adjustments for pypy / psycopg2cffi. ThisMike Bayer2015-01-262-17/+19
| | | | | | | | | | | | | | | | | | | | consists mainly of adjusting fixtures to ensure connections are closed explicitly. psycopg2cffi also handles unicode bind parameter names differently than psycopg2, and seems to possibly have a little less control over floating point values at least in one test which is marked as a "fail", though will see if it runs differently on linux than osx.. - changelog for psycopg2cffi, fixes #3052
* | 78-char widthShaun Stanworth2015-01-262-2/+4
| |
* | Added psycopg2cffi dialectShaun Stanworth2015-01-263-4/+6
| |
* | - rework assertsql system, fixes #3293Mike Bayer2015-01-183-145/+227
| |
* | - add an exclusion here that helps with the case of 3rd partyMike Bayer2015-01-171-0/+1
| | | | | | | | test suite redefining an existing test in test_suite
* | - Fixed bug where Postgresql dialect would fail to render anMike Bayer2015-01-161-1/+53
| | | | | | | | | | | | | | | | expression in an :class:`.Index` that did not correspond directly to a table-bound column; typically when a :func:`.text` construct was one of the expressions within the index; or could misinterpret the list of expressions if one or more of them were such an expression. fixes #3174
* | - this is passing, no idea whyMike Bayer2015-01-041-3/+0
| |
* | - The :class:`.mysql.SET` type has been overhauled to no longerMike Bayer2015-01-031-8/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:`.mysql.SET` that actually wants to include the blank value ``''`` as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes #3283
* | - clean up SET testsMike Bayer2015-01-031-95/+135
| |
* | - rework sqlite FK and unique constraint system to combine both PRAGMAMike Bayer2014-12-131-123/+291
| | | | | | | | | | | | and regexp parsing of SQL in order to form a complete picture of constraints + their names. fixes #3244 fixes #3261 - factor various PRAGMA work to be centralized into one call
* | - add test_get_unnamed_unique_constraints to SQLite reflection testsJon Nelson2014-12-131-0/+18
| |
* | - SQL Server 2012 now recommends VARCHAR(max), NVARCHAR(max),Mike Bayer2014-12-063-14/+71
| | | | | | | | | | | | | | VARBINARY(max) for large text/binary types. The MSSQL dialect will now respect this based on version detection, as well as the new ``deprecate_large_types`` flag. fixes #3039
* | pep8Mike Bayer2014-12-061-106/+141
| |
* | - The SQLite dialect, when using the :class:`.sqlite.DATE`,Mike Bayer2014-12-051-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | :class:`.sqlite.TIME`, or :class:`.sqlite.DATETIME` types, and given a ``storage_format`` that only renders numbers, will render the types in DDL as ``DATE_CHAR``, ``TIME_CHAR``, and ``DATETIME_CHAR``, so that despite the lack of alpha characters in the values, the column will still deliver the "text affinity". Normally this is not needed, as the textual values within the default storage formats already imply text. fixes #3257
* | - pep8Mike Bayer2014-12-051-191/+232
| |
* | - New Oracle DDL features for tables, indexes: COMPRESS, BITMAP.Mike Bayer2014-12-041-1/+92
| | | | | | | | | | Patch courtesy Gabor Gombas. fixes #3127
* | - Added support for CTEs under Oracle. This includes some tweaksMike Bayer2014-12-041-0/+45
| | | | | | | | | | | | | | to the aliasing syntax, as well as a new CTE feature :meth:`.CTE.suffix_with`, which is useful for adding in special Oracle-specific directives to the CTE. fixes #3220
* | - The :meth:`.Operators.match` operator is now handled such that theMike Bayer2014-12-042-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return type is not strictly assumed to be boolean; it now returns a :class:`.Boolean` subclass called :class:`.MatchType`. The type will still produce boolean behavior when used in Python expressions, however the dialect can override its behavior at result time. In the case of MySQL, while the MATCH operator is typically used in a boolean context within an expression, if one actually queries for the value of a match expression, a floating point value is returned; this value is not compatible with SQLAlchemy's C-based boolean processor, so MySQL's result-set behavior now follows that of the :class:`.Float` type. A new operator object ``notmatch_op`` is also added to better allow dialects to define the negation of a match operation. fixes #3263
* | - The :meth:`.PGDialect.has_table` method will now query againstMike Bayer2014-12-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | ``pg_catalog.pg_table_is_visible(c.oid)``, rather than testing for an exact schema match, when the schema name is None; this so that the method will also illustrate that temporary tables are present. Note that this is a behavioral change, as Postgresql allows a non-temporary table to silently overwrite an existing temporary table of the same name, so this changes the behavior of ``checkfirst`` in that unusual scenario. fixes #3264
* | - The :attr:`.Column.key` attribute is now used as the source ofMike Bayer2014-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | anonymous bound parameter names within expressions, to match the existing use of this value as the key when rendered in an INSERT or UPDATE statement. This allows :attr:`.Column.key` to be used as a "substitute" string to work around a difficult column name that doesn't translate well into a bound parameter name. Note that the paramstyle is configurable on :func:`.create_engine` in any case, and most DBAPIs today support a named and positional style. fixes #3245
* | - this test passes now in more recent mysqlconnectorMike Bayer2014-10-131-4/+2
| |
* | - Fixed long-standing bug in Oracle dialect where bound parameterMike Bayer2014-10-111-0/+22
| | | | | | | | | | | | names that started with numbers would not be quoted, as Oracle doesn't like numerics in bound parameter names. fixes #2138
* | - use provide_metadata for new unique constraint / index testsMike Bayer2014-10-042-42/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - add a test for PG reflection of unique index without any unique constraint - for PG, don't include 'duplicates_constraint' in the entry if the index does not actually mirror a constraint - use a distinct method for unique constraint reflection within table - catch unique constraint not implemented condition; this may be within some dialects and also is expected to be supported by Alembic tests - migration + changelogs for #3184 - add individual doc notes as well to MySQL, Postgreql fixes #3184
* | Merge branch 'reflect-unique-constraints' of ↵Mike Bayer2014-10-042-2/+66
|\ \ | | | | | | | | | https://bitbucket.org/jerdfelt/sqlalchemy into pr30
| * | Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-172-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to reflect a table did not create any UniqueConstraint objects. The reflection core made no calls to get_unique_constraints and as a result, the sqlite dialect would never reflect any unique constraints. MySQL transparently converts unique constraints into unique indexes, but SQLAlchemy would reflect those as an Index object and as a UniqueConstraint. The reflection core will now deduplicate the unique constraints. PostgreSQL would reflect unique constraints as an Index object and as a UniqueConstraint object. The reflection core will now deduplicate the unique indexes.
* | | - rework tests for attached databases into individual tests,Mike Bayer2014-09-291-36/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test both memory and file-based - When selecting from a UNION using an attached database file, the pysqlite driver reports column names in cursor.description as 'dbname.tablename.colname', instead of 'tablename.colname' as it normally does for a UNION (note that it's supposed to just be 'colname' for both, but we work around it). The column translation logic here has been adjusted to retrieve the rightmost token, rather than the second token, so it works in both cases. Workaround courtesy Tony Roberts. fixes #3211
* | | - Added support for the Oracle table option ON COMMIT. This is beingMike Bayer2014-09-171-0/+17
|/ / | | | | | | | | | | | | | | | | kept separate from Postgresql's ON COMMIT for now even though ON COMMIT is in the SQL standard; the option is still very specific to temp tables and we eventually would provide a more first class temporary table feature. - oracle can apparently do get_temp_table_names() too, so implement that, fix its get_table_names(), and add it to #3204. fixes #3204 again.
* | Merge branch 'sqlite-temp-table-reflection' of ↵Mike Bayer2014-09-171-0/+18
|\ \ | | | | | | | | | https://bitbucket.org/jerdfelt/sqlalchemy/branch/sqlite-temp-table-reflection into pr31
| * | Handle sqlite get_unique_constraints() call for temporary tablesJohannes Erdfelt2014-09-171-0/+18
| | | | | | | | | | | | | | | | | | | | | The sqlite get_unique_constraints() implementation did not do a union against the sqlite_temp_master table like other code does. This could result in an exception being raised if get_unique_constraints() was called against a temporary table.
* | | - Added :meth:`.Inspector.get_temp_table_names` andMike Bayer2014-09-171-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | :meth:`.Inspector.get_temp_view_names`; currently, only the SQLite dialect supports these methods. The return of temporary table and view names has been **removed** from SQLite's version of :meth:`.Inspector.get_table_names` and :meth:`.Inspector.get_view_names`; other database backends cannot support this information (such as MySQL), and the scope of operation is different in that the tables can be local to a session and typically aren't supported in remote schemas. fixes #3204
* | | Merge branch 'pr128'Mike Bayer2014-09-171-1/+116
|\ \ \ | |/ / |/| |
| * | - repair get_foreign_table_names() for PGInsp/dialect levelpr128Mike Bayer2014-09-171-3/+22
| | | | | | | | | | | | | | | - repair get_view_names() - changelog + migration note
| * | - the actual round trip requires password authent set up for the user;Mike Bayer2014-09-171-25/+7
| | | | | | | | | | | | we don't actually need a round trip test here as we're only testing reflection.
| * | - break out and fix tests for materialized view and foreign tables. foreign ↵Mike Bayer2014-09-161-72/+86
| | | | | | | | | | | | tables not working
| * | Merge remote-tracking branch 'origin/pr/128' into pr128Mike Bayer2014-09-161-1/+101
| |\ \
| | * | Added documentation. Changed my mind - added get_foreign_table_names() only ↵pr/128Rodrigo Menezes2014-09-051-0/+6
| | | | | | | | | | | | | | | | to PGInspect and not in the Dialect. Added tests for PGInspect and removed a bunch of the old test scaffolding.
| | * | Fixing some pep8s and adding get_foreign_tables.Rodrigo Menezes2014-09-031-6/+11
| | | |
| | * | Merge branch 'master' of https://github.com/zzzeek/sqlalchemy into ↵Rodrigo Menezes2014-08-261-0/+84
| | |\ \ | | | | | | | | | | | | | | | feature/postgres-relkind