summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed the import weirdness in sqlalchemy.sqlMike Bayer2008-11-221-2/+2
| | | | to not export __names__ [ticket:1215].
* - 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-092-5/+10
| | | | | Connection object, Connection.info should be used. - Method consoliation in Connection, ExecutionContext
* Global propigate -> propagate change to correct spelling. Additionally found ↵Michael Trier2008-11-092-2/+2
| | | | a couple of insures that should be ensure.
* docstring updatesMike Bayer2008-11-073-29/+103
|
* avoid some often unnecessary method calls. i think we might have squeezed ↵Mike Bayer2008-11-071-9/+14
| | | | all we're going to squeeze out of compiler at this point.
* the @memoized_property fairy pays a visitMike Bayer2008-11-071-23/+19
|
* - Fixed bug in Query involving order_by() in conjunction withMike Bayer2008-11-062-4/+42
| | | | | | | | | | | | | | | | 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-052-49/+53
| | | | | | | | | | | | | 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-032-8/+75
| | | | | | | | | | | 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-254-134/+134
| | | | | | | 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
|
* - CompileTests run without the DBAPI being usedMike Bayer2008-10-231-1/+4
| | | | - added stack logic back to visit_compound(), pared down is_subquery
* call count pinata partyMike Bayer2008-10-232-24/+53
|
* Corrected the is_subquery() check based on recent changes. Excluded the ↵Michael Trier2008-10-211-1/+1
| | | | test_in_filtering_advanced test for mssql.
* 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.
* Modifications to allow the backends to control the behavior of an empty ↵Michael Trier2008-10-201-4/+11
| | | | insert. If supports_empty_insert is True then the backend specifically supports the 'insert into t1 () values ()' syntax. If supports_default_values is True then the backend supports the 'insert into t1 default values' syntax. If both are false then the backend has no support for empty inserts at all and an exception gets raised. Changes here are careful to not change current behavior except where the current behavior was failing to begin with.
* tiny tiny speed improvements....Mike Bayer2008-10-182-30/+29
|
* - 0.5.0rc3, dohMike Bayer2008-10-182-46/+6
| | | | | | | | | | | | - 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
* - "not equals" comparisons of simple many-to-one relationMike Bayer2008-10-181-53/+22
| | | | | | | | | | | | | | | to an instance will not drop into an EXISTS clause and will compare foreign key columns instead. - removed not-really-working use cases of comparing a collection to an iterable. Use contains() to test for collection membership. - Further simplified SELECT compilation and its relationship to result row processing. - Direct execution of a union() construct will properly set up result-row processing. [ticket:1194]
* - 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]
* - Added func.min(), func.max(), func.sum() as "generic functions",Mike Bayer2008-09-081-2/+15
| | | | | | | | | | which basically allows for their return type to be determined automatically. Helps with dates on SQLite, decimal types, others. [ticket:1160] - added decimal.Decimal as an "auto-detect" type; bind parameters and generic functions will set their type to Numeric when a Decimal is used.
* - Fixed bug whereby mapper couldn't initialize if a compositeMike Bayer2008-09-041-2/+14
| | | | | primary key referenced another table that was not defined yet [ticket:1161]
* - limit/offset no longer uses ROW NUMBER OVER to limit rows,Mike Bayer2008-09-031-1/+2
| | | | | | and instead uses subqueries in conjunction with a special Oracle optimization comment. Allows LIMIT/OFFSET to work in conjunction with DISTINCT. [ticket:536]
* - fixed a bug in declarative test which was looking for old version of historyMike Bayer2008-08-192-9/+13
| | | | | | | | | | - Added "sorted_tables" accessor to MetaData, which returns Table objects sorted in order of dependency as a list. This deprecates the MetaData.table_iterator() method. The "reverse=False" keyword argument has also been removed from util.sort_tables(); use the Python 'reversed' function to reverse the results. [ticket:1033]
* commentMike Bayer2008-08-081-1/+5
|
* - Temporarily rolled back the "ORDER BY" enhancementMike Bayer2008-08-061-10/+6
| | | | | from [ticket:1068]. This feature is on hold pending further development.
* - compiler visit_label() checks a flag "within_order_by" and will render its ↵Mike Bayer2008-08-031-16/+23
| | | | | | | | | | | | | | | | | | | own name and not its contained expression, if the dialect reports true for supports_simple_order_by_label. the flag is not propagated forwards, meant to closely mimic the syntax Postgres expects which is that only a simple name can be in the ORDER BY, not a more complex expression or function call with the label name embedded (mysql and sqlite support more complex expressions). This further sets the standard for propigation of **kwargs within compiler, that we can't just send **kwargs along blindly to each XXX.process() call; whenever a **kwarg needs to propagate through, most methods will have to be aware of it and know when they should send it on forward and when not. This was actually already the case with result_map as well. The supports_simple_order_by dialect flag defaults to True but is conservatively explicitly set to False on all dialects except SQLite/MySQL/Postgres to start. [ticket:1068]
* - func.count() with no argument emits COUNT(*)Jason Kirtland2008-07-241-1/+11
|
* - Moved to 2.4+ import syntax (w/ some experimental merge-friendly formatting)Jason Kirtland2008-07-154-37/+95
|
* - Always use native itemgetter & attrgetterJason Kirtland2008-07-151-2/+4
|
* - Always use native dequeJason Kirtland2008-07-151-4/+4
|
* - Dropped `reversed` emulationJason Kirtland2008-07-151-1/+1
|
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-155-28/+28
| | | | (sets.Set-based collections & DB-API returns still work.)
* And thus ends support for Python 2.3.Jason Kirtland2008-07-152-25/+45
|
* - Fixed a couple lingering exceptions->exc usagesJason Kirtland2008-07-151-1/+1
| | | | - Some import tidying
* - Fixed bug when calling select([literal('foo')])Mike Bayer2008-07-151-1/+1
| | | | or select([bindparam('foo')]).
* Added new basic match() operator that performs a full-text search. Supported ↵Michael Trier2008-07-133-0/+16
| | | | on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends.
* - re-fixed the fix to the prefixes fixMike Bayer2008-07-061-1/+1
| | | | | - removed ancient descriptor() functions from dialects; replaced with Dialect.name - removed similarly ancient sys.modules silliness in Engine.name
* - session.refresh() raises an informative error message ifMike Bayer2008-07-051-1/+1
| | | | | | | | | | | | | | the list of attributes does not include any column-based attributes. - query() raises an informative error message if no columns or mappers are specified. - lazy loaders now trigger autoflush before proceeding. This allows expire() of a collection or scalar relation to function properly in the context of autoflush. - whitespace fix to new Table prefixes option
* Added prefixes option to that accepts a list of string to insert after ↵Michael Trier2008-07-051-1/+1
| | | | CREATE in the CREATE TABLE statement. Closes #1075.