summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* small tweaks to make insert() behavior more consistent, mostly tests, ↵Mike Bayer2012-08-231-1/+1
| | | | [ticket:2461]
* - [feature] The before_cursor_execute eventMike Bayer2012-08-232-56/+18
| | | | | | | | | fires off for so-called "_cursor_execute" events, which are usually special-case executions of primary-key bound sequences and default-generation SQL phrases that invoke separately when RETURNING is not used with INSERT. [ticket:2459]
* - [bug] Fixed cextension bug whereby theMike Bayer2012-08-221-1/+1
| | | | | | | | | | | | | | | | | | | "ambiguous column error" would fail to function properly if the given index were a Column object and not a string. Note there are still some column-targeting issues here which are fixed in 0.8. [ticket:2553] - find more cases where column targeting is being inaccurate, add more information to result_map to better differentiate "ambiguous" results from "present" or "not present". In particular, result_map is sensitive to dupes, even though no error is raised; the conflicting columns are added to the "obj" member of the tuple so that the two are both directly accessible in the result proxy - handwringing over the damn "name fallback" thing in results. can't really make it perfect yet - fix up oracle returning clause. not sure why its guarding against labels, remove that for now and see what the bot says.
* - update engine docstrings due to moveMike Bayer2012-08-132-5/+5
| | | | - struggle with Operators class autodoc
* big rework of is_active and SessionTransaction docsMike Bayer2012-08-081-1/+0
|
* - another import fixMike Bayer2012-08-071-0/+1
|
* - add new C extension "utils", so far includes distill_paramsMike Bayer2012-08-071-40/+48
| | | | | - repair test_processors which wasn't hitting the python functions - add another suite to test_processors that does distill_params
* - break out engine/base.py into base, interfaces, result, util.Mike Bayer2012-08-078-2037/+1963
| | | | - remove deprecated 0.7 engine methods
* more import cleanupsMike Bayer2012-08-076-28/+29
|
* -whitespace bonanza, contdMike Bayer2012-07-284-61/+61
|
* - [feature] Connection event listeners canMike Bayer2012-07-182-271/+343
| | | | | | now be associated with individual Connection objects, not just Engine objects. [ticket:2511]
* - document the inspection systemMike Bayer2012-07-181-16/+23
|
* - a big renaming of all the _Underscore classes to haveMike Bayer2012-07-171-21/+21
| | | | | | plain names. The old names are still defined for backwards compatibility. - _BindParamClause renamed to BindParameter
* - [bug] Fixed bug whereby if a database restartMike Bayer2012-06-221-1/+4
| | | | | | | affected multiple connections, each connection would individually invoke a new disposal of the pool, even though only one disposal is needed. [ticket:2522]
* - [bug] Fixed bug wherebyMike Bayer2012-06-221-2/+1
| | | | | | | | | | | | a disconnect detect + dispose that occurs when the QueuePool has threads waiting for connections would leave those threads waiting for the duration of the timeout on the old pool. The fix now notifies those waiters with a special exception case and has them move onto the new pool. This fix may or may not be ported to 0.7. [ticket:2522]
* - [bug] The ResultProxy methods inserted_primary_key,Mike Bayer2012-06-162-16/+83
| | | | | | | | | | | | last_updated_params(), last_inserted_params(), postfetch_cols(), prefetch_cols() all assert that the given statement is a compiled construct, and is an insert() or update() statement as is appropriate, else raise InvalidRequestError. [ticket:2498] - ResultProxy.last_inserted_ids is removed, replaced by inserted_primary_key.
* - rewrite rowcount documentation to be as absolutely clear as possibleMike Bayer2012-06-121-21/+49
|
* sigh. go back to __iter__ because of silly rowproxy as argument requirementMike Bayer2012-06-111-2/+4
|
* comments regarding thisMike Bayer2012-06-111-0/+5
|
* - [bug] Fixed bug affecting Py3K wherebyMike Bayer2012-06-111-2/+2
| | | | | | | | string positional parameters passed to engine/connection execute() would fail to be interpreted correctly, due to __iter__ being present on Py3K string. [ticket:2503]. Also in 0.7.8.
* Add some `Sphinx` paragraph level versions informations markups,Mike Bayer2012-06-082-7/+13
| | | | such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
* - [feature] The "deferred declarativeMike Bayer2012-05-171-0/+3
| | | | | | | | | | | | | | | | reflection" system has been moved into the declarative extension itself, using the new DeferredReflection class. This class is now tested with both single and joined table inheritance use cases. [ticket:2485] - [bug] The autoload_replace flag on Table, when False, will cause any reflected foreign key constraints which refer to already-declared columns to be skipped, assuming that the in-Python declared column will take over the task of specifying in-Python ForeignKey or ForeignKeyConstraint declarations.
* docuemnt mock strategy, [ticket:2439]Mike Bayer2012-05-041-2/+11
|
* - [feature] Added SQLite execution optionMike Bayer2012-05-042-5/+5
| | | | | | | "sqlite_raw_colnames=True", will bypass attempts to remove "." from column names returned by SQLite cursor.description. [ticket:2475]
* - [feature] Inspector.get_primary_keys() isMike Bayer2012-04-242-22/+22
|\ | | | | | | | | | | | | | | deprecated; use Inspector.get_pk_constraint(). Courtesy Diana Clarke. [ticket:2422] - restored default get_primary_keys()/get_pk_constraint() wrapper to help maintain compatibility with third party dialects created against 0.6 or 0.7
| * deprecate inspector.get_primary_keys() in favor of inspector.get_pk_constraint()Diana Clarke2012-04-023-30/+12
| | | | | | | | - see #2422
* | - [feature] The behavior of column targetingMike Bayer2012-04-243-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in result sets is now case sensitive by default. SQLAlchemy for many years would run a case-insensitive conversion on these values, probably to alleviate early case sensitivity issues with dialects like Oracle and Firebird. These issues have been more cleanly solved in more modern versions so the performance hit of calling lower() on identifiers is removed. The case insensitive comparisons can be re-enabled by setting "case_insensitive=False" on create_engine(). [ticket:2423]
* | - [feature] Added a new systemMike Bayer2012-04-241-42/+15
| | | | | | | | | | | | | | for registration of new dialects in-process without using an entrypoint. See the docs for "Registering New Dialects". [ticket:2462]
* | - [feature] The column_reflect event nowMike Bayer2012-04-241-1/+1
| | | | | | | | | | | | | | | | | | accepts the Inspector object as the first argument, preceding "table". Code which uses the 0.7 version of this very new event will need modification to add the "inspector" object as the first argument. [ticket:2418]
* | merge patch for [ticket:2208]. This still needs documentation.Mike Bayer2012-04-231-1/+6
|\ \
| * | begin implementing inspection system for #2208Mike Bayer2012-04-031-1/+6
| |/
* | - [bug] If conn.begin() fails when callingMike Bayer2012-04-121-1/+5
| | | | | | | | | | | | "with engine.begin()", the newly acquired Connection is closed explicitly before propagating the exception onward normally.
* | - [feature] Added new connection eventMike Bayer2012-04-101-0/+9
|/ | | | | | | dbapi_error(). Is called for all DBAPI-level errors passing the original DBAPI exception before SQLAlchemy modifies the state of the cursor.
* typos in lib/sqlalchemy/engineDiana Clarke2012-03-173-13/+13
|
* - [bug] Fixed issue whereby attribute-basedMike Bayer2012-03-141-1/+0
| | | | | | | | column access on a row would raise AttributeError with non-C version, NoSuchColumnError with C version. Now raises AttributeError in both cases. [ticket:2398]
* - [bug] Added execution_options() call toMike Bayer2012-02-131-0/+3
| | | | | | MockConnection (i.e., that used with strategy="mock") which acts as a pass through for arguments.
* - [feature] Added "no_parameters=True" executionMike Bayer2012-02-132-5/+39
| | | | | | | | | | | | | | | | option for connections. If no parameters are present, will pass the statement as cursor.execute(statement), thereby invoking the DBAPIs behavior when no parameter collection is present; for psycopg2 and mysql-python, this means not interpreting % signs in the string. This only occurs with this option, and not just if the param list is blank, as otherwise this would produce inconsistent behavior of SQL expressions that normally escape percent signs (and while compiling, can't know ahead of time if parameters will be present in some cases). [ticket:2407]