summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
...
* - 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]
* - added pyodbc for sybase driver.Mike Bayer2010-03-171-35/+106
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - generalized the "freetds" / "unicode statements" behavior of MS-SQL/pyodbc into the base Pyodbc connector, as this seems to apply to Sybase as well. - generalized the python-sybase "use autocommit for DDL" into the pyodbc connector. With pyodbc, the "autocommit" flag on connection is used, as Pyodbc seems to have more database conversation than python-sybase that can't otherwise be suppressed. - Some platforms will now interpret certain literal values as non-bind parameters, rendered literally into the SQL statement. This to support strict SQL-92 rules that are enforced by some platforms including MS-SQL and Sybase. In this model, bind parameters aren't allowed in the columns clause of a SELECT, nor are certain ambiguous expressions like "?=?". When this mode is enabled, the base compiler will render the binds as inline literals, but only across strings and numeric values. Other types such as dates will raise an error, unless the dialect subclass defines a literal rendering function for those. The bind parameter must have an embedded literal value already or an error is raised (i.e. won't work with straight bindparam('x')). Dialects can also expand upon the areas where binds are not accepted, such as within argument lists of functions (which don't work on MS-SQL when native SQL binding is used).
| * - mxodbc can use default execute() callMike Bayer2010-03-161-29/+77
|/ | | | | | | | | | | | | - modified SQLCompiler to support rendering of bind parameters as literal inline strings for specific sections, if specified by the compiler subclass, using either literal_binds=True passed to process() or any visit method, or by setting to False the "binds_in_columns_clause" flag for SQL-92 compatible columns clauses.. The compiler subclass is responsible for implementing the literal quoting function which should make use of the DBAPI's native capabilities. - SQLCompiler now passes **kw to most process() methods (should be all, ideally) so that literal_binds is propagated. - added some rudimentary tests for mxodbc.
* - The except_() method now renders as MINUS on Oracle,Mike Bayer2010-03-162-9/+27
| | | | | which is more or less equivalent on that platform. [ticket:1712]
* whitespace fixes to improve readability (shortened excessively long lines, ↵Brad Allen2010-03-151-28/+42
| | | | and one 5-space indentation block corrected to 4 spaces).
* - fixed internal error which would occur if calling has()Mike Bayer2010-03-111-1/+3
| | | | | or similar complex expression on a single-table inheritance relation(). [ticket:1731]
* fixed up docs for execution_options() across all three locations.Mike Bayer2010-03-091-1/+13
|
* base tests passMike Bayer2010-03-091-1/+1
|
* still thinking about stuff hereMike Bayer2010-03-081-3/+11
|
* working on getting operators/left hand type awareness into the "bind" ↵Mike Bayer2010-03-081-26/+29
| | | | coercion. this system has to be figured out somehow
* - adjusted the literal coercion rules to take the left side's type into ↵Mike Bayer2010-03-011-0/+2
| | | | | | | | account, if it is compatible with what was found for the right, so that things like oracle CHAR conversions work. - oracle dialect specific tests pass again.
* -remove proof of concept "cascade constraints"Mike Bayer2010-02-281-4/+1
|