summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
Commit message (Collapse)AuthorAgeFilesLines
* Add 'native' autocommit support for mysql driverspr/157Roman Podoliaka2015-02-243-0/+33
| | | | | | Sometimes it might be useful to have 'native' autocommit support provided by a DB API driver rather than rely on SQLAlchemy autocommit emulation.
* - The MySQL dialect now supports CAST on types that are constructedMike Bayer2015-02-091-3/+6
| | | | as :class:`.TypeDecorator` objects.
* - add a fix to MySQL re: #3074 tests, make sure we check table is presentMike Bayer2015-02-091-1/+2
|
* - A warning is emitted when :func:`.cast` is used with the MySQLMike Bayer2015-02-091-0/+7
| | | | | | | | | | | 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
* - add versionadded for service_nameMike Bayer2015-02-081-0/+2
|
* - cx_Oracle.makedsn can now be passed service_name; squashSławek Ehlert2014-04-021-2/+20
| | | | commit of pr152
* - The MySQL dialect now renders TIMESTAMP with NULL / NOT NULL inMike Bayer2015-02-051-48/+40
| | | | | | | | | 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-3/+35
| | | | | | | | | | 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
* - Added support for the :class:`postgresql.JSONB` datatype whenMike Bayer2015-01-311-10/+16
| | | | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'origin/pr/145' into pr145Mike Bayer2015-01-311-2/+14
|\
| * Psycopg2 JSONB support.pr/145Mateusz Susik2014-10-241-2/+14
| |
* | - additional test adjustments for pypy / psycopg2cffi. ThisMike Bayer2015-01-261-3/+6
| | | | | | | | | | | | | | | | | | | | 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
* | Added psycopg2cffi dialectShaun Stanworth2015-01-263-4/+61
| |
* | - Added new user-space accessors for viewing transaction isolationMike Bayer2015-01-203-2/+4
| | | | | | | | | | | | | | | | | | levels; :meth:`.Connection.get_isolation_level`, :attr:`.Connection.default_isolation_level`. - enhance documentation inter-linkage between new accessors, existing isolation_level parameters, as well as in the dialect-level methods which should be fully covered by Engine/Connection level APIs now.
* | - Custom dialects that implement :class:`.GenericTypeCompiler` canMike Bayer2015-01-167-170/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | now be constructed such that the visit methods receive an indication of the owning expression object, if any. Any visit method that accepts keyword arguments (e.g. ``**kw``) will in most cases receive a keyword argument ``type_expression``, referring to the expression object that the type is contained within. For columns in DDL, the dialect's compiler class may need to alter its ``get_column_specification()`` method to support this as well. The ``UserDefinedType.get_col_spec()`` method will also receive ``type_expression`` if it provides ``**kw`` in its argument signature. fixes #3074
* | - Fixed bug where Postgresql dialect would fail to render anMike Bayer2015-01-161-2/+7
| | | | | | | | | | | | | | | | 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
* | - clean up default comparator which doesn't need to be a class,Mike Bayer2015-01-042-7/+9
| | | | | | | | get PG stuff working
* | - use a different bitwise approach here that doesn't require iteratingMike Bayer2015-01-031-5/+6
| | | | | | | | through all possible set values
* | - The :class:`.mysql.SET` type has been overhauled to no longerMike Bayer2015-01-031-49/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | - restate sort_tables in terms of a more fine grainedMike Bayer2015-01-012-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | sort_tables_and_constraints function. - The DDL generation system of :meth:`.MetaData.create_all` and :meth:`.Metadata.drop_all` has been enhanced to in most cases automatically handle the case of mutually dependent foreign key constraints; the need for the :paramref:`.ForeignKeyConstraint.use_alter` flag is greatly reduced. The system also works for constraints which aren't given a name up front; only in the case of DROP is a name required for at least one of the constraints involved in the cycle. fixes #3282
* | correctionsMike Bayer2014-12-271-1/+1
| |
* | - correctionsMike Bayer2014-12-272-6/+7
| | | | | | | | - attempt to add a script to semi-automate the fixing of links
* | - ouch, this needs to be in dbapi, not module level!Mike Bayer2014-12-191-7/+8
| |
* | - make the google deprecation messages more specific, use full URLMike Bayer2014-12-192-4/+15
| | | | | | | | | | | | format - add an extra doc to MySQLdb - changelog
* | Merge branch 'update-gaerdbms-docs' of ↵Mike Bayer2014-12-191-0/+12
|\ \ | | | | | | | | | https://bitbucket.org/rob_b/sqlalchemy into pr39
| * | Update gaerdbms to highlight improved connection methodRob Berry2014-12-181-0/+12
| | |
* | | Maul the evaulate & friends typoPriit Laes2014-12-191-1/+1
|/ /
* | - squash-merge the improve_toc branch, which moves all the Sphinx stylingMike Bayer2014-12-171-3/+3
| | | | | | | | | | | | and extensions into an external library, and also reorganizes most large documentation pages into many small areas to reduce scrolling and better present the context into a more fine-grained hierarchy.
* | - Added a version check to the MySQLdb dialect surrounding theMike Bayer2014-12-161-6/+7
| | | | | | | | | | check for 'utf8_bin' collation, as this fails on MySQL server < 5.0. fixes #3274
* | - 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