summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - [feature] The "unconsumed column names" warning emittedMike Bayer2012-04-241-1/+1
| | | | | | when keys are present in insert.values() or update.values() that aren't in the target table is now an exception. [ticket:2415]
* - [feature] The behavior of column targetingMike Bayer2012-04-241-4/+14
| | | | | | | | | | | | | | 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]
* - [bug] UPDATE..FROM syntax with SQL ServerMike Bayer2012-04-181-1/+1
| | | | | | | | | | requires that the updated table be present in the FROM clause when an alias of that table is also present in the FROM clause. The updated table is now always present in the FROM, when FROM is present in the first place. Courtesy sayap. [ticket:2468]
* typos in lib/sqlalchemy/sqlDiana Clarke2012-03-171-3/+3
|
* - [feature] Added support for MSSQL INSERT,Mike Bayer2012-03-131-5/+57
| | | | | | UPDATE, and DELETE table hints, using new with_hint() method on UpdateBase. [ticket:2430]
* - [bug] Fixed bug whereby a primaryjoinMike Bayer2012-03-121-1/+2
| | | | | | | | | condition with a "literal" in it would raise an error on compile with certain kinds of deeply nested expressions which also needed to render the same bound parameter name more than once. [ticket:2425]
* - [feature] Added cte() method to Query,Mike Bayer2012-03-031-0/+58
| | | | | | | | | | | | invokes common table expression support from the Core (see below). [ticket:1859] - [feature] Added support for SQL standard common table expressions (CTE), allowing SELECT objects as the CTE source (DML not yet supported). This is invoked via the cte() method on any select() construct. [ticket:1859]
* remove check_columns here so warning not emitted with update fromMike Bayer2012-02-261-1/+1
|
* - [bug] A warning is emitted when a not-presentMike Bayer2012-02-211-2/+12
| | | | | | | column is stated in the values() clause of an insert() or update() construct. Will move to an exception in 0.8. [ticket:2413]
* - [bug] Added support for using the .keyMike Bayer2012-02-051-7/+19
| | | | | | | | | | | | of a Column as a string identifier in a result set row. The .key is currently listed as an "alternate" name for a column, and is superseded by the name of a column which has that key value as its regular name. For the next major release of SQLAlchemy we may reverse this precedence so that .key takes precedence, but this is not decided on yet. [ticket:2392]
* - [bug] A significant change to how labelingMike Bayer2012-02-051-10/+10
| | | | | | | | | | | | | | 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
* fix a few py3k bugsMike Bayer2012-01-281-0/+1
|
* - [feature] Dialect-specific compilers now raiseMike Bayer2012-01-281-13/+30
| | | | | | | | CompileException for all type/statement compilation issues, instead of InvalidRequestError or ArgumentError. The DDL for CREATE TABLE will re-raise CompileExceptions to include table/column information for the problematic column. [ticket:2361]
* - [bug] Fixed issue where the "required" exceptionMike Bayer2012-01-281-11/+22
| | | | | | would not be raised for bindparam() with required=True, if the statement were given no parameters at all. [ticket:2381]
* - [bug] Fixed bug whereby a table-bound ColumnMike Bayer2012-01-221-0/+4
| | | | | | | | | | | object named "<a>_<b>" which matched a column labeled as "<tablename>_<colname>" could match inappropriately when targeting in a result set row. [ticket:2377] - requires that we change the tuple format in RowProxy. Makes an improvement to the cases tested against an unpickled RowProxy as well though doesn't solve the problem there entirely.
* - Fixed regression from 0.6 whereby ifMike Bayer2012-01-101-7/+2
| | | | | | | "load_on_pending" relationship() flag were used where a non-"get()" lazy clause needed to be emitted on a pending object, it would fail to load.
* happy new yearMike Bayer2012-01-041-1/+1
|
* - [bug] the "name" of a column-level CHECK constraint,Mike Bayer2011-12-041-1/+5
| | | | | | if present, is now rendered in the CREATE TABLE statement using "CONSTRAINT <name> CHECK <expression>". [ticket:2305]
* also add support for onupdate as we'd like this to fire off if an UPDATE ↵Mike Bayer2011-11-221-13/+31
| | | | | | actually happens on the table
* fixes to actually get tests to passMike Bayer2011-11-221-17/+12
|
* cleanupMike Bayer2011-11-211-22/+42
|
* passes for all three, includes multi col system with mysqlMike Bayer2011-11-211-6/+32
|
* sort of muscling this out, mysql a PITAMike Bayer2011-11-211-7/+47
|
* - [feature] Added new support for remote "schemas":Mike Bayer2011-10-231-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | - MetaData() accepts "schema" and "quote_schema" arguments, which will be applied to the same-named arguments of a Table or Sequence which leaves these at their default of ``None``. - Sequence accepts "quote_schema" argument - tometadata() for Table will use the "schema" of the incoming MetaData for the new Table if the schema argument is explicitly "None" - Added CreateSchema and DropSchema DDL constructs - these accept just the string name of a schema and a "quote" flag. - When using default "schema" with MetaData, ForeignKey will also assume the "default" schema when locating remote table. This allows the "schema" argument on MetaData to be applied to any set of Table objects that otherwise don't have a "schema". - a "has_schema" method has been implemented on dialect, but only works on Postgresql so far. Courtesy Manlio Perillo, [ticket:1679]
* - Behavioral improvement: emptyMike Bayer2011-09-091-1/+1
| | | | | | | conjunctions such as and_() and or_() will be flattened in the context of an enclosing conjunction, i.e. and_(x, or_()) will produce 'X' and not 'X AND ()'. [ticket:2257].
* - It is an error to call query.get() when theMike Bayer2011-04-221-1/+1
| | | | | | | given entity is not a single, full class entity or mapper (i.e. a column). This is a deprecation warning in 0.6.8. [ticket:2144]
* - Added explicit true()/false() constructs to expressionMike Bayer2011-04-171-1/+7
| | | | | | | lib - coercion rules will intercept "False"/"True" into these constructs. In 0.6, the constructs were typically converted straight to string, which was no longer accepted in 0.7. [ticket:2117]
* - Fixed incorrect usage of "," in over() clauseMike Bayer2011-04-171-1/+1
| | | | | being placed between the "partition" and "order by" clauses. [ticket:2134]
* - REAL has been added to the core types. SupportedMike Bayer2011-04-051-0/+6
| | | | | | | by Postgresql, SQL Server, MySQL, SQLite. Note that the SQL Server and MySQL versions, which add extra arguments, are also still available from those dialects. [ticket:2081]
* - add some function examples, [ticket:2107]Mike Bayer2011-04-021-1/+1
| | | | | | - have "packagenames" be present on FunctionElement by default so that compiler.visit_function() can be called - add a test for that
* - Added new generic function "next_value()", acceptsMike Bayer2011-03-201-7/+19
| | | | | | | | | | | | | | | | | | | | a Sequence object as its argument and renders the appropriate "next value" generation string on the target platform, if supported. Also provides ".next_value()" method on Sequence itself. [ticket:2085] - added tests for all the conditions described in [ticket:2085] - postgresql dialect will exec/compile a Sequence that has "optional=True". the optional flag is now only checked specifically in the context of a Table primary key evaulation. - func.next_value() or other SQL expression can be embedded directly into an insert() construct, and if implicit or explicit "returning" is used in conjunction with a primary key column, the newly generated value will be present in result.inserted_primary_key. [ticket:2084]
* - establish an "insert" option for events to control ordering if needed (not ↵Mike Bayer2011-02-251-1/+1
| | | | | | needed yet tho) - render foreign key constraints in the order in which they were cerated
* - Added over() function, method to FunctionElementMike Bayer2011-02-101-5/+20
| | | | | | | | classes, produces the _Over() construct which in turn generates "window functions", i.e. "<window function> OVER (PARTITION BY <partition by>, ORDER BY <order by>)". [ticket:1844]
* - The compiler extension now supports overriding the defaultMike Bayer2011-02-091-13/+6
| | | | | | | 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]
* - getting slightly more consistent behavior for the edge case of pk columnsMike Bayer2011-01-151-8/+6
| | | | | | 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-021-106/+106
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-2/+2
| | | | | a consistent tag - AUTHORS file
* - 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-211-122/+217
| | | | | - deprecate Compiled.compile() - have __init__ do compilation if statement is present.
* 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-191-0/+2
|/ | | | | 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-131-2/+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
|
* - 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]
* - bindparam() gets a new option "callable", which is a lambda or defMike Bayer2010-11-201-4/+4
| | | | | | | | | | 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 tipMike Bayer2010-11-141-3/+12
|\