summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
...
| * initial annotations approach to join conditions. all tests pass, plus ↵Mike Bayer2012-02-063-21/+35
| | | | | | | | | | | | additional tests in #1401 pass. would now like to reorganize RelationshipProperty more around the annotations concept.
* | - [bug] UPDATE..FROM syntax with SQL ServerMike Bayer2012-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | requires that the updated table be present in the FROM clause when an alias of that table is also present in the FROM clause. The updated table is now always present in the FROM, when FROM is present in the first place. Courtesy sayap. [ticket:2468]
* | - reopened #2453, needed to put in the original patch as well to cover the caseMike Bayer2012-04-031-0/+9
| | | | | | | | of column_property() objs building off each other
* | - [bug] Fixed bug in expression annotationMike Bayer2012-03-311-9/+21
| | | | | | | | | | | | | | mechanics which could lead to incorrect rendering of SELECT statements with aliases and joins, particularly when using column_property(). [ticket:2453]
* | - [feature] Added new for_update/with_lockmode()Mike Bayer2012-03-211-5/+12
| | | | | | | | | | | | | | | | | | | | options for Postgresql: for_update="read"/ with_lockmode("read"), for_update="read_nowait"/ with_lockmode("read_nowait"). These emit "FOR SHARE" and "FOR SHARE NOWAIT", respectively. Courtesy Diana Clarke [ticket:2445]
* | I'm pretty sure this should be entitiesDiana Clarke2012-03-181-1/+1
| |
* | typos in lib/sqlalchemy/sqlDiana Clarke2012-03-172-15/+15
| |
* | revert this, the instrumentation here is conditionalMike Bayer2012-03-131-2/+2
| |
* | add most of Brad Allen's doc updates, [ticket:2434]Mike Bayer2012-03-131-8/+28
|\ \
| * | Tiny wording fix in a commentBrad Allen2011-03-161-2/+2
| | |
| * | Slight sanity/clarity improvement to the way VisitableType binds theBrad Allen2011-03-161-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | _compiler_dispatch. This code change has no functional or performance implications, but it helps make the docstring easier to write. Mostly this commit is about docstring improvements and comments to explain optimizations.
* | | - [feature] Added support for MSSQL INSERT,Mike Bayer2012-03-132-6/+98
| | | | | | | | | | | | | | | | | | UPDATE, and DELETE table hints, using new with_hint() method on UpdateBase. [ticket:2430]
* | | - [bug] Fixed bug whereby a primaryjoinMike Bayer2012-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | condition with a "literal" in it would raise an error on compile with certain kinds of deeply nested expressions which also needed to render the same bound parameter name more than once. [ticket:2425]
* | | fix typos, SQL server also needs union allMike Bayer2012-03-031-2/+2
| | |
* | | - [feature] Added cte() method to Query,Mike Bayer2012-03-032-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invokes common table expression support from the Core (see below). [ticket:1859] - [feature] Added support for SQL standard common table expressions (CTE), allowing SELECT objects as the CTE source (DML not yet supported). This is invoked via the cte() method on any select() construct. [ticket:1859]
* | | - expand the check to determine if a selectable column is embeddedMike Bayer2012-02-291-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the corresponding selectable to take into account clones of the target column. fixes [ticket:2419] - have _make_proxy() copy out the _is_clone_of attribute on the new column so that even more corresponding_column() checks work as expected for cloned elements. - add a new test fixture so that mapped tests can be specified using declarative.
* | | remove check_columns here so warning not emitted with update fromMike Bayer2012-02-261-1/+1
| | |
* | | - [bug] A warning is emitted when a not-presentMike Bayer2012-02-211-2/+12
| |/ |/| | | | | | | | | | | column is stated in the values() clause of an insert() or update() construct. Will move to an exception in 0.8. [ticket:2413]
* | - [bug] Added support for using the .keyMike Bayer2012-02-052-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | of a Column as a string identifier in a result set row. The .key is currently listed as an "alternate" name for a column, and is superseded by the name of a column which has that key value as its regular name. For the next major release of SQLAlchemy we may reverse this precedence so that .key takes precedence, but this is not decided on yet. [ticket:2392]
* | - [bug] A significant change to how labelingMike Bayer2012-02-052-30/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is applied to columns in SELECT statements allows "truncated" labels, that is label names that are generated in Python which exceed the maximum identifier length (note this is configurable via label_length on create_engine()), to be properly referenced when rendered inside of a subquery, as well as to be present in a result set row using their original in-Python names. [ticket:2396] - apply pep8 to test_labels
* | - add a warning regarding tuple.in_(), [ticket:2395]Mike Bayer2012-02-041-0/+8
| | | | | | | | - cleanup of exc.DBAPIError docstrings
* | fix a few py3k bugsMike Bayer2012-01-281-0/+1
| |
* | - [feature] Dialect-specific compilers now raiseMike Bayer2012-01-281-13/+30
| | | | | | | | | | | | | | | | CompileException for all type/statement compilation issues, instead of InvalidRequestError or ArgumentError. The DDL for CREATE TABLE will re-raise CompileExceptions to include table/column information for the problematic column. [ticket:2361]
* | - [bug] Fixed issue where the "required" exceptionMike Bayer2012-01-281-11/+22
| | | | | | | | | | | | would not be raised for bindparam() with required=True, if the statement were given no parameters at all. [ticket:2381]
* | - [bug] Fixed bug whereby a table-bound ColumnMike Bayer2012-01-222-0/+18
| | | | | | | | | | | | | | | | | | | | | | object named "<a>_<b>" which matched a column labeled as "<tablename>_<colname>" could match inappropriately when targeting in a result set row. [ticket:2377] - requires that we change the tuple format in RowProxy. Makes an improvement to the cases tested against an unpickled RowProxy as well though doesn't solve the problem there entirely.
* | - [feature] Added "false()" and "true()" expressionMike Bayer2012-01-181-0/+2
| | | | | | | | | | | | | | constructs to sqlalchemy.sql namespace, though not part of __all__ as of yet. - [bug] sql.false() and sql.true() compile to 0 and 1, respectively in sqlite [ticket:2368]
* | - Fixed regression from 0.6 whereby ifMike Bayer2012-01-103-14/+18
| | | | | | | | | | | | | | "load_on_pending" relationship() flag were used where a non-"get()" lazy clause needed to be emitted on a pending object, it would fail to load.
* | happy new yearMike Bayer2012-01-047-7/+7
| |
* | fix a whole bunch of note:: / warning:: that were inline,Mike Bayer2011-12-251-4/+8
| | | | | | | | no longer compatible with docutils 0.8
* | - [bug] the "name" of a column-level CHECK constraint,Mike Bayer2011-12-041-1/+5
| | | | | | | | | | | | if present, is now rendered in the CREATE TABLE statement using "CONSTRAINT <name> CHECK <expression>". [ticket:2305]
* | - [bug] Fixed bug whereby column_property() createdMike Bayer2011-12-031-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | against ORM-level column could be treated as a distinct entity when producing certain kinds of joined-inh joins. [ticket:2316] - [bug] related to [ticket:2316], made some adjustments to the change from [ticket:2261] regarding the "from" list on a select(). The _froms collection is no longer memoized, as this simplifies various use cases and removes the need for a "warning" if a column is attached to a table after it was already used in an expression - the select() construct will now always produce the correct expression. There's probably no real-world performance hit here; select() objects are almost always made ad-hoc, and systems that wish to optimize the re-use of a select() would be using the "compiled_cache" feature. A hit which would occur when calling select.bind has been reduced, but the vast majority of users shouldn't be using "bound metadata" anyway :).
* | also add support for onupdate as we'd like this to fire off if an UPDATE ↵Mike Bayer2011-11-221-13/+31
| | | | | | | | | | | | actually happens on the table
* | merge tipMike Bayer2011-11-221-1/+1
|\ \
| * | 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]