summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
* - 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]
* - 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
* 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
* - 79 chars for expressionMike Bayer2010-08-141-428/+559
| | | | - fix typo in test
* get slightly better about deprecations in docstrings, tho this is kind of an ↵Mike Bayer2010-08-091-2/+3
| | | | uphill climb
* - the _Label construct, i.e. the one that is producedMike Bayer2010-08-071-11/+9
| | | | | | | | | | | whenever you say somecol.label(), now counts itself in its "proxy_set" unioned with that of it's contained column's proxy set, instead of directly returning that of the contained column. This allows column correspondence operations which depend on the identity of the _Labels themselves to return the correct result - fixes ORM bug [ticket:1852].
* - the text() construct, if placed in a columnMike Bayer2010-08-031-3/+3
| | | | | | | | oriented situation, will at least return NULLTYPE for its type instead of None, allowing it to be used a little more freely for ad-hoc column expressions than before. literal_column() is still the better choice, however.
* - Specifying a non-column based argumentMike Bayer2010-08-021-0/+8
| | | | | | | | for column_mapped_collection, including string, text() etc., will raise an error message that specifically asks for a column element, no longer misleads with incorrect information about text() or literal(). [ticket:1863]
* - if @classproperty is used with a regular class-boundMike Bayer2010-08-021-1/+1
| | | | | | | | | | | | | | mapper property attribute, it will be called to get the actual attribute value during initialization. Currently, there's no advantage to using @classproperty on a column or relationship attribute of a declarative class that isn't a mixin - evaluation is at the same time as if @classproperty weren't used. But here we at least allow it to function as expected. - docs for column_property() with declarative - mixin docs in declarative made more clear - mixins are optional - each subsection starts with, "in *declarative mixins*", to reduce confusion
* - The generated index name also is based onMike Bayer2010-08-021-2/+4
| | | | | | | | a "max index name length" attribute which is separate from the "max identifier length" - this to appease MySQL who has a max length of 64 for index names, separate from their overall max length of 255. [ticket:1412]
* - Changed the scheme used to generate truncatedMike Bayer2010-07-211-15/+15
| | | | | | | | | | | | "auto" index names when using the "index=True" flag on Column. The truncation only takes place with the auto-generated name, not one that is user-defined (an error would be raised instead), and the truncation scheme itself is now based on a fragment of an md5 hash of the identifier name, so that multiple indexes on columns with similar names still have unique names. [ticket:1855]
* document the crap out of text(), Session.execute()Mike Bayer2010-07-201-18/+75
|
* - Fixed bug that would prevent overridden clauseMike Bayer2010-06-261-3/+5
| | | | | compilation from working for "annotated" expression elements, which are often generated by the ORM.
* - The argument to "ESCAPE" of a LIKE operator or similarMike Bayer2010-06-241-4/+12
| | | | | | | | | | | | | | | | is passed through render_literal_value(), which may implement escaping of backslashes. [ticket:1400] - Postgresql render_literal_value() is overridden which escapes backslashes, currently applies to the ESCAPE clause of LIKE and similar expressions. Ultimately this will have to detect the value of "standard_conforming_strings" for full behavior. [ticket:1400] - MySQL render_literal_value() is overridden which escapes backslashes, currently applies to the ESCAPE clause of LIKE and similar expressions. This behavior is derived from detecting the value of NO_BACKSLASH_ESCAPES. [ticket:1400]
* - Modified the internals of "column annotation" such thatMike Bayer2010-06-141-1/+1
| | | | | | | a custom Column subclass can safely override _constructor to return Column, for the purposes of making "configurational" column classes that aren't involved in proxying, etc.
* - Fixed concatenation of constraints when "PRIMARY KEY"Mike Bayer2010-05-271-4/+4
| | | | | | | constraint gets moved to column level due to SQLite AUTOINCREMENT keyword being rendered. [ticket:1812] - remove some extra space in between constraint DDL - added alias() to binary comparison test, fixing pg + mysql failures
* - Added table.add_is_dependent_on(othertable), allows manualMike Bayer2010-05-131-0/+5
| | | | | | placement of dependency rules between two Table objects for use within create_all(), drop_all(), sorted_tables. [ticket:1801]
* - func.XXX() doesn't inadvertently resolve to non-FunctionMike Bayer2010-05-131-1/+3
| | | | classes (e.g. fixes func.text()). [ticket:1798]
* - the _make_proxy() method of ColumnClause and Column now useMike Bayer2010-05-102-1/+17
| | | | | | | self.__class__ to determine the class of object to be returned instead of hardcoding to ColumnClause/Column, making it slightly easier to produce specific subclasses of these which work in alias/subquery situations.
* - expr.in_() now accepts a text() construct as the argument.Mike Bayer2010-05-081-2/+9
| | | | | | Grouping parenthesis are added automatically, i.e. usage is like `col.in_(text("select id from table"))`. [ticket:1793]
* remove a few superfluous importsMike Bayer2010-04-292-11/+11
|
* - Fixed errant space character when generating ADD CONSTRAINTMike Bayer2010-04-261-1/+1
| | | | for a named UNIQUE constraint.
* - Table.create() and Table.drop() no longer apply metadata-Mike Bayer2010-04-161-2/+2
| | | | level create/drop events. [ticket:1771]
* - beef up the --reversetop test option to embed RandomSet throughout the ORMMike Bayer2010-04-151-0/+3
| | | | | | | - with m2m we have to go back to the previous approach of having both sides of the DP fire off, tracking each pair of objects. history may not be consistently present in one side or the other - this revealed a whole lot of issues with self-referential m2m, which are fixed
* merge tipMike Bayer2010-04-131-6/+12
|\
| * much more descriptive message for bind param name conflict, [ticket:1766]Mike Bayer2010-04-121-6/+12
| |
* | merge trunkMike Bayer2010-04-111-6/+1
|\ \ | |/
| * - somejoin.select(fold_equivalents=True) is no longerMike Bayer2010-04-111-6/+1
| | | | | | | | | | deprecated, and will eventually be rolled into a more comprehensive version of the feature for [ticket:1729].
| * - make it exceedlingly obvious that all topological/unitofwork code isMike Bayer2010-04-071-1/+1
| | | | | | | | | | | | | | being rewritten, and nothing here should be consulted for any future activity. - underscore current topological methods as their API behavior is changing, possibly in 0.6.1 if [ticket:1742] remains on track
* | merge defaultMike Bayer2010-04-071-0/+17
|\ \ | |/
| * - Added new 'compiled_cache' execution option. A dictionaryMike Bayer2010-04-071-0/+17
| | | | | | | | | | | | | | | | | | | | where Compiled objects will be cached when the Connection compiles a clause expression into a dialect- and parameter- specific Compiled object. It is the user's responsibility to manage the size of this dictionary, which will have keys corresponding to the dialect, clause element, the column names within the VALUES or SET clause of an INSERT or UPDATE, as well as the "batch" mode for an INSERT or UPDATE statement.
* | breakthrough, wowMike Bayer2010-04-051-1/+1
| |
* | merge default branchMike Bayer2010-04-041-0/+10
|\ \ | |/
| * - id(obj) is no longer used internally within topological.py,Mike Bayer2010-04-011-1/+2
| | | | | | | | | | as the sorting functions now require hashable objects only. [ticket:1756]
| * - Restored some bind-labeling logic from 0.5 which ensuresMike Bayer2010-03-311-0/+10
| | | | | | | | | | | | | | | | that tables with column names that overlap another column of the form "<tablename>_<columnname>" won't produce errors if column._label is used as a bind name during an UPDATE. Test coverage which wasn't present in 0.5 has been added. [ticket:1755]
* | deletes, rudimentary many-to-onesMike Bayer2010-03-311-2/+0
| |
* | really got topological going. now that we aren't putting fricking mapped ↵Mike Bayer2010-03-311-2/+5
|/ | | | | | objects into it all that id() stuff can go
* - the compiler extension now allows @compiles decoratorsMike Bayer2010-03-301-10/+11
| | | | | | on base classes that extend to child classes, @compiles decorators on child classes that aren't broken by a @compiles decorator on the base class.
* - Added with_hint() method to Query() construct. This callsMike Bayer2010-03-272-13/+84
| | | | | | | | | | directly down to select().with_hint() and also accepts entities as well as tables and aliases. See with_hint() in the SQL section below. [ticket:921] - Added with_hint() method to select() construct. Specify a table/alias, hint text, and optional dialect name, and "hints" will be rendered in the appropriate place in the statement. Works for Oracle, Sybase, MySQL. [ticket:921]
* - Fixed bug introduced in 0.6beta2 where column labels wouldMike Bayer2010-03-231-4/+7
| | | | | render inside of column expressions already assigned a label. [ticket:1747]
* - Fixed bug in Query whereby the usage of aliased() constructsMike Bayer2010-03-231-4/+6
| | | | | | would fail if the underlying table (but not the actual alias) were referenced inside the subquery generated by q.from_self() or q.select_from().
* - join() will now simulate a NATURAL JOIN by default. Meaning,Mike Bayer2010-03-192-27/+59
| | | | | | | | if the left side is a join, it will attempt to join the right side to the rightmost side of the left first, and not raise any exceptions about ambiguous join conditions if successful even if there are further join targets across the rest of the left. [ticket:1714]