summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
...
* - use our new Cls.memoized_name._reset(self) method in place of all those ↵Mike Bayer2012-09-232-6/+6
| | | | | | __dict__.pop(), remove reset_memoized
* - [bug] A tweak to column precedence which moves theMike Bayer2012-09-221-15/+20
| | | | | | | "concat" and "match" operators to be the same as that of "is", "like", and others; this helps with parenthesization rendering when used in conjunction with "IS". [ticket:2564]
* - aaand actually get is/isnot to be usable with None/NULLMike Bayer2012-09-221-2/+5
|
* - [bug] Added missing operators is_(), isnot()Mike Bayer2012-09-222-0/+32
| | | | | | to the ColumnOperators base, so that these long-available operators are present as methods like all the other operators. [ticket:2544]
* - [bug] CompileError is raised when VARCHAR withMike Bayer2012-09-101-1/+1
| | | | | no length is attempted to be emitted, same way as MySQL. [ticket:2505]
* - [feature] The cast() and extract() constructsMike Bayer2012-09-102-11/+31
| | | | | | | | | will now be produced via the func.* accessor as well, as users naturally try to access these names from func.* they might as well do what's expected, even though the returned object is not a FunctionElement. [ticket:2562]
* - [feature] Added a hook to the system of renderingMike Bayer2012-09-091-10/+23
| | | | | | | CREATE TABLE that provides access to the render for each Column individually, by constructing a @compiles function against the new schema.CreateColumn construct. [ticket:2463]
* `lshift` (<<) and `rshift` (>>) are also supported as optional operators.Mike Bayer2012-09-042-1/+21
|
* - type expressions invoke in SQL, but are only for the benefit of columnsMike Bayer2012-09-031-8/+6
| | | | | | delivered to a result set. therefore these expressions should only be rendered for those columns that are being delivered to the result, thereby preventing the expression from stacking onto itself within nesting scenarios.
* - repair type expressions for columns when we aren't using ↵Mike Bayer2012-09-011-2/+5
| | | | | | select.apply_labels(), label should be the column name.
* - [bug] Fixed a regression since 0.6 regardingMike Bayer2012-08-311-4/+7
| | | | | | | | | | | | | | | | result-row targeting. It should be possible to use a select() statement with string based columns in it, that is select(['id', 'name']).select_from('mytable'), and have this statement be targetable by Column objects with those names; this is the mechanism by which query(MyClass).from_statement(some_statement) works. At some point the specific case of using select(['id']), which is equivalent to select([literal_column('id')]), stopped working here, so this has been re-instated and of course tested. [ticket:2558]
* - [feature] Reworked the startswith(), endswith(),Mike Bayer2012-08-273-35/+57
| | | | | | | | | | | | contains() operators to do a better job with negation (NOT LIKE), and also to assemble them at compilation time so that their rendered SQL can be altered, such as in the case for Firebird STARTING WITH [ticket:2470] - [feature] firebird - The "startswith()" operator renders as "STARTING WITH", "~startswith()" renders as "NOT STARTING WITH", using FB's more efficient operator. [ticket:2470]
* call this "_proxies" since it's not really a public consumption attributeMike Bayer2012-08-271-9/+9
|
* - [feature] The "required" flag is set toMike Bayer2012-08-271-2/+23
| | | | | | | | | | True by default, if not passed explicitly, on bindparam() if the "value" or "callable" parameters are not passed. This will cause statement execution to check for the parameter being present in the final collection of bound parameters, rather than implicitly assigning None. [ticket:2556]
* - add "identifier", can differentiate between "name" rendered and ↵Mike Bayer2012-08-261-2/+20
| | | | "identifier" in func.
* - tweak the GenericFunction constructor more so that it's action in parsing theMike Bayer2012-08-261-7/+6
| | | | | arguments is easier to understand - add a test to ensure generic function can have a custom name
* - more oracle tweaks for returning; the method here is still kind of brittle ↵Mike Bayer2012-08-251-1/+3
| | | | | | and might have issues with pks, multiple function calls
* a few oracle fixesMike Bayer2012-08-251-2/+3
|
* - correct the argument signature for GenericFunction to be more predictableMike Bayer2012-08-241-13/+8
|
* small tweaks to make insert() behavior more consistent, mostly tests, ↵Mike Bayer2012-08-231-0/+7
| | | | [ticket:2461]
* - [bug] Fixed bug whereby usage of a UNIONMike Bayer2012-08-221-7/+11
| | | | | | | | or similar inside of an embedded subquery would interfere with result-column targeting, in the case that a result-column had the same ultimate name as a name inside the embedded UNION. [ticket:2552]
* - [bug] Fixed cextension bug whereby theMike Bayer2012-08-222-30/+37
| | | | | | | | | | | | | | | | | | | "ambiguous column error" would fail to function properly if the given index were a Column object and not a string. Note there are still some column-targeting issues here which are fixed in 0.8. [ticket:2553] - find more cases where column targeting is being inaccurate, add more information to result_map to better differentiate "ambiguous" results from "present" or "not present". In particular, result_map is sensitive to dupes, even though no error is raised; the conflicting columns are added to the "obj" member of the tuple so that the two are both directly accessible in the result proxy - handwringing over the damn "name fallback" thing in results. can't really make it perfect yet - fix up oracle returning clause. not sure why its guarding against labels, remove that for now and see what the bot says.
* - [feature] Enhanced GenericFunction and func.*Mike Bayer2012-08-222-26/+126
| | | | | | | to allow for user-defined GenericFunction subclasses to be available via the func.* namespace automatically by classname, optionally using a package name as well.
* - MySQL's update does work. add some logic to compiler to convert from ORM ↵Mike Bayer2012-08-201-3/+7
| | | | column to Table column
* - [feature] The Core oeprator system now includesMike Bayer2012-08-203-20/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `getitem` operator, i.e. the bracket operator in Python. This is used at first to provide index and slice behavior to the Postgresql ARRAY type, and also provides a hook for end-user definition of custom __getitem__ schemes which can be applied at the type level as well as within ORM-level custom operator schemes. Note that this change has the effect that descriptor-based __getitem__ schemes used by the ORM in conjunction with synonym() or other "descriptor-wrapped" schemes will need to start using a custom comparator in order to maintain this behavior. - [feature] postgresql.ARRAY now supports indexing and slicing. The Python [] operator is available on all SQL expressions that are of type ARRAY; integer or simple slices can be passed. The slices can also be used on the assignment side in the SET clause of an UPDATE statement by passing them into Update.values(); see the docs for examples. - [feature] Added new "array literal" construct postgresql.array(). Basically a "tuple" that renders as ARRAY[1,2,3].
* - [feature] The prefix_with() method is now availableMike Bayer2012-08-192-82/+86
| | | | | | | | on each of select(), insert(), update(), delete(), all with the same API, accepting multiple prefix calls, as well as a "dialect name" so that the prefix can be limited to one kind of dialect. [ticket:2431]
* tighten this upMike Bayer2012-08-181-8/+8
|
* - aaaaand fix one more glitch I just thought ofMike Bayer2012-08-181-0/+1
|
* - fix the labeled column with column_expression() issue, finishes [ticket:1534]Mike Bayer2012-08-183-14/+32
| | | | | | | | | | | - epic documentation sweep for new operator system, making ORM links consistent and complete, full documentation and examples for type/SQL expression feature - type_coerce() explicitly accepts BindParamClause objects - change UserDefinedType to coerce the other side to itself by default as this is much more likely what's desired - make coerce_compared_type() fully public on all types - have profiling run the test no matter what so that the test_zoomarks don't fail when callcounts are missing
* - [feature] To complement [ticket:2547], typesMike Bayer2012-08-171-48/+88
| | | | | | | | | | | | | | | | can now provide "bind expressions" and "column expressions" which allow compile-time injection of SQL expressions into statements on a per-column or per-bind level. This is to suit the use case of a type which needs to augment bind- and result- behavior at the SQL level, as opposed to in the Python level. Allows for schemes like transparent encryption/ decryption, usage of Postgis functions, etc. [ticket:1534] - update postgis example fully. - still need to repair the result map propagation here to be transparent for cases like "labeled column".
* _adapt_expression() moves fully to _DefaultColumnComparator which resumesMike Bayer2012-08-161-24/+57
| | | | | | its original role as stateful, forms the basis of TypeEngine.Comparator. lots of code goes back mostly as it was just with cleaner typing behavior, such as simple flow in _binary_operate now.
* -we move all the invocation of "_adapt_expression" into ↵Mike Bayer2012-08-161-59/+47
| | | | | | TypeEngine.Comparator. at this point the split of operator stuff is getting awkward and we might want to move _DefaultComparator.
* - we're going to attempt to get the type/operator system to eat its own ↵Mike Bayer2012-08-162-27/+27
| | | | | | | | dogfood and use the type-based comparator in all cases. will attempt to remove the _adapt_expression() method entirely as this represents an incomplete and redundant system (though it might be a lot faster)
* docs for custom ops...Mike Bayer2012-08-161-0/+17
|
* - [bug] Declarative can now propagate a columnMike Bayer2012-08-151-2/+88
| | | | | | | | declared on a single-table inheritance subclass up to the parent class' table, when the parent class is itself mapped to a join() or select() statement, directly or via joined inheritane, and not just a Table. [ticket:2549]
* - for the moment, the default comparisons don't need the ColumnOperator ↵Mike Bayer2012-08-141-15/+9
| | | | | | interface. Still a little concerned about the "self.expr" vs. "expr passed in" thing.
* - fix concat() operator, testsMike Bayer2012-08-142-29/+66
| | | | | | | | - [feature] Custom unary operators can now be used by combining operators.custom_op() with UnaryExpression(). - clean up the operator dispatch system and make it more consistent. This does change the compiler contract for custom ops.
* - hashableMike Bayer2012-08-131-0/+3
|
* - all tests passMike Bayer2012-08-131-28/+30
|
* move the whole thing to TypeEngine. the feature is pretty much for free ↵Mike Bayer2012-08-131-41/+13
| | | | like this.
* - develop new system of applying custom operators to ColumnElement classes. ↵Mike Bayer2012-08-132-131/+168
| | | | | | resembles that of the ORM so far.
* - allow compatibility with string ops passed here from custom librariesMike Bayer2012-08-131-0/+4
|
* 2.5 ismMike Bayer2012-07-281-2/+2
|
* - [feature] Added reduce_columns() methodMike Bayer2012-07-282-62/+45
| | | | | | | | | | | | | | | to select() construct, replaces columns inline using the util.reduce_columns utility function to remove equivalent columns. reduce_columns() also adds "with_only_synonyms" to limit the reduction just to those columns which have the same name. The deprecated fold_equivalents() feature is removed [ticket:1729]. - [feature] Added with_labels and reduce_columns keyword arguments to Query.subquery(), to provide two alternate strategies for producing queries with uniquely- named columns. [ticket:1729].
* -whitespace bonanza, contdMike Bayer2012-07-282-19/+19
|
* - we probably need to keep the __clause_element__() logic in, else we haveMike Bayer2012-07-241-35/+37
| | | | | a serious callcount problem. keeping the inspect() usage for those cases where we want to interpret ORM-level FROM objects only.
* - rework some more __clause_element__ methods to use inspection, but theres ↵Mike Bayer2012-07-231-57/+68
| | | | a ton more of these
* - some more interpret_as_fromsMike Bayer2012-07-231-3/+3
|
* - [feature] ORM entities can be passedMike Bayer2012-07-231-11/+43
| | | | | | | to select() as well as the select_from(), correlate(), and correlate_except() methods, where they will be unwrapped into selectables. [ticket:2245]
* some doc fixesMike Bayer2012-07-221-6/+7
|