summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine
Commit message (Collapse)AuthorAgeFilesLines
* Fix cross referencesVraj Mohan2013-11-141-1/+1
|
* Ensure API doc for make_url and resolve referencesVraj Mohan2013-11-141-2/+2
|
* - 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]
* Merge pull request #25 from gthb/ticket_2821mike bayer2013-09-292-3/+10
| | | | | | Hide password in URL and Engine __repr__ Conflicts: lib/sqlalchemy/engine/url.py
* 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] Conflicts: doc/build/changelog/changelog_09.rst
* 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. [ticket:2776]
* 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
* cleanupMike Bayer2013-03-021-8/+8
|
* The cx_oracle dialect will no longer run the bind parameter namesMike Bayer2013-02-081-1/+3
| | | | | | | through ``encode()``, as this is not valid on Python 3, and prevented statements from functioning correctly on Python 3. We now encode only if ``supports_unicode_binds`` is False, which is not the case for cx_oracle when at least version 5 of cx_oracle is used.
* more egregious long linesMike Bayer2013-02-021-1/+2
|
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* happy new year (see #2645)Diana Clarke2013-01-0110-10/+10
|
* internally at least refer to multirow as "multivalues", to distinguish betweenMike Bayer2012-12-081-1/+1
| | | | | an INSERT that's used in executemany() as opposed to one which has a VALUES clause with multiple entries.
* merge latest defaultMike Bayer2012-12-083-20/+20
|\
| * fixing broken links (see #2625)Diana Clarke2012-12-062-12/+12
| |
| * fixing broken links (see #2625)Diana Clarke2012-12-052-9/+9
| |
* | compiler: add support for multirow insertsIdan Kamara2012-12-061-0/+1
|/ | | | | | | | | | | | | | | | | | | | | Some databases support this syntax for inserts: INSERT INTO table (id, name) VALUES ('v1', 'v2'), ('v3', 'v4'); which greatly increases INSERT speed. It is now possible to pass a list of lists/tuples/dictionaries as the values param to the Insert construct. We convert it to a flat dictionary so we can continue using bind params. The above query will be converted to: INSERT INTO table (id, name) VALUES (:id, :name), (:id0, :name0); Currently only supported on postgresql, mysql and sqlite.
* - recognize that do_rollback() and do_commit() work with a DBAPI connection,Mike Bayer2012-11-223-38/+116
| | | | | | | | | | | | | | | | | | whereas the other do_rollback_twophase(), savepoint etc. work with :class:`.Connection`. the context on these are different as twophase/savepoint are available at the :class:`.Connection` level, whereas commit/rollback are needed at a lower level as well. Rename the argument to "dbapi_connection" when the conneciton is in fact the DBAPI interface. - start thinking about being able to track "autocommit" vs. "commit", but not sure we have a need for this yet. - have Pool call out to a Dialect for all rollback/commit/close operations now. Pool no longer calls DBAPI methods directly. May use this for a workaround for [ticket:2611] - add a new Pool event reset() to allow the pool's reset of the connection to be intercepted. - remove methods in Informix dialect which appear to be hardcoding some isolation settings on new Transaction only; the isolation API should be implemented for Informix. also removed "flag" for transaction commit/rollback being not available; this should be based on server/DBAPI version and we will need someone with test access in order to help determine how this should work
* - an enormous merge just because I committed a one line log entry. the joy ↵Mike Bayer2012-11-2011-127/+169
|\ | | | | | | of DVCS
| * just a pep8 pass of lib/sqlalchemy/engine/Diana Clarke2012-11-1911-127/+169
| |
* | should be logging thisMike Bayer2012-11-201-0/+2
|/
* - merge ben's patch with updatesMike Bayer2012-11-171-1/+1
|\
| * Updated sybase testing requirementsBenjamin Trofatter2012-10-311-1/+1
| |
* | The :meth:`.Connection.connect` and :meth:`.Connection.contextual_connect`Mike Bayer2012-11-141-43/+38
| | | | | | | | | | | | | | methods now return a "branched" version so that the :meth:`.Connection.close` method can be called on the returned connection without affecting the original. Allows symmetry when using :class:`.Engine` and :class:`.Connection` objects as context managers.
* | improve some autodoc linksMike Bayer2012-10-312-7/+7
|/
* - more docsMike Bayer2012-10-262-2/+2
| | | | - it appears we can get rid of all those "XYZ_toplevel" names and use :doc:.
* versionaddedMike Bayer2012-10-251-2/+4
|
* The long-deprecated and non-functional ``assert_unicode`` flag onMike Bayer2012-10-252-17/+1
| | | | :func:`.create_engine` as well as :class:`.String` is removed.
* version noteMike Bayer2012-10-241-0/+3
|
* Fixed bug where keyword arguments passed toMike Bayer2012-10-241-2/+6
| | | | | | | | :meth:`.Compiler.process` wouldn't get propagated to the column expressions present in the columns clause of a SELECT statement. In particular this would come up when used by custom compilation schemes that relied upon special flags. [ticket:2593]
* aaaarrrggMike Bayer2012-10-231-1/+1
|
* tweaksMike Bayer2012-10-231-1/+1
|
* Added a new method :meth:`.Engine.execution_options`Mike Bayer2012-10-231-16/+114
| | | | | | | | | | | to :class:`.Engine`. This method works similarly to :class:`.Connection.execution_options` in that it creates a copy of the parent object which will refer to the new set of options. The method can be used to build sharding schemes where each engine shares the same underlying pool of connections. The method has been tested against the horizontal shard recipe in the ORM as well.
* - [feature] The Query can now load entity/scalar-mixedMike Bayer2012-10-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | "tuple" rows that contain types which aren't hashable, by setting the flag "hashable=False" on the corresponding TypeEngine object in use. Custom types that return unhashable types (typically lists) can set this flag to False. [ticket:2592] - [bug] Applying a column expression to a select statement using a label with or without other modifying constructs will no longer "target" that expression to the underlying Column; this affects ORM operations that rely upon Column targeting in order to retrieve results. That is, a query like query(User.id, User.id.label('foo')) will now track the value of each "User.id" expression separately instead of munging them together. It is not expected that any users will be impacted by this; however, a usage that uses select() in conjunction with query.from_statement() and attempts to load fully composed ORM entities may not function as expected if the select() named Column objects with arbitrary .label() names, as these will no longer target to the Column objects mapped by that entity. [ticket:2591]
* - [feature] Various API tweaks to the "dialect"Mike Bayer2012-10-082-1/+11
| | | | | | | API to better support highly specialized systems such as the Akiban database, including more hooks to allow an execution context to access type processors.
* - add back __engine_options__Mike Bayer2012-10-041-3/+3
| | | | | - break test_insert tests into explicitly get_lastrowid() vs. implicit_returning tests, fix up requirements to split them out
* - don't call get_lastrowid() on explicit returningMike Bayer2012-10-041-0/+1
| | | | | | - don't hardwire "subqueries" requirement in the base, mysql < 4.1 isn't working anyway - don't need explicit FB/PG exclusions in test_returning - hit db.connect() for the returning requirement
* - fix the fixture here that wasn't creating consistentlyMike Bayer2012-10-011-9/+24
| | | | | | | - rewrite --dropfirst to be more industrial strength, includes views - fix order_by="foreign_key" to maintain the same ordering as metadata.sorted_tables. Not ideal that this was the other way throughout 0.7 but this is still a little-used method, in contrast to metadata.sorted_tables.
* mssql: - [bug] Fixed bug where reflection of primary key constraintMike Bayer2012-09-302-3/+4
| | | | | | | would double up columns if the same constraint/table existed in multiple schemas. - force returns_rows to False for inserts where we know rows shouldnt be returned; allows post_exec() to use the cursor without issue
* devMike Bayer2012-09-291-2/+2
|
* - [bug] Adjusted column default reflection code toMike Bayer2012-09-231-1/+1
| | | | | | | | convert non-string values to string, to accommodate old SQLite versions that don't deliver default info as a string. [ticket:2265] - factor sqlite column reflection to be like we did for postgresql, in a separate method.
* - fixes for mxODBC, some pyodbcMike Bayer2012-09-021-1/+3
| | | | | | - enhancements to test suite including ability to set up a testing engine for a whole test class, fixes to how noseplugin sets up/tears down per-class context
* - get all tests within -w engine + pyodbc:mssql on windows to passMike Bayer2012-09-011-1/+3
|
* - [feature] Added support for .info dictionary argument toMike Bayer2012-08-241-1/+9
| | | | | | column_property(), relationship(), composite(). All MapperProperty classes have an auto-creating .info dict available overall.