summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine
Commit message (Collapse)AuthorAgeFilesLines
* Fix cross referencespr/44Vraj Mohan2013-11-141-1/+1
|
* Ensure API doc for make_url and resolve referencesVraj Mohan2013-11-131-2/+2
|
* Fix cross referencesVraj Mohan2013-11-121-2/+4
|
* Merge branch 'master' of github.com:ijl/sqlalchemy into merge_2183Mike Bayer2013-10-251-1/+6
|\
| * #2183: Metadata.reflect() foreign keys include options when the dialect ↵ijl2013-10-131-1/+6
| | | | | | | | exposes it
* | An overhaul of expression handling for special symbols particularlyMike Bayer2013-10-231-1/+3
| | | | | | | | | | | | | | | | | | | | with conjunctions, e.g. ``None`` :func:`.expression.null` :func:`.expression.true` :func:`.expression.false`, including consistency in rendering NULL in conjunctions, "short-circuiting" of :func:`.and_` and :func:`.or_` expressions which contain boolean constants, and rendering of boolean constants and expressions as compared to "1" or "0" for backends that don't feature ``true``/``false`` constants. [ticket:2804]
* | - The regexp used by the :func:`.url.make_url` function now parsesMike Bayer2013-10-231-2/+11
|/ | | | ipv6 addresses, e.g. surrounded by brackets. [ticket:2851]
* - The method signature of :meth:`.Dialect.reflecttable`, which inMike Bayer2013-10-112-11/+12
| | | | | | | all known cases is provided by :class:`.DefaultDialect`, has been tightened to expect ``include_columns`` and ``exclude_columns`` arguments without any kw option, reducing ambiguity - previously ``exclude_columns`` was missing. [ticket:2748]
* Merge pull request #25 from gthb/ticket_2821mike bayer2013-09-292-3/+10
|\ | | | | Hide password in URL and Engine __repr__
| * Hide password in URL and Engine __repr__pr/25Gunnlaugur Þór Briem2013-09-062-3/+10
| | | | | | | | Fixes #2821
* | Replace a big loop + dict lookup in Connection.execute() with a simple visitorpr/30Alex Gaynor2013-09-251-18/+7
|/ | | | pattern
* plus some more adjustments for mysql, or in general if an Index refers toMike Bayer2013-08-281-1/+9
| | | | in-python only cols
* Fixed bug where using the ``column_reflect`` event to change the ``.key``Mike Bayer2013-08-281-6/+17
| | | | | | of the incoming :class:`.Column` would prevent primary key constraints, indexes, and foreign key constraints from being correctly reflected. Also in 0.8.3. [ticket:2811]
* - A rework to the way that "quoted" identifiers are handled, in thatMike Bayer2013-08-273-1/+61
| | | | | | | | | | | | | | | | instead of relying upon various ``quote=True`` flags being passed around, these flags are converted into rich string objects with quoting information included at the point at which they are passed to common schema constructs like :class:`.Table`, :class:`.Column`, etc. This solves the issue of various methods that don't correctly honor the "quote" flag such as :meth:`.Engine.has_table` and related methods. The :class:`.quoted_name` object is a string subclass that can also be used explicitly if needed; the object will hold onto the quoting preferences passed and will also bypass the "name normalization" performed by dialects that standardize on uppercase symbols, such as Oracle, Firebird and DB2. The upshot is that the "uppercase" backends can now work with force-quoted names, such as lowercase-quoted names and new reserved words. [ticket:2812]
* - ensure rowcount is returned for an UPDATE with no implicit returningMike Bayer2013-08-251-5/+4
| | | | | - modernize test for that - use py3k compatible next() in test_returning/test_versioning
* - The ``version_id_generator`` parameter of ``Mapper`` can now be specifiedMike Bayer2013-08-253-0/+23
| | | | | | | | | | | | | | | | | | | | | to rely upon server generated version identifiers, using triggers or other database-provided versioning features, by passing the value ``False``. The ORM will use RETURNING when available to immediately load the new version identifier, else it will emit a second SELECT. [ticket:2793] - The ``eager_defaults`` flag of :class:`.Mapper` will now allow the newly generated default values to be fetched using an inline RETURNING clause, rather than a second SELECT statement, for backends that support RETURNING. - Added a new variant to :meth:`.ValuesBase.returning` called :meth:`.ValuesBase.return_defaults`; this allows arbitrary columns to be added to the RETURNING clause of the statement without interfering with the compilers usual "implicit returning" feature, which is used to efficiently fetch newly generated primary key values. For supporting backends, a dictionary of all fetched values is present at :attr:`.ResultProxy.returned_defaults`. - add a glossary entry for RETURNING - add documentation for version id generation, [ticket:867]
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-3/+1
| | | | | | | | | - rework the event system so that event modules load after their targets, dependencies are reversed - create an improved strategy lookup system for the ORM - rework the ORM to have very few import cycles - move out "importlater" to just util.dependency - other tricks to cross-populate modules in as clear a way as possible
* - A large refactoring of the ``sqlalchemy.sql`` package has reorganizedMike Bayer2013-08-127-312/+21
| | | | | | | | | | | | | | | | | | | | | | the import structure of many core modules. ``sqlalchemy.schema`` and ``sqlalchemy.types`` remain in the top-level package, but are now just lists of names that pull from within ``sqlalchemy.sql``. Their implementations are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``, ``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was moved from ``sqlalchemy.engine``. ``sqlalchemy.sql.expression`` is also a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``, ``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``. Most of the "factory" functions used to create SQL expression objects have been moved to classmethods or constructors, which are exposed in ``sqlalchemy.sql.expression`` using a programmatic system. Care has been taken such that all the original import namespaces remain intact and there should be no impact on any existing applications. The rationale here was to break out these very large modules into smaller ones, provide more manageable lists of function names, to greatly reduce "import cycles" and clarify the up-front importing of names, and to remove the need for redundant functions and documentation throughout the expression package.
* find some more inline imports and move them outMike Bayer2013-08-041-1/+1
|
* - don't need resolve, don't need import for this. just look in sys.modules,Mike Bayer2013-08-041-1/+1
| | | | since we are dealing with cycles in any case.
* a missing cursor.close() here caused a *huge* amount of weird locking ↵Mike Bayer2013-08-021-7/+10
| | | | | | | | issues with pypy, what is strange is how it only occurred in some very specific places under very particular conditions, perhaps it has to do with whether or not this cursor gets gc'ed or not.
* - assorted fixes raised by pypy 2.1beta2, but all of which are goodMike Bayer2013-08-011-0/+24
| | | | | | | | | | | | | | | ideas in general: - pypy2.1 w/ sqlite3 is the first DBAPI we're seeing returning unicode in cursor.description without being py3k. add a new on-connect check for this, if we get back a u"", just don't do description decoding, should be OK for now. - the set tests in test_collection were assuming the two sets would be ordered the same when it tested pop(), can't really assume that. - test_serializer gets worse and worse, pickle is just not really viable here, ding out pypy - pypy2.1b2 seems to allow cursor.lastrowid to work (or we changed something?) - pool._threadconns.current() is a weakref, it can be None - another one of those logging.handlers imports
* Dialect.initialize() is not called a second time if an :class:`.Engine`Mike Bayer2013-07-111-0/+1
| | | | | | is recreated, due to a disconnect error. This fixes a particular issue in the Oracle 8 dialect, but in general the dialect.initialize() phase should only be once per dialect. Also in 0.8.3. [ticket:2776]
* - refactor pool a bit so that intent between ↵Mike Bayer2013-07-023-24/+32
| | | | | | | | | | | | | | ConnectionRecord/ConnectionFairy is clear; make sure that the DBAPI connection passed to the reset-on-return events/dialect hooks is also a "fairy", so that dictionaries like "info" are available. [ticket:2770] - rework the execution_options system so that the dialect is given the job of making any immediate adjustments based on a set event. move the "isolation level" logic to use this new system. Also work things out so that even engine-level execution options can be used for things like isolation level; the dialect attaches a connect-event handler in this case to handle the task. - to support this new system as well as further extensibiltiy of execution options add events engine_connect(), set_connection_execution_options(), set_engine_execution_options()
* these notes about **kw are incorrect, we are talking about the return value hereMike Bayer2013-06-091-8/+0
|
* - get_unique_constraints() pull requestMike Bayer2013-06-092-0/+4
| | | | | | - version (0.9 for now) - changelog - move the test into the test suite so that all dialects can take advantage of it
* Add basic support of unique constraints reflectionpr/4Roman Podolyaka2013-06-092-0/+39
| | | | | | | | | | | | Inspection API already supports reflection of table indexes information and those also include unique constraints (at least for PostgreSQL and MySQL). But it could be actually useful to distinguish between indexes and plain unique constraints (though both are implemented in the same way internally in RDBMS). This change adds a new method to Inspection API - get_unique_constraints() and implements it for SQLite, PostgreSQL and MySQL dialects.
* Merge branch 'ticket_2587'Mike Bayer2013-06-041-0/+5
|\ | | | | | | | | | | Conflicts: test/profiles.txt test/sql/test_selectable.py
| * - add a flag to DefaultDialect for this so that people will have someMike Bayer2013-06-041-0/+3
| | | | | | | | workaround
| * working through tests....Mike Bayer2013-06-021-0/+2
| |
* | Merge branch 'master' into ticket_1068Mike Bayer2013-06-037-102/+87
|\ \ | |/
| * get profile 1a back down to 5100 calls, that one was 10% greater due to thisMike Bayer2013-05-261-3/+3
| |
| * a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-261-1/+1
| | | | | | | | as possible
| * do a sweep of some obvious 3kismsMike Bayer2013-05-263-9/+6
| |
| * - add a test specific to sqlite testing cursor.description encoding (shouldMike Bayer2013-05-261-0/+2
| | | | | | | | | | probably be one in test_query or test_unicode...) - fix up test_unitofwork
| * that's all of engineMike Bayer2013-05-041-2/+6
| |
| * - OK we have -w sql passing for: sqlite, postgresql, oursql 2.7 + 3.3, ↵Mike Bayer2013-05-041-1/+1
| | | | | | | | mysqldb 2.7
| * use logging to output exc_info hereMike Bayer2013-05-041-11/+5
| |
| * - test_types, test_compiler, with sqlite at leastMike Bayer2013-04-281-1/+3
| |
| * resultMike Bayer2013-04-281-2/+2
| |
| * import of "sqlalchemy" and "sqlalchemy.orm" works.Mike Bayer2013-04-272-21/+11
| |
| * plugging awayMike Bayer2013-04-273-35/+28
| |
| * - the raw 2to3 runMike Bayer2013-04-277-93/+96
| | | | | | | | - went through examples/ and cleaned out excess list() calls
* | attempt number one, doesn't detect though if the label in the order by is ↵Mike Bayer2013-05-271-0/+2
|/ | | | not directly present there.
* Reworked internal exception raises that emitMike Bayer2013-04-183-49/+25
| | | | | | | | | a rollback() before re-raising, so that the stack trace is preserved from sys.exc_info() before entering the rollback. This so that the traceback is preserved when using coroutine frameworks which may have switched contexts before the rollback function returns. [ticket:2703]
* Improvements to Connection auto-invalidationMike Bayer2013-04-111-24/+32
| | | | | | | | | | | | | handling. If a non-disconnect error occurs, but leads to a delayed disconnect error within error handling (happens with MySQL), the disconnect condition is detected. The Connection can now also be closed when in an invalid state, meaning it will raise "closed" on next usage, and additionally the "close with result" feature will work even if the autorollback in an error handling routine fails and regardless of whether the condition is a disconnect or not. [ticket:2695]
* A major fix to the way in which a select() object producesMike Bayer2013-04-111-1/+1
| | | | | | | | | | | | | | | | | | | labeled columns when apply_labels() is used; this mode produces a SELECT where each column is labeled as in <tablename>_<columnname>, to remove column name collisions for a multiple table select. The fix is that if two labels collide when combined with the table name, i.e. "foo.bar_id" and "foo_bar.id", anonymous aliasing will be applied to one of the dupes. This allows the ORM to handle both columns independently; previously, 0.7 would in some cases silently emit a second SELECT for the column that was "duped", and in 0.8 an ambiguous column error would be emitted. The "keys" applied to the .c. collection of the select() will also be deduped, so that the "column being replaced" warning will no longer emit for any select() that specifies use_labels, though the dupe key will be given an anonymous label which isn't generally user-friendly. [ticket:2702]
* - add an event to testing so that other dialects can intercept ↵Mike Bayer2013-03-241-0/+4
| | | | | | "test_needs_autoincrement" - get the assumption of "1" for "first sequence item" to be dialect configured
* Fixed bug whereby a DBAPI that can return "0"Mike Bayer2013-03-231-1/+1
| | | | | for cursor.lastrowid would not function correctly in conjunction with :attr:`.ResultProxy.inserted_primary_key`.
* - :meth:`.MetaData.create_all` and :meth:`.MetaData.drop_all` willMike Bayer2013-03-021-3/+3
| | | | | | | | | | now accommodate an empty list as an instruction to not create/drop any items, rather than ignoring the collection. [ticket:2664]. This is a behavioral change and extra notes to the changelog and migration document have been added. - create a new test suite for exercising codepaths in engine/ddl.py