summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
...
| * | typoMike Bayer2011-11-221-1/+1
| | |
* | | fixes to actually get tests to passMike Bayer2011-11-222-17/+26
| | |
* | | - commit the unit testsMike Bayer2011-11-221-41/+144
| | | | | | | | | | | | - lots of doc updates to all three of update/insert/delete
* | | 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
|/ /
* | - [bug] further tweak to the fix from [ticket:2261],Mike Bayer2011-11-191-16/+108
| | | | | | | | | | | | | | | | | | | | | | | | so that generative methods work a bit better off of cloned (this is almost a non-use case though). In particular this allows with_only_columns() to behave more consistently. Added additional documentation to with_only_columns() to clarify expected behavior, which changed as a result of [ticket:2261]. [ticket:2319] - document the crap out of with_only_columns, include caveats about the change, etc.
* | - [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]
* | - Cls.column.collate("some collation") nowMike Bayer2011-10-231-6/+6
| | | | | | | | works. [ticket:1776] Also in 0.6.9
* | improved docs on select_from() [ticket:2274]Mike Bayer2011-09-261-4/+13
| |
* | - Fixed bug whereby with_only_columns() method ofMike Bayer2011-09-211-5/+7
| | | | | | | | | | Select would fail if a selectable were passed. [ticket:2270]. Also in 0.6.9.
* | - Adjusted the "importlater" mechanism, which isMike Bayer2011-09-211-0/+1
| | | | | | | | | | | | | | | | | | used internally to resolve import cycles, such that the usage of __import__ is completed when the import of sqlalchemy or sqlalchemy.orm is done, thereby avoiding any usage of __import__ after the application starts new threads, fixes [ticket:2279]. Also in 0.6.9.
* | - added "adapt_on_names" boolean flag to orm.aliased()Mike Bayer2011-09-191-2/+4
| | | | | | | | | | | | | | | | construct. Allows an aliased() construct to link the ORM entity to a selectable that contains aggregates or other derived forms of a particular attribute, provided the name is the same as that of the entity mapped column.
* | - Changed the update() method on association proxyMike Bayer2011-09-141-1/+1
| | | | | | | | | | | | | | | | dictionary to use a duck typing approach, i.e. checks for "keys", to discern between update({}) and update((a, b)). Previously, passing a dictionary that had tuples as keys would be misinterpreted as a sequence. [ticket:2275]
* | - Behavioral improvement: emptyMike Bayer2011-09-092-1/+7
| | | | | | | | | | | | | | 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].
* | - Fixed bug regarding calculation of "from" listMike Bayer2011-09-051-181/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for a select() element. The "from" calc is now delayed, so that if the construct uses a Column object that is not yet attached to a Table, but is later associated with a Table, it generates SQL using the table as a FROM. This change impacted fairly deeply the mechanics of how the FROM list as well as the "correlates" collection is calculated, as some "clause adaption" schemes (these are used very heavily in the ORM) were relying upon the fact that the "froms" collection would typically be cached before the adaption completed. The rework allows it such that the "froms" collection can be cleared and re-generated at any time. [ticket:2261] - RelationshipProperty.Comparator._criterion_exists() adds an "_orm_adapt" annotation to the correlates target, to work with the change in [ticket:2261]. It's not clear if the change to correlation+adaption mechanics will affect end user code yet. - FromClause now uses group_expirable_memoized_property for late-generated values like primary key, _columns, etc. The Select class adds some tokens to this object and has the nice effect that FromClause doesn't need to know about Select's names anymore. An additional change might be to have Select use a different group_expirable_memoized_property so that it's collection of attribute names are specific to Select though this isn't really necessary right now.
* | - Improvement to multi-param statement logging,Mike Bayer2011-08-221-0/+22
| | | | | | | | | | | | | | | | long lists of bound parameter sets will be compressed with an informative indicator of the compression taking place. Exception messages use the same improved formatting. [ticket:2243]
* | document autocommit when using the compiler extension, update the ↵Mike Bayer2011-08-181-1/+14
| | | | | | | | "understanding autocommit" section
* | some core cross linkageMike Bayer2011-08-071-12/+35
| |
* | - rework Annotated to no longer use __cmp__(), supply an __eq__() thatMike Bayer2011-07-241-2/+6
| | | | | | | | | | works with ColumnElement as well as works with non-__eq__() suppliers, works with sets, on Py3K as well.
* | - rewrite cloned_traverse() and replacement_traverse() to use a straightMike Bayer2011-07-243-97/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recursive descent with clone() + _copy_internals(). This is essentially what it was doing anyway with lots of unnecessary steps. Fix Alias() to honor the given clone() function which may have been the reason the traversal hadn't been fixed sooner. Alias._copy_internals() will specifically skip an alias of a Table as a more specific form of what it was doing before. This may need to be further improved such that ClauseAdapter or replacement_traverse() send it some specific hints what not to dig into; **kw has been added to all _copy_internals() to support this. replacement/clone traversal is at least clear now. - apply new no_replacement_traverse annotation to join created by _create_joins(), fixes [ticket:2195] - can replace orm.query "_halt_adapt" with "no_replacement_traverse"
* | - The join condition produced by with_parentMike Bayer2011-07-062-2/+13
| | | | | | | | | | | | | | | | as well as when using a "dynamic" relationship against a parent will generate unique bindparams, rather than incorrectly repeating the same bindparam. [ticket:2207]. Also in 0.6.9.
* | - Fixed subtle bug that caused SQL to blowMike Bayer2011-06-273-3/+31
| | | | | | | | | | | | | | up if: column_property() against subquery + joinedload + LIMIT + order by the column property() occurred. [ticket:2188]. Also in 0.6.9
* | - Fixed a subtle bug involving columnMike Bayer2011-06-271-1/+5
| | | | | | | | | | correspondence in a selectable with the same column repeated. Affects [ticket:2188].
* | - Fixed bug whereby comparison of columnMike Bayer2011-06-121-1/+4
| | | | | | | | | | | | | | | | | | expression to a Query() would not call as_scalar() on the underlying SELECT statement to produce a scalar subquery, in the way that occurs if you called it on Query().subquery(). [ticket:2190] - some cleanup to test.orm.test_query
* | - Added the same "columns-only" check toMike Bayer2011-06-081-2/+9
| | | | | | | | | | | | mapper.polymorphic_on as used in relationship.order_by, foreign_keys, remote_side, etc.
* | - Adjusted the __contains__() method ofMike Bayer2011-06-041-0/+9
| | | | | | | | | | | | | | | | | | a RowProxy result row such that no exception throw is generated internally; NoSuchColumnError() also will generate its message regardless of whether or not the column construct can be coerced to a string. [ticket:2178]. Also in 0.6.8.
* | fix some testsMike Bayer2011-06-021-1/+16
| |
* | - move Operators and ColumnOperators into sqlalchemy.sql.operators - since thisMike Bayer2011-05-282-424/+425
| | | | | | | | | | is strictly a system of routing Python operators into functions. Keep the references available in expression.py for the near future.
* | - Streamlined the process by which a SelectMike Bayer2011-05-281-11/+3
| | | | | | | | | | | | | | | | | | determines what's in it's '.c' collection. Behaves identically, except that a raw ClauseList() passed to select([]) (which is not a documented case anyway) will now be expanded into its individual column elements instead of being ignored.
* | - get all comparison operators to document with sphinx - column based, ↵Mike Bayer2011-05-261-79/+321
| | | | | | | | | | | | relationship based. Should fix misunderstandings like [ticket:2177]
* | - add some docs to hybrid comparators, operators/comparator logic at the baseMike Bayer2011-05-221-1/+62
| |
* | - Fixed bug whereby nesting a label of a select()Mike Bayer2011-05-181-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | with another label in it would produce incorrect exported columns. Among other things this would break an ORM column_property() mapping against another column_property(). [ticket:2167]. Also in 0.6.8 - _Label() is always against a column or selectable. remove uncovered case of label against something else. - start taking notes to clean up some of this labeling stuff, which will be [ticket:2168]
* | - Changed the handling in determination of joinMike Bayer2011-05-071-14/+13
| | | | | | | | | | | | | | | | | | | | | | conditions such that foreign key errors are only considered between the two given tables. That is, t1.join(t2) will report FK errors that involve 't1' or 't2', but anything involving 't3' will be skipped. This affects join(), as well as ORM relationship and inherit condition logic. Will keep the more conservative approach to [ticket:2153] in 0.6.
* | - 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]
* | - move documentation of available execution options to Connection - this is ↵Mike Bayer2011-04-171-46/+24
| | | | | | | | | | | | | | | | | | | | the main place these should be used - Executable disallows "compiled_cache" option for now which was previously being ignored [ticket:2131] - Query now passes execution options to the Connection rather than the statement so that all options are allowed including compiled cache.
* | - Added explicit true()/false() constructs to expressionMike Bayer2011-04-172-4/+58
| | | | | | | | | | | | | | 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]
* | a crapload of doc tweaks including [ticket:1666], thanks Toby !Mike Bayer2011-04-161-42/+108
| |
* | - fixed bug where "from" clause gathering from anMike Bayer2011-04-141-2/+2
| | | | | | | | | | | | over() clause would be an itertools.chain() and not a list, causing "can only concatenate list" TypeError when combined with other clauses.
* | - The limit/offset keywords to select() as wellMike Bayer2011-04-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | as the value passed to select.limit()/offset() will be coerced to integer. [ticket:2116] (also in 0.6.7) - Oracle dialect adds use_binds_for_limits=False create_engine() flag, will render the LIMIT/OFFSET values inline instead of as binds, reported to modify the execution plan used by Oracle. [ticket:2116] (Also in 0.6.7)
* | - 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-022-1/+3
| | | | | | | | | | | | - 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-203-12/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | - some doc reorgMike Bayer2011-03-171-114/+114
| | | | | | | | | | | | | | | | | | | | - change engine.Connection to _connection_cls so sphinx doesn't get upset - globally add "." to all :class:`Foo` - start naming sections that are mostly docstrings "API Documentation - blah blah" - move some ad-hoc docstrings into "API" sections, there is some inconsistency here and it may be that we just have to leave it that way - add "internals" rsts to core, orm, I'm not super thrilled how these look but they are targeted by some of the public api docs, users typically become aware of these anyway
* | corrected a bunch of spelling typosDiana Clarke2011-02-282-4/+4
|/
* Fixed doc problem. Thanks Toby Ho.Michael Trier2011-03-141-1/+1
|
* - 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
* - The concept of associating a ".bind" directly with aMike Bayer2011-02-101-39/+34
| | | | | | | | ClauseElement has been explicitly moved to Executable, i.e. the mixin that describes ClauseElements which represent engine-executable constructs. This change is an improvement to internal organization and is unlikely to affect any real-world usage. [ticket:2048]
* - Added over() function, method to FunctionElementMike Bayer2011-02-103-9/+181
| | | | | | | | 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]