summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
Commit message (Collapse)AuthorAgeFilesLines
* - most of the reorg into many files with section containersMike Bayer2014-12-161-3/+3
|
* - rework sqlite FK and unique constraint system to combine both PRAGMAMike Bayer2014-12-131-112/+187
| | | | | | 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
* - fix unique constraint parsing for sqlite -- may return '' for name, howeverJon Nelson2014-12-131-1/+1
|
* - SQL Server 2012 now recommends VARCHAR(max), NVARCHAR(max),Mike Bayer2014-12-061-9/+96
| | | | | | | 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
* - The SQLite dialect, when using the :class:`.sqlite.DATE`,Mike Bayer2014-12-051-1/+59
| | | | | | | | | | | | :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
* - New Oracle DDL features for tables, indexes: COMPRESS, BITMAP.Mike Bayer2014-12-041-9/+156
| | | | | Patch courtesy Gabor Gombas. fixes #3127
* - Added support for CTEs under Oracle. This includes some tweaksMike Bayer2014-12-041-15/+6
| | | | | | | 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
* - Updated the "supports_unicode_statements" flag to True for MySQLdbMike Bayer2014-12-042-3/+2
| | | | | | | | | and Pymysql under Python 2. This refers to the SQL statements themselves, not the parameters, and affects issues such as table and column names using non-ASCII characters. These drivers both appear to support Python 2 Unicode objects without issue in modern versions. fixes #3121
* - The :meth:`.Operators.match` operator is now handled such that theMike Bayer2014-12-041-0/+9
| | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | ``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 behavioral contract of the :attr:`.ForeignKeyConstraint.columns`Mike Bayer2014-11-251-2/+2
| | | | | | | | collection has been made consistent; this attribute is now a :class:`.ColumnCollection` like that of all other constraints and is initialized at the point when the constraint is associated with a :class:`.Table`. fixes #3243
* - don't do inline string interpolation when loggingJon Nelson2014-11-111-1/+1
|
* - in lieu of adding a new system of translating bound parameter namesMike Bayer2014-11-101-0/+49
| | | | | | | for psycopg2 and others, encourage users to take advantage of positional styles by documenting "paramstyle". A section is added to psycopg2 specifically as this is a pretty common spot for named parameters that may be unusually named. fixes #3246.
* - added new backend for pysqlcipher, as we will probably getMike Bayer2014-10-292-1/+117
| | | | requests for it soon.
* - Mysqlconnector as of version 2.0, probably as a side effect ofMike Bayer2014-10-121-6/+40
| | | | | | | | | | | | | | | | the python 3 merge, now does not expect percent signs (e.g. as used as the modulus operator and others) to be doubled, even when using the "pyformat" bound parameter format (this change is not documented by Mysqlconnector). The dialect now checks for py2k and for mysqlconnector less than version 2.0 when detecting if the modulus operator should be rendered as ``%%`` or ``%``. - Unicode SQL is now passed for MySQLconnector version 2.0 and above; for Py2k and MySQL < 2.0, strings are encoded. Note that mysqlconnector as of 2.0.1 appears to have a bug with unicode DDL on py2k, so the tests here are skipping until we observe it's fixed. - take out profiling on mysqlconnector, callcounts vary too much with its current development speed
* Merge remote-tracking branch 'origin/pr/140' into pr140Mike Bayer2014-10-113-4/+4
|\
| * cleanup exception handling - use new exception hierarchy (since python 2.5)pr/140ndparker2014-10-023-12/+4
| |
| * improve exception vs. exit handlingndparker2014-09-233-0/+8
| |
* | - Fixed long-standing bug in Oracle dialect where bound parameterMike Bayer2014-10-111-1/+2
| | | | | | | | | | | | names that started with numbers would not be quoted, as Oracle doesn't like numerics in bound parameter names. fixes #2138
* | - clean up unicode docs and clarify that client_encodingMike Bayer2014-10-071-13/+53
| | | | | | | | | | at the engine level is not the same thing as at the connect args level.
* | - use provide_metadata for new unique constraint / index testsMike Bayer2014-10-042-12/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-6/+15
|\ \ | | | | | | | | | https://bitbucket.org/jerdfelt/sqlalchemy into pr30
| * | Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-172-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | - A revisit to this issue first patched in 0.9.5, apparentlyMike Bayer2014-09-291-5/+9
| |/ |/| | | | | | | | | | | | | | | | | psycopg2's ``.closed`` accessor is not as reliable as we assumed, so we have added an explicit check for the exception messages "SSL SYSCALL error: Bad file descriptor" and "SSL SYSCALL error: EOF detected" when detecting an is-disconnect scenario. We will continue to consult psycopg2's connection.closed as a first check. fixes #3021
* | - Added support for the Oracle table option ON COMMIT. This is beingMike Bayer2014-09-171-2/+44
|/ | | | | | | | | 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-10/+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-10/+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-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | :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-3/+35
|\ \ | |/ |/|
| * - repair get_foreign_table_names() for PGInsp/dialect levelpr128Mike Bayer2014-09-171-16/+31
| | | | | | | | | | - repair get_view_names() - changelog + migration note
| * Merge remote-tracking branch 'origin/pr/128' into pr128Mike Bayer2014-09-161-3/+20
| |\
| | * Added documentation. Changed my mind - added get_foreign_table_names() only ↵pr/128Rodrigo Menezes2014-09-051-19/+17
| | | | | | | | | | | | to PGInspect and not in the Dialect. Added tests for PGInspect and removed a bunch of the old test scaffolding.
| | * Added get_foreign_table_names to interface and put it in the test requirements.Rodrigo Menezes2014-09-051-0/+1
| | |
| | * Fixing some pep8s and adding get_foreign_tables.Rodrigo Menezes2014-09-031-2/+20
| | |
| | * Removed changes that are no longer necessary for postgresql_relkind. Also, ↵Rodrigo Menezes2014-08-261-2/+2
| | | | | | | | | | | | removed newline changes.
| | * Merge branch 'master' of https://github.com/zzzeek/sqlalchemy into ↵Rodrigo Menezes2014-08-263-11/+87
| | |\ | | | | | | | | | | | | feature/postgres-relkind
| | * | Remove relkind from construct arguments.Rodrigo Menezes2014-08-261-2/+1
| | | |
| | * | Removed all mentions to postgresql_relkindRodrigo Menezes2014-08-261-29/+9
| | | |
| | * | Add a view synonym too for consistency.Rodrigo Menezes2014-08-141-1/+2
| | | |
| | * | Merge branch 'master' of https://github.com/rclmenezes/sqlalchemyRodrigo Menezes2014-08-142-23/+73
| | |\ \
| | * | | Added support for postgres_relkind.Rodrigo Menezes2014-08-141-12/+32
| | | | |
* | | | | - Fixed the version string detection in the pymssql dialect toMike Bayer2014-09-161-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | work with Microsoft SQL Azure, which changes the word "SQL Server" to "SQL Azure". fixes #3151
* | | | - omit MySQL index flavor if its NoneMike Bayer2014-09-051-1/+2
| | | |
* | | | - MySQL boolean symbols "true", "false" work again. 0.9's changeMike Bayer2014-09-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | - ensure literal_binds works with LIMIT clause, FOR UPDATEMike Bayer2014-09-036-21/+21
| | | |
* | | | - The hostname-based connection format for SQL Server when usingMike Bayer2014-09-031-53/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | - updates to migration / changelog for 1.0Mike Bayer2014-08-261-1/+1
| |_|/ |/| |
* | | - mention that FOUND_ROWS is hardcoded; fixes #3146Mike Bayer2014-08-251-7/+5
| | |
* | | - pep8 formatting for pg table opts feature, testsMike Bayer2014-08-231-24/+59
| | | | | | | | | | | | | | | | | | | | | - add support for PG INHERITS - fix mis-named tests - changelog fixes #2051