summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
Commit message (Collapse)AuthorAgeFilesLines
...
* propagate docstrings for column/fk collectionsMike Bayer2008-12-011-7/+13
|
* - Added NotImplementedError for params() methodMike Bayer2008-11-211-1/+5
| | | | | | | on Insert/Update/Delete constructs. These items currently don't support this functionality, which also would be a little misleading compared to values().
* - converted some more attributes to @memoized_property in expressionsMike Bayer2008-11-101-31/+30
| | | | | - flattened an unnecessary KeyError in identity.py - memoized the default list of mapper properties queried in MapperEntity.setup_context
* flattened _get_from_objects() into a descriptor/class-bound attributeMike Bayer2008-11-091-68/+50
|
* - Removed the 'properties' attribute of theMike Bayer2008-11-091-1/+5
| | | | | Connection object, Connection.info should be used. - Method consoliation in Connection, ExecutionContext
* Global propigate -> propagate change to correct spelling. Additionally found ↵Michael Trier2008-11-091-1/+1
| | | | a couple of insures that should be ensure.
* docstring updatesMike Bayer2008-11-071-29/+49
|
* the @memoized_property fairy pays a visitMike Bayer2008-11-071-23/+19
|
* - Fixed bug in Query involving order_by() in conjunction withMike Bayer2008-11-061-1/+16
| | | | | | | | | | | | | | | | multiple aliases of the same class (will add tests in [ticket:1218]) - Added a new extension sqlalchemy.ext.serializer. Provides Serializer/Deserializer "classes" which mirror Pickle/Unpickle, as well as dumps() and loads(). This serializer implements an "external object" pickler which keeps key context-sensitive objects, including engines, sessions, metadata, Tables/Columns, and mappers, outside of the pickle stream, and can later restore the pickle using any engine/metadata/session provider. This is used not for pickling regular object instances, which are pickleable without any special logic, but for pickling expression objects and full Query objects, such that all mapper/engine/session dependencies can be restored at unpickle time.
* - Dialects can now generate label names of adjustable length.Mike Bayer2008-11-051-8/+11
| | | | | | | | | | | | | Pass in the argument "label_length=<value>" to create_engine() to adjust how many characters max will be present in dynamically generated column labels, i.e. "somecolumn AS somelabel". Any value less than 6 will result in a label of minimal size, consiting of an underscore and a numeric counter. The compiler uses the value of dialect.max_identifier_length as a default. [ticket:1211] - removed ANON_NAME regular expression, using string patterns now - _generated_label() unicode subclass is used to indicate generated names which are subject to truncation
* - Improved the behavior of aliased() objects such that they moreMike Bayer2008-11-031-1/+12
| | | | | | | | | | | accurately adapt the expressions generated, which helps particularly with self-referential comparisons. [ticket:1171] - Fixed bug involving primaryjoin/secondaryjoin conditions constructed from class-bound attributes (as often occurs when using declarative), which later would be inappropriately aliased by Query, particularly with the various EXISTS based comparators.
* pep8 stuffMike Bayer2008-11-021-82/+174
|
* - moved _FigureVisitName into visitiors.VisitorType, added Visitor base ↵Mike Bayer2008-10-251-113/+87
| | | | | | | class to reduce dependencies - implemented _generative decorator for select/update/insert/delete constructs - other minutiae
* small fixMike Bayer2008-10-251-0/+4
|
* a couple of refinementsMike Bayer2008-10-251-32/+26
|
* call count pinata partyMike Bayer2008-10-231-14/+29
|
* Slightly changed behavior of IN operator for comparing to empty collections. ↵Ants Aasma2008-10-201-2/+2
| | | | Now results in inequality comparison against self. More portable, but breaks with stored procedures that aren't pure functions.
* tiny tiny speed improvements....Mike Bayer2008-10-181-11/+8
|
* - 0.5.0rc3, dohMike Bayer2008-10-181-36/+4
| | | | | | | | | | | | - The internal notion of an "OID" or "ROWID" column has been removed. It's basically not used by any dialect, and the possibility of its usage with psycopg2's cursor.lastrowid is basically gone now that INSERT..RETURNING is available. - Removed "default_order_by()" method on all FromClause objects. - profile/compile/select test is 8 function calls over on buildbot 2.4 for some reason, will adjust after checking the results of this commit
* - session.execute() will execute a Sequence object passed toMike Bayer2008-09-281-1/+4
| | | | | | | | | | | it (regression from 0.4). - Removed the "raiseerror" keyword argument from object_mapper() and class_mapper(). These functions raise in all cases if the given class/instance is not mapped. - Refined ExtensionCarrier to be itself a dict, removed 'methods' accessor - moved identity_key tests to test/orm/utils.py - some docstrings
* - version bumpMike Bayer2008-09-161-32/+47
| | | | | | | - turned properties in sql/expressions.py to @property - column.in_(someselect) can now be used as a columns-clause expression without the subquery bleeding into the FROM clause [ticket:1074]
* - 0.5.0rc1rel_0_5rc1Mike Bayer2008-09-111-3/+1
| | | | - removed unneeded grouping from BooleanClauseList, generated needless parens
* return type of exists() is boolean, duhMike Bayer2008-09-091-1/+1
|
* - Bind params now subclass ColumnElement which allows them to beMike Bayer2008-09-091-2/+9
| | | | | | | | | | | selectable by orm.query (they already had most ColumnElement semantics). - Added select_from() method to exists() construct, which becomes more and more compatible with a regular select(). - Bind parameters/literals given a True/False value will detect their type as Boolean
* - The exists() construct won't "export" its contained listMike Bayer2008-09-081-2/+16
| | | | | | | | | of elements as FROM clauses, allowing them to be used more effectively in the columns clause of a SELECT. - and_() and or_() now generate a ColumnElement, allowing boolean expressions as result columns, i.e. select([and_(1, 0)]). [ticket:798]
* - Moved to 2.4+ import syntax (w/ some experimental merge-friendly formatting)Jason Kirtland2008-07-151-1/+1
|
* - Always use native itemgetter & attrgetterJason Kirtland2008-07-151-2/+4
|
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-151-14/+14
| | | | (sets.Set-based collections & DB-API returns still work.)
* And thus ends support for Python 2.3.Jason Kirtland2008-07-151-10/+13
|
* Added new basic match() operator that performs a full-text search. Supported ↵Michael Trier2008-07-131-0/+11
| | | | on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends.
* add with_only_columns to Select to allow for removing columns from selectsAnts Aasma2008-05-291-0/+10
|
* - added some help for a heavily flush-order-dependent testMike Bayer2008-05-161-1/+3
| | | | - quote flag propagates to _Label, [ticket:1045]
* Followup to [4760]: forward **kwargs on TableClause.delete()Lele Gaifax2008-05-151-2/+2
|
* Augment expression.Delete() with a kwargs, like Insert() and Update()Lele Gaifax2008-05-151-2/+4
|
* - fixed propagation of operate() for aliased relation descriptorsMike Bayer2008-05-131-2/+2
| | | | - ColumnEntity gets a selectable
* - clause adaption hits _raw_columns of a select() (though no ORM tests need ↵Mike Bayer2008-05-121-1/+1
| | | | | | this feature currently) - broke up adapter chaining in eagerload, erroneous "wrapping" in row_decorator. column_property() subqueries are now affected only by the ORMAdapter for that mapper. fixes [ticket:1037], and may possibly impact some of [ticket:949]
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-271/+219
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - _Label adds itself to the proxy collection so that it works in ↵Mike Bayer2008-05-061-3/+8
| | | | | | correspoinding column. fixes some eager load with column_property bugs. - this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now
* - same as [ticket:1019] but repaired the non-labeled use caseMike Bayer2008-05-051-1/+4
| | | | [ticket:1022]
* - factored out the logic used by Join to create its join conditionMike Bayer2008-05-021-28/+4
| | | | | | | - With declarative, joined table inheritance mappers use a slightly relaxed function to create the "inherit condition" to the parent table, so that other foreign keys to not-yet-declared Table objects don't trigger an error.
* - improved behavior of text() expressions when used asMike Bayer2008-04-261-10/+7
| | | | | | | FROM clauses, such as select().select_from(text("sometext")) [ticket:1014] - removed _TextFromClause; _TextClause just adds necessary FromClause descriptors at the class level
* - Support for COLLATE: collate(expr, col) and expr.collate(col)Jason Kirtland2008-04-161-1/+19
|
* *headslap* those mutators cant mutate the collections except for ↵Mike Bayer2008-04-071-9/+5
| | | | never-generated selectables; its not worth it
* - merged -r4458:4466 of query_columns branchMike Bayer2008-04-071-227/+132
| | | | | | | - this branch changes query.values() to immediately return an iterator, adds a new "aliased" construct which will be the primary method to get at aliased columns when using values() - tentative ORM versions of _join and _outerjoin are not yet public, would like to integrate with Query better (work continues in the branch) - lots of fixes to expressions regarding cloning and correlation. Some apparent ORM bug-workarounds removed. - to fix a recursion issue with anonymous identifiers, bind parameters generated against columns now just use the name of the column instead of the tablename_columnname label (plus the unique integer counter). this way expensive recursive schemes aren't needed for the anon identifier logic. This, as usual, impacted a ton of compiler unit tests which needed a search-n-replace for the new bind names.
* factored down exportable_columns/flatten_cols/proxy_column/oid_etc_yada down ↵Mike Bayer2008-04-041-137/+69
| | | | to a single, streamlined "_populate_column_collection" method called for all selectables
* fixed union() bug whereby oid_column would not be available if no oid_column ↵Mike Bayer2008-04-041-2/+5
| | | | in embedded selects
* A couple of usage examples for the case statementAnts Aasma2008-04-031-0/+9
|
* - case() interprets the "THEN" expressionsMike Bayer2008-04-031-9/+38
| | | | | | | | | as values by default, meaning case([(x==y, "foo")]) will interpret "foo" as a bound value, not a SQL expression. use text(expr) for literal SQL expressions in this case. For the criterion itself, these may be literal strings only if the "value" keyword is present, otherwise SA will force explicit usage of either text() or literal().
* The case() function now also takes a dictionary as its whens parameter. But ↵Ants Aasma2008-04-031-1/+6
| | | | beware that it doesn't escape literals, use the literal construct for that.
* - Got PG server side cursors back into shape, added fixedMike Bayer2008-04-021-23/+30
| | | | | | | unit tests as part of the default test suite. Added better uniqueness to the cursor ID [ticket:1001] - update().values() and insert().values() take keyword arguments.