summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
...
* - Query.distinct() now accepts column expressionsMike Bayer2011-02-101-41/+100
| | | | | | | | | | | | | | | | | | | as *args, interpreted by the Postgresql dialect as DISTINCT ON (<expr>). [ticket:1069] - select.distinct() now accepts column expressions as *args, interpreted by the Postgresql dialect as DISTINCT ON (<expr>). Note this was already available via passing a list to the `distinct` keyword argument to select(). [ticket:1069] - select.prefix_with() accepts multiple expressions (i.e. *expr), 'prefix' keyword argument to select() accepts a list or tuple. - Passing a string to the `distinct` keyword argument of `select()` for the purpose of emitting special MySQL keywords (DISTINCTROW etc.) is deprecated - use `prefix_with()` for this. - put kw arguments to select() in order - restore docs for _SelectBase, renamed from _SelectBaseMixin
* - figured out the ::autodata directive, can move the docstring forMike Bayer2011-02-091-0/+35
| | | | | | | expression.func into the .py module - added a note about logging only being checked on new connections, as one user had this issue awhile back, and I suspect it for a current ML user issue
* - The compiler extension now supports overriding the defaultMike Bayer2011-02-092-26/+22
| | | | | | | compilation of expression._BindParamClause including that the auto-generated binds within the VALUES/SET clause of an insert()/update() statement will also use the new compilation rules. [ticket:2042]
* yikes, change that name on the Alias class tooMike Bayer2011-01-301-6/+6
|
* - Added a `name` argument to `Query.subquery()`, to allowMike Bayer2011-01-301-33/+79
| | | | | | | | a fixed name to be assigned to the alias object. [ticket:2030] - changed the kw name 'alias' to 'name' on the alias() standalone function. - fixed up some alias/join docstrings
* rename 'frozendict' to 'immutabledict', since 'frozen' implies hashabilityMike Bayer2011-01-201-3/+3
| | | | | like frozenset which isn't really the purpose of 'immutabledict' (could be someday, in which case, we'd change the name back :) )
* - execution_options() on Connection acceptsMike Bayer2011-01-161-11/+25
| | | | | | | | | | "isolation_level" argument, sets transaction isolation level for that connection only until returned to the connection pool, for thsoe backends which support it (SQLite, Postgresql) [ticket:2001] - disallow the option on Engine (use isolation_level to create_engine()), Executable (we don't want to check/set per statement) - docs
* - getting slightly more consistent behavior for the edge case of pk columnsMike Bayer2011-01-152-15/+14
| | | | | | 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-14/+0
| | | | | | | | 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-2/+16
| | | | | | | | | | | | | | | | | | | 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-026-415/+415
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-027-4/+34
| | | | | a consistent tag - AUTHORS file
* - remove OrderedSet usage from a critical areaMike Bayer2010-12-222-14/+8
|
* - another heap of inlinings and now I really have to be done with thisMike Bayer2010-12-211-56/+71
|
* - apply pep8 to compiler.pyMike Bayer2010-12-212-126/+221
| | | | | - deprecate Compiled.compile() - have __init__ do compilation if statement is present.
* callcount reductionMike Bayer2010-12-201-14/+20
|
* more inlinesMike Bayer2010-12-191-18/+17
|
* merge tipMichael Trier2010-12-191-12/+4
|\
| * - duh, compiled is per dialectMike Bayer2010-12-191-12/+4
| |
* | Added NULLS FIRST and NULLS LAST support.Michael Trier2010-12-193-3/+47
|/ | | | | It's implemented as an extension to the asc() and desc() operators, called nullsfirst() and nullslast(). [ticket:723]
* - why type.dialect_impl(dialect).bind_processor(dialect), caching just the impl?Mike Bayer2010-12-132-5/+2
| | | | | | just call type._cached_bind_processor(dialect), cache the impl *and* the processor function. same for result sets. - use plain dict + update for defaultexecutioncontext.execution_options
* - another easy win, cache the calc of bind processors in the compiled objectMike Bayer2010-12-121-0/+19
|
* - callcountsMike Bayer2010-12-101-17/+40
|
* various formatting and hyperlinking fixesMike Bayer2010-12-091-0/+4
|
* - merge default tipMike Bayer2010-12-052-9/+44
|\
| * - Fixed operator precedence rules for multipleMike Bayer2010-11-252-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | chains of a single non-associative operator. I.e. "x - (y - z)" will compile as "x - (y - z)" and not "x - y - z". Also works with labels, i.e. "x - (y - z).label('foo')" [ticket:1984] - Single element tuple expressions inside an IN clause parenthesize correctly, also from [ticket:1984], added tests for PG - re-fix again importlater, [ticket:1983]
* | - move topological, queue into utilMike Bayer2010-12-051-1/+2
| | | | | | | | | | - move function_named into test.lib.util - use @decorator for all decorators in test/
* | - replace util.py with util/ package, [ticket:1986]Mike Bayer2010-11-281-1/+1
| |
* | - the "type_map" dictionary in sqlalchemy.types is now private,Mike Bayer2010-11-281-1/+1
| | | | | | | | i.e. is named "_type_map". [ticket:1870]
* | - post_process_text() is called for DDL() constructs, in particular allowingMike Bayer2010-11-281-1/+1
| | | | | | | | | | '%' with only one level of escaping. Note this is backwards-incompatible with previously triple-escaped sections. [ticket:1897]
* | - _literal_as_text raises if the incoming arg is not a Visitable or basestring.Mike Bayer2010-11-281-1/+3
| | | | | | | | [ticket:1847]
* | - bindparam() gets a new option "callable", which is a lambda or defMike Bayer2010-11-202-22/+52
| | | | | | | | | | | | | | | | | | | | evaluated at execution time to determine the value. This replaces the implicit recognition of callables sent as the primary value of bindparam(), which was an undocumented behavior used by the ORM. The argument is separated now so that values can be passed to bindparams that are also callables without ambiguity, such as user defined objects that include a __call__() method. [ticket:1950]
* | - merge FromObj cleanup, immutable .c attribute patch, [ticket:1917]Mike Bayer2010-11-202-46/+79
|\ \
| * | - adapt initial patch from [ticket:1917] to current tipMike Bayer2010-11-162-46/+79
| |/ | | | | | | - raise TypeError for immutability
* | merge tipMike Bayer2010-11-144-46/+107
|\ \ | |/
| * - move inline "import" statements to use new "util.importlater()" construct. ↵Mike Bayer2010-11-131-30/+11
| | | | | | | | | | | | | | | | | | cuts down on clutter, timeit says there's a teeny performance gain, at least where the access is compared against attr.subattr. these aren't super-critical calls anyway - slight inlining in _class_to_mapper
| * - The REFERENCES clause in a CREATE TABLE that includesMike Bayer2010-11-121-1/+6
| | | | | | | | | | a remote schema name now renders the remote name without the schema clause, as required by SQLite. [ticket:1851]
| * - Added type_coerce(expr, type_) expression element.Mike Bayer2010-10-233-4/+57
| | | | | | | | | | | | Treats the given expression as the given type when evaluating expressions and processing result rows, but does not affect the generation of SQL, other than an anonymous label.
| * - fix a typo that was apparently not really impacting anythingMike Bayer2010-09-251-1/+1
| |
| * doc editsMike Bayer2010-09-221-10/+13
| |
| * - Patched a case where query.join() would adapt theMike Bayer2010-09-211-0/+19
| | | | | | | | | | right side to the right side of the left's join inappropriately [ticket:1925]
* | merge tipMike Bayer2010-09-193-18/+86
|\ \ | |/
| * - as_scalar(), label() can be called on a selectableMike Bayer2010-09-181-3/+10
| | | | | | | | | | which contains a Column that is not yet named. [ticket:1862]
| * - An informative error message is raised if a ColumnMike Bayer2010-09-182-9/+15
| | | | | | | | | | | | | | | | | | which has not yet been assigned a name, i.e. as in declarative, is used in a context where it is exported to the columns collection of an enclosing select() construct, or if any construct involving that column is compiled before its name is assigned. [ticket:1862]
| * - lazy loads for relationship attributes now useMike Bayer2010-09-121-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current state, not the "committed" state, of foreign and primary key attributes when issuing SQL, if a flush is not in process. Previously, only the database-committed state would be used. In particular, this would cause a many-to-one get()-on-lazyload operation to fail, as autoflush is not triggered on these loads when the attributes are determined and the "committed" state may not be available. [ticket:1910] - A new flag on relationship(), load_on_pending, allows the lazy loader to fire off on pending objects without a flush taking place, as well as a transient object that's been manually "attached" to the session. Note that this flag blocks attribute events from taking place when an object is loaded, so backrefs aren't available until after a flush. The flag is only intended for very specific use cases.
| * - pending deprecation in 0.7 for the execute/scalar on clauseelementMike Bayer2010-09-071-6/+10
| |
| * - rewrote the "connections" sectionMike Bayer2010-09-051-4/+30
| | | | | | | | | | | | | | | | | | - improved pool docs - typos etc. - ClauseElement.execute() and scalar() make no sense - these are depreacted. The official home is Executable. - alias() is not executable, allowing it is sloppy so this goes under the deprecated umbrella
* | - move LIMIT/OFFSET rendering to be as bind parameters, for all backendsMike Bayer2010-08-291-3/+3
|/ | | | | | | | | | which support it. This includes SQLite, MySQL, Postgresql, Firebird, Oracle (already used binds with ROW NUMBER OVER), MSSQL (when ROW NUMBER is used, not TOP). Not included are Informix, Sybase, MaxDB, Access [ticket:805] - LIMIT/OFFSET parameters need to stay as literals within SQL constructs. This because they may not be renderable as binds on some backends.
* docstring for query.correlate, [ticket:1889]Mike Bayer2010-08-291-3/+3
|
* - Similarly, for relationship(), foreign_keys,Mike Bayer2010-08-211-3/+3
| | | | | | | remote_side, order_by - all column-based expressions are enforced - lists of strings are explicitly disallowed since this is a very common error