summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* Missing comma in method argspr/184Benjamin Petersen2015-06-221-1/+1
|
* - Fixed issue when using :class:`.VARBINARY` type in conjunction withMike Bayer2015-06-221-2/+20
| | | | | | | | | an INSERT of NULL + pyodbc; pyodbc requires a special object be passed in order to persist NULL. As the :class:`.VARBINARY` type is now usually the default for :class:`.LargeBinary` due to :ticket:`3039`, this issue is partially a regression in 1.0. The pymssql driver appears to be unaffected. fixes #3464
* - Re-fixed this issue first released in 1.0.5 to fix psycopg2cffiMike Bayer2015-06-221-1/+1
| | | | | | | | JSONB support once again, as they suddenly switched on unconditional decoding of JSONB types in version 2.7.1. Version detection now specifies 2.7.1 as where we should expect the DBAPI to do json encoding for us. fixes #3439
* - repair that we use db_opts when the url here is different,Mike Bayer2015-06-191-3/+8
| | | | as we are using db_opts for the first time with legacy_schema_args
* - fixes to the warnings filtersMike Bayer2015-06-191-3/+1
|
* - more edits, references #3461Mike Bayer2015-06-191-2/+4
|
* - for #3455Mike Bayer2015-06-191-4/+17
| | | | | | | | | - changelog - versionadded + reflink for new pg storage parameters doc - pep8ing - add additional tests to definitely check that the Index object is created all the way with the opts we want fixes #3455
* Merge remote-tracking branch 'origin/pr/179' into pr179Mike Bayer2015-06-191-3/+36
|\
| * Add reflection of PostgreSQL index access methods (USING clause)pr/179Pete Hollobon2015-06-041-3/+13
| |
| * Add reflection of PostgreSQL index storage optionsPete Hollobon2015-06-041-3/+9
| |
| * Add support for PostgreSQL index storage parametersPete Hollobon2015-06-031-0/+17
| | | | | | | | | | Add support for specifying PostgreSQL index storage paramters (e.g. fillfactor).
* | - Fixed 1.0 regression where the enhanced behavior of single-inheritanceMike Bayer2015-06-191-3/+4
| | | | | | | | | | | | | | | | joins of :ticket:`3222` takes place inappropriately for a JOIN along explicit join criteria with a single-inheritance subclass that does not make use of any discriminator, resulting in an additional "AND NULL" clause. fixes #3462
* | - add explciit section on engine disposal, fixes #3461Mike Bayer2015-06-191-14/+10
| |
* | - automap is stableMike Bayer2015-06-181-6/+0
| |
* | - Repaired the :class:`.ExcludeConstraint` construct to support commonMike Bayer2015-06-163-19/+56
| | | | | | | | | | | | | | features that other objects like :class:`.Index` now do, that the column expression may be specified as an arbitrary SQL expression such as :obj:`.cast` or :obj:`.text`. fixes #3454
* | Merge branch 'pr182'Mike Bayer2015-06-146-12/+47
|\ \
| * | - add test cases for pullreq github:182, where we add a newMike Bayer2015-06-142-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | "max_row_buffer" execution option for BufferedRowResultProxy - also add documentation, changelog and version notes - rework the max_row_buffer argument to be interpreted from the execution options upfront when the BufferedRowResultProxy is first initialized.
| * | - Add a new le_() assertion for less than or equalsMike Bayer2015-06-143-8/+14
| | | | | | | | | | | | | | | - fix TablesTest to use the bind that we've returned from setup_bind() to emit DELETE statements
| * | Added max_row_buffer attribute to the context execution options and usepr/182Morgan McClure2015-06-132-3/+9
| | | | | | | | | | | | it to prevent excess memory usage with yield_per
| * | BufferedRowResultProxy should stop growing at 100Morgan McClure2015-06-131-4/+1
| | |
* | | - restore the approach we have for pk_params, but in orderMike Bayer2015-06-131-6/+8
| | | | | | | | | | | | | | | to suit #3451 exclude these columns from the "params" dictionary in the first place, revises pr github:181
* | | Fix primary key behaviour in bulk_updatepr/181Patrick Hayes2015-06-131-6/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose you have a model class with a primary key. Base = declarative_base() class User(Base): id = Column(BigInteger, primary_key=True) name = Column(String) Previously, running `bulk_update_mappings(User, {'id': 1, 'name': 'hello'})` would emit the following: ```UPDATE users SET id=1, name='hello' WHERE id=1``` This is contrary to the stated behaviour, where primary keys are omitted from the SET clause. Furthermore, this behaviour is harmful, as it can cause the db engine to lock over-aggresively (at least in Postgres). With this change, the emitted SQL is: ```UPDATE users SET name='hello' WHERE id=1```
* | - Fixed an unexpected-use regression whereby custom :class:`.Comparator`Mike Bayer2015-06-111-2/+6
| | | | | | | | | | | | | | | | | | | | objects that made use of the ``__clause_element__()`` method and returned an object that was an ORM-mapped :class:`.InstrumentedAttribute` and not explicitly a :class:`.ColumnElement` would fail to be correctly handled when passed as an expression to :meth:`.Session.query`. The logic in 0.9 happened to succeed on this, so this use case is now supported. fixes #3448
* | - Fixed a bug where clause adaption as applied to a :class:`.Label`Mike Bayer2015-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | object would fail to accommodate the labeled SQL expression in all cases, such that any SQL operation that made use of :meth:`.Label.self_group` would use the original unadapted expression. One effect of this would be that an ORM :func:`.aliased` construct would not fully accommodate attributes mapped by :obj:`.column_property`, such that the un-aliased table could leak out when the property were used in some kinds of SQL comparisons. fixes #3445
* | - Fixed an internal "memoization" routine for method types suchMike Bayer2015-06-081-21/+9
| | | | | | | | | | that a Python descriptor is no longer used; repairs inspectability of these methods including support for Sphinx documentation.
* | - start 1.0.6Mike Bayer2015-06-081-1/+1
| |
* | - Added new engine event :meth:`.ConnectionEvents.engine_disposed`.Mike Bayer2015-06-062-0/+18
| | | | | | | | Called after the :meth:`.Engine.dispose` method is called.
* | - Repaired some typing and test issues related to the pypyMike Bayer2015-06-052-5/+30
| | | | | | | | | | | | | | | | | | psycopg2cffi dialect, in particular that the current 2.7.0 version does not have native support for the JSONB type. The version detection for psycopg2 features has been tuned into a specific sub-version for psycopg2cffi. Additionally, test coverage has been enabled for the full series of psycopg2 features under psycopg2cffi. fixes #3439
* | - document SQlite dotted name issue, fixes #3441Mike Bayer2015-06-051-0/+101
|/
* - changelog for pr bitbucket:54Mike Bayer2015-06-031-6/+3
| | | | - alter the approach so that the initial callable is working just like add_criteria/with_criteria
* baked: Support initial args for cache keyINADA Naoki2015-06-021-2/+2
| | | | | | | | | | | | When making baked query in classmethod of declarative base, cls should be added in cache key. @as_declarative class Base(object): @classmethod def baked_query(cls): return bakery(lambda: session.query(cls), (cls,))
* Update to correct TDS version; FreeTDS only supports up to 7.3. 8.0 is not a ↵pr/176Allen, Timothy2015-05-281-2/+6
| | | | valid version (Microsoft released the spec late).
* - Fixed bug where known boolean values used byMike Bayer2015-05-264-9/+16
| | | | | | | | :func:`.engine_from_config` were not being parsed correctly; these included ``pool_threadlocal`` and the psycopg2 argument ``use_native_unicode``. fixes #3435 - add legacy_schema_aliasing config parsing for mssql - move use_native_unicode config arg to the psycopg2 dialect
* - Added a new dialect flag to the MSSQL dialectMike Bayer2015-05-242-28/+118
| | | | | | | | | | | | | | | | | | | | | | | ``legacy_schema_aliasing`` which when set to False will disable a very old and obsolete behavior, that of the compiler's attempt to turn all schema-qualified table names into alias names, to work around old and no longer locatable issues where SQL server could not parse a multi-part identifier name in all circumstances. The behavior prevented more sophisticated statements from working correctly, including those which use hints, as well as CRUD statements that embed correlated SELECT statements. Rather than continue to repair the feature to work with more complex statements, it's better to just disable it as it should no longer be needed for any modern SQL server version. The flag defaults to True for the 1.0.x series, leaving current behavior unchanged for this version series. In the 1.1 series, it will default to False. For the 1.0 series, when not set to either value explicitly, a warning is emitted when a schema-qualified table is first used in a statement, which suggests that the flag be set to False for all modern SQL Server versions. fixes #3424 fixes #3430
* - fix some tests related to the URL change and try to makeMike Bayer2015-05-232-6/+13
| | | | the URL design a little simpler
* - Adjustments to the engine plugin hook, such that theMike Bayer2015-05-222-9/+12
| | | | | | | | :meth:`.URL.get_dialect` method will continue to return the ultimate :class:`.Dialect` object when a dialect plugin is used, without the need for the caller to be aware of the :meth:`.Dialect.get_dialect_cls` method. reference #3379
* - document fully how to use autoincrement w/ SQLite includingMike Bayer2015-05-221-7/+67
| | | | non-Integer column types, fixes #2075
* - Fixed regression in the :mod:`sqlalchemy.ext.mutable` extensionMike Bayer2015-05-213-3/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a result of the bugfix for :ticket:`3167`, where attribute and validation events are no longer called within the flush process. The mutable extension was relying upon this behavior in the case where a column level Python-side default were responsible for generating the new value on INSERT or UPDATE, or when a value were fetched from the RETURNING clause for "eager defaults" mode. The new value would not be subject to any event when populated and the mutable extension could not establish proper coercion or history listening. A new event :meth:`.InstanceEvents.refresh_flush` is added which the mutable extension now makes use of for this use case. fixes #3427 - Added new event :meth:`.InstanceEvents.refresh_flush`, invoked when an INSERT or UPDATE level default value fetched via RETURNING or Python-side default is invoked within the flush process. This is to provide a hook that is no longer present as a result of :ticket:`3167`, where attribute and validation events are no longer called within the flush process. - Added a new semi-public method to :class:`.MutableBase` :meth:`.MutableBase._get_listen_keys`. Overriding this method is needed in the case where a :class:`.MutableBase` subclass needs events to propagate for attribute keys other than the key to which the mutable type is associated with, when intercepting the :meth:`.InstanceEvents.refresh` or :meth:`.InstanceEvents.refresh_flush` events. The current example of this is composites using :class:`.MutableComposite`.
* - pg8000 wants to raise a ProgrammingError for a PK violationMike Bayer2015-05-152-0/+10
|
* - Added support for the case of the misbehaving DBAPI that hasMike Bayer2015-05-157-5/+85
| | | | | | | | | | | pep-249 exception names linked to exception classes of an entirely different name, preventing SQLAlchemy's own exception wrapping from wrapping the error appropriately. The SQLAlchemy dialect in use needs to implement a new accessor :attr:`.DefaultDialect.dbapi_exception_translation_map` to support this feature; this is implemented now for the py-postgresql dialect. fixes #3421
* - The "lightweight named tuple" used when a :class:`.Query` returnsMike Bayer2015-05-141-0/+2
| | | | | | | | rows failed to implement ``__slots__`` correctly such that it still had a ``__dict__``. This is resolved, but in the extremely unlikely case someone was assigning values to the returned tuples, that will no longer work. fixes #3420
* - Fixed bug where in the case that a pool checkout event handler is usedMike Bayer2015-05-141-1/+7
| | | | | | | | | | | | | | | | | and the database can no longer be connected towards, that the checkout handler failure is caught, the attempt to re-acquire the connection also raises an exception, but the underlying connection record is not immediately re-checked in before the exception is propagated outwards, having the effect that the checked-out record does not close itself until the stack trace it's associated with is garbage collected, preventing that record from being used for a new checkout until we leave the scope of the stack trace. This can lead to confusion in the specific case of when the number of current stack traces in memory exceeds the number of connections the pool can return, as the pool will instead begin to raise errors about no more checkouts available, rather than attempting a connection again. The fix applies a checkin of the record before re-raising. fixes #3419
* - Added official support for a CTE used by the SELECT presentMike Bayer2015-05-081-1/+15
| | | | | | | | | | | inside of :meth:`.Insert.from_select`. This behavior worked accidentally up until 0.9.9, when it no longer worked due to unrelated changes as part of :ticket:`3248`. Note that this is the rendering of the WITH clause after the INSERT, before the SELECT; the full functionality of CTEs rendered at the top level of INSERT, UPDATE, DELETE is a new feature targeted for a later release. fixes #3418
* - start 1.0.5Mike Bayer2015-05-081-1/+1
|
* - Fixed unexpected-use regression where in the odd case that theMike Bayer2015-05-063-4/+19
| | | | | | | | | | primaryjoin of a relationship involved comparison to an unhashable type such as an HSTORE, lazy loads would fail due to a hash-oriented check on the statement parameters, modified in 1.0 as a result of :ticket:`3061` to use hashing and modified in :ticket:`3368` to occur in cases more common than "load on pending". The values are now checked for the ``__hash__`` attribute beforehand. fixes #3416
* - fix typo MANYTOONE -> MANYTOMANY, fixes #3415Mike Bayer2015-05-051-1/+1
|
* Mark tests that they require OFFSET support in databasepr/171Peter Hoffmann2015-05-051-1/+4
| | | | | The sqlalchemy_exasol dialect needs to support Exasol 4.x which does not support the OFFSET feature. Mark test with testing.requires.offset so that they can be skipped of in the exasol specific test suite.
* - Liberalized an assertion that was added as part of :ticket:`3347`Mike Bayer2015-05-021-1/+5
| | | | | | | | to protect against unknown conditions when splicing inner joins together within joined eager loads with ``innerjoin=True``; if some of the joins use a "secondary" table, the assertion needs to unwrap further joins in order to pass. fixes #3412
* - Fixed bug in enhanced constraint-attachment logic introduced inMike Bayer2015-05-021-8/+16
| | | | | | | | | | | :ticket:`3341` where in the unusual case of a constraint that refers to a mixture of :class:`.Column` objects and string column names at the same time, the auto-attach-on-column-attach logic will be skipped; for the constraint to be auto-attached in this case, all columns must be assembled on the target table up front. Added a new section to the migration document regarding the original feature as well as this change. fixes #3411
* - move away from explicit raises of SkipTest, instead call aMike Bayer2015-05-016-17/+36
| | | | | | | function patched onto config. nose/pytest backends now fill in their exception class here only when loaded - use more public seeming api to get at py.test Skipped exception