summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/default.py
Commit message (Collapse)AuthorAgeFilesLines
* 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-031-30/+25
|\ \ | |/
| * a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-261-1/+1
| | | | | | | | as possible
| * - OK we have -w sql passing for: sqlite, postgresql, oursql 2.7 + 3.3, ↵Mike Bayer2013-05-041-1/+1
| | | | | | | | mysqldb 2.7
| * plugging awayMike Bayer2013-04-271-30/+23
| |
| * - the raw 2to3 runMike Bayer2013-04-271-29/+31
| | | | | | | | - 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-181-2/+0
| | | | | | | | | 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]
* - 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`.
* 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.
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* 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.
* 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-221-16/+7
| | | | | | | | | | | | | | | | | | 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
* just a pep8 pass of lib/sqlalchemy/engine/Diana Clarke2012-11-191-2/+1
|
* improve some autodoc linksMike Bayer2012-10-311-2/+2
|
* The long-deprecated and non-functional ``assert_unicode`` flag onMike Bayer2012-10-251-11/+1
| | | | :func:`.create_engine` as well as :class:`.String` is removed.
* - [feature] Various API tweaks to the "dialect"Mike Bayer2012-10-081-0/+10
| | | | | | | 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
* 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-231-1/+1
| | | | | | | | | 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]
* - break out engine/base.py into base, interfaces, result, util.Mike Bayer2012-08-071-4/+4
| | | | - remove deprecated 0.7 engine methods
* more import cleanupsMike Bayer2012-08-071-4/+5
|
* - [feature] Connection event listeners canMike Bayer2012-07-181-18/+35
| | | | | | now be associated with individual Connection objects, not just Engine objects. [ticket:2511]
* - 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] The ResultProxy methods inserted_primary_key,Mike Bayer2012-06-161-0/+2
| | | | | | | | | | | | 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.
* - [feature] Added SQLite execution optionMike Bayer2012-05-041-4/+4
| | | | | | | "sqlite_raw_colnames=True", will bypass attempts to remove "." from column names returned by SQLite cursor.description. [ticket:2475]
* - [feature] The behavior of column targetingMike Bayer2012-04-241-0/+3
| | | | | | | | | | | | | | 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]
* typos in lib/sqlalchemy/engineDiana Clarke2012-03-171-2/+2
|
* - [feature] Added "no_parameters=True" executionMike Bayer2012-02-131-0/+7
| | | | | | | | | | | | | | | | 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]
* - [bug] A significant change to how labelingMike Bayer2012-02-051-0/+5
| | | | | | | | | | | | | | is applied to columns in SELECT statements allows "truncated" labels, that is label names that are generated in Python which exceed the maximum identifier length (note this is configurable via label_length on create_engine()), to be properly referenced when rendered inside of a subquery, as well as to be present in a result set row using their original in-Python names. [ticket:2396] - apply pep8 to test_labels
* - [feature] New reflection feature "autoload_replace";Mike Bayer2012-01-281-2/+2
| | | | | | | | | | | | | | | when set to False on Table, the Table can be autoloaded without existing columns being replaced. Allows more flexible chains of Table construction/reflection to be constructed, including that it helps with combining Declarative with table reflection. See the new example on the wiki. [ticket:2356] - [bug] Improved the API for add_column() such that if the same column is added to its own table, an error is not raised and the constraints don't get doubled up. Also helps with some reflection/declarative patterns. [ticket:2356]
* happy new yearMike Bayer2012-01-041-1/+1
|
* - Added an exception catch + warning for theMike Bayer2011-10-151-13/+18
| | | | | | | "return unicode detection" step within connect, allows databases that crash on NVARCHAR to continue initializing, assuming no NVARCHAR type implemented. [ticket:2299]
* - assume in py3k that description encoding is None unless the dialect reallyMike Bayer2011-04-081-7/+7
| | | | | overrides it - psycopg2 + 3k supports unicode statements...
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-1/+1
| | | | | | | | call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015]
* - add connection and cursor to is_disconnect(). We aren't using it yet,Mike Bayer2011-02-091-1/+1
| | | | | | | | | | | | | | | but we'd like to. Most DBAPIs don't give us anything we can do with it. Some research was done on psycopg2 and it still seems like they give us no adequate method (tried connection.closed, cursor.closed, connection.status). mxodbc claims their .closed attribute will work (but I am skeptical). - remove beahvior in pool that auto-invalidated a connection when the cursor failed to create. That's not the pool's job. we need the conn for the error logic. Can't get any tests to fail, curious why that behavior was there, guess we'll find out (or not). - add support for psycopg2 version detection. even though we have no use for it yet... - adjust one of the reconnect tests to work with oracle's horrendously slow connect speed
* - new dialect for Drizzle [ticket:2003]Mike Bayer2011-01-261-0/+1
| | | | - move mysqldb to a connector, can be shared among mysql/drizzle
* - default_isolation_level is equal to isolation_level since it'sMike Bayer2011-01-161-4/+4
| | | | detected after the initial setting
* - add dialect.reset_isolation_level(), revertsMike Bayer2011-01-161-0/+11
| | | | - base not implemented methods on Dialect
* - getting slightly more consistent behavior for the edge case of pk columnsMike Bayer2011-01-151-2/+3
| | | | | | with server default - autoincrement is now false with any server_default, so these all return None, applies consistency to [ticket:2020], [ticket:2021]. if prefetch is desired a "default" should be used instead of server_default.
* - the _pk_processors/_prefetch_processors approach relied upon calling RPs ↵Mike Bayer2011-01-151-26/+33
| | | | | | | | without a cursor.description result, also generates procs that are not used in most cases. simplify the approach by passing type to _exec_default() to be used if needed by _execute_scalar(), looking for the proc on just t._autoincrement_column in post_insert().
* - A TypeDecorator of Integer can be used with a primary keyMike Bayer2011-01-111-18/+30
| | | | | | | | | | | | | | | | | | | column, and the "autoincrement" feature of various dialects as well as the "sqlite_autoincrement" flag will honor the underlying database type as being Integer-based. [ticket:2005] - Result-row processors are applied to pre-executed SQL defaults, as well as cursor.lastrowid, when determining the contents of result.inserted_primary_key. [ticket:2006] - Bind parameters present in the "columns clause" of a select are now auto-labeled like other "anonymous" clauses, which among other things allows their "type" to be meaningful when the row is fetched, as in result row processors. - TypeDecorator is present in the "sqlalchemy" import space.
* - whitespace removal bonanzaMike Bayer2011-01-021-75/+75
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-1/+1
| | | | | a consistent tag - AUTHORS file
* py3k fixesMike Bayer2010-12-271-1/+2
|