summaryrefslogtreecommitdiff
path: root/test/dialect
Commit message (Collapse)AuthorAgeFilesLines
* - 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
| | * | Removed all mentions to postgresql_relkindRodrigo Menezes2014-08-261-22/+11
| | | |
| | * | Merge branch 'master' of https://github.com/rclmenezes/sqlalchemyRodrigo Menezes2014-08-141-0/+66
| | |\ \
| | * | | Added support for postgres_relkind.Rodrigo Menezes2014-08-141-1/+101
| | | | |
* | | | | - Fixed the version string detection in the pymssql dialect toMike Bayer2014-09-161-0/+20
|/ / / / | | | | | | | | | | | | | | | | | | | | work with Microsoft SQL Azure, which changes the word "SQL Server" to "SQL Azure". fixes #3151
* | | | - MySQL boolean symbols "true", "false" work again. 0.9's changeMike Bayer2014-09-051-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in :ticket:`2682` disallowed the MySQL dialect from making use of the "true" and "false" symbols in the context of "IS" / "IS NOT", but MySQL supports this syntax even though it has no boolean type. MySQL remains "non native boolean", but the :func:`.true` and :func:`.false` symbols again produce the keywords "true" and "false", so that an expression like ``column.is_(true())`` again works on MySQL. fixes #3186
* | | | - The hostname-based connection format for SQL Server when usingMike Bayer2014-09-031-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyodbc will no longer specify a default "driver name", and a warning is emitted if this is missing. The optimal driver name for SQL Server changes frequently and is per-platform, so hostname based connections need to specify this. DSN-based connections are preferred. fixes #3182
* | | | - The :func:`~.expression.column` and :func:`~.expression.table`Mike Bayer2014-09-013-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constructs are now importable from the "from sqlalchemy" namespace, just like every other Core construct. - The implicit conversion of strings to :func:`.text` constructs when passed to most builder methods of :func:`.select` as well as :class:`.Query` now emits a warning with just the plain string sent. The textual conversion still proceeds normally, however. The only method that accepts a string without a warning are the "label reference" methods like order_by(), group_by(); these functions will now at compile time attempt to resolve a single string argument to a column or label expression present in the selectable; if none is located, the expression still renders, but you get the warning again. The rationale here is that the implicit conversion from string to text is more unexpected than not these days, and it is better that the user send more direction to the Core / ORM when passing a raw string as to what direction should be taken. Core/ORM tutorials have been updated to go more in depth as to how text is handled. fixes #2992
* | | | - these tests were squashing deprecation warnings all along...Mike Bayer2014-08-311-5/+8
| |_|/ |/| |
* | | - pep8 formatting for pg table opts feature, testsMike Bayer2014-08-231-22/+73
| | | | | | | | | | | | | | | | | | | | | - add support for PG INHERITS - fix mis-named tests - changelog fixes #2051
* | | Correcting options name from withoids to with_oidsMalik Diarra2014-08-171-3/+3
| | |
* | | quoting tablespace name in create table command in postgresql dialectMalik Diarra2014-08-171-0/+5
| | |
* | | Adding oids and on_commit table optionsMalik Diarra2014-08-171-0/+22
| | |
* | | Adding a tablespace options for postgresql create tableMalik Diarra2014-08-171-0/+6
| |/ |/|
* | Merge branch 'pr126'Mike Bayer2014-08-131-0/+66
|\ \ | |/ |/| | | | | Conflicts: doc/build/changelog/changelog_10.rst
| * - public method name is get_enums()Mike Bayer2014-08-131-12/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - return a list of dicts like other methods do - don't combine 'schema' with 'name', leave them separate - support '*' argument so that we can retrieve cross-schema if needed - remove "conn" argument - use bound parameters for 'schema' in SQL - order by schema, name, label - adapt _load_enums changes to column reflection - changelog - module docs for get_enums() - add drop of enums to --dropfirst
| * Public inspector method to load enum listpr/126Ilya Pekelny2014-08-081-0/+21
| | | | | | | | | | Provide opportunity to get enums list via an inspector instance public interface.
* | - add tests for the savepoint recipeMike Bayer2014-08-091-0/+78
| |
* | - oursql doesn't pass this consistently, not sure what the issue isMike Bayer2014-08-081-6/+12
| |
* | oursql seems to handle this? unclear, might be dependent on mysql versionMike Bayer2014-08-081-7/+1
|/
* -Fixed bug where Postgresql JSON type was not able to persist orMike Bayer2014-08-071-5/+98
| | | | | | | | | | | | | | | | | otherwise render a SQL NULL column value, rather than a JSON-encoded ``'null'``. To support this case, changes are as follows: * The value :func:`.null` can now be specified, which will always result in a NULL value resulting in the statement. * A new parameter :paramref:`.JSON.none_as_null` is added, which when True indicates that the Python ``None`` value should be peristed as SQL NULL, rather than JSON-encoded ``'null'``. Retrival of NULL as None is also repaired for DBAPIs other than psycopg2, namely pg8000. fixes #3159
* - The exception wrapping system for DBAPI errors can now accommodateMike Bayer2014-07-291-0/+10
| | | | | | | | non-standard DBAPI exceptions, such as the psycopg2 TransactionRollbackError. These exceptions will now be raised using the closest available subclass in ``sqlalchemy.exc``, in the case of TransactionRollbackError, ``sqlalchemy.exc.OperationalError``. fixes #3075