summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util.py
Commit message (Collapse)AuthorAgeFilesLines
* copyrightMike Bayer2012-05-051-1/+1
|
* patch from 0.7: Adjusted the "importlater" mechanism, which isMike Bayer2011-09-211-15/+45
| | | | | | | | | 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].
* - Fixed bug whereby if a mapped classMike Bayer2011-07-171-3/+10
| | | | | | | | | redefined __hash__() or __eq__() to something non-standard, which is a supported use case as SQLA should never consult these, the methods would be consulted if the class was part of a "composite" (i.e. non-single-entity) result set. [ticket:2215]
* - The limit/offset keywords to select() as wellMike Bayer2011-04-071-0/+7
| | | | | | | | | | as the value passed to select.limit()/offset() will be coerced to integer. [ticket:2116] - Oracle dialect adds use_binds_for_limits=False create_engine() flag, will render the LIMIT/OFFSET values inline instead of as binds, reported to modify the execution plan used by Oracle. [ticket:2116]
* -whitespace removal bonanzaMike Bayer2011-01-021-49/+49
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-2/+2
| | | | | a consistent tag - AUTHORS file
* - Fixed operator precedence rules for multipleMike Bayer2010-11-251-6/+5
| | | | | | | | | | | | chains of a single non-associative operator. I.e. "x - (y - z)" will compile as "x - (y - z)" and not "x - y - z". Also works with labels, i.e. "x - (y - z).label('foo')" [ticket:1984] - Single element tuple expressions inside an IN clause parenthesize correctly, also from [ticket:1984], added tests for PG - re-fix again importlater, [ticket:1983]
* - adjust importlater to import the full path, break out of "import" problems ↵Mike Bayer2010-11-251-2/+5
| | | | | | with ImportError, [ticket:1983]
* - move inline "import" statements to use new "util.importlater()" construct. ↵Mike Bayer2010-11-131-1/+45
| | | | | | | | | cuts down on clutter, timeit says there's a teeny performance gain, at least where the access is compared against attr.subattr. these aren't super-critical calls anyway - slight inlining in _class_to_mapper
* - engine_from_config() now accepts 'debug' forMike Bayer2010-10-151-0/+12
| | | | | | 'echo', 'echo_pool', 'force' for 'convert_unicode', boolean values for 'use_native_unicode'. [ticket:1899]
* - Fixed labeling bug in Query whereby the NamedTupleMike Bayer2010-10-141-1/+1
| | | | | would mis-apply labels if any of the column expressions were un-labeled.
* @mapperproperty -> @declared_attrMike Bayer2010-09-271-1/+1
|
* - @classproperty 's official name/location for usageMike Bayer2010-09-251-2/+6
| | | | | | | with declarative is sqlalchemy.ext.declarative.mapperproperty. Same thing, but moving there since it is more of a "marker" that's specific to declararative, not just an attribute technique. [ticket:1915]
* doc updatesMike Bayer2010-09-061-3/+27
|
* python 2.4Mike Bayer2010-09-031-13/+15
|
* Apply more memoization to Mapper attributes & subject to group expiry.Jason Kirtland2010-09-031-0/+43
|
* get slightly better about deprecations in docstrings, tho this is kind of an ↵Mike Bayer2010-08-091-10/+31
| | | | uphill climb
* - worked through about 25% of mappers.rst to implementMike Bayer2010-08-011-1/+1
| | | | | up to date and clear explanations of things, including as much context and description as possible
* - add encode step to appease py3kMike Bayer2010-07-211-0/+2
|
* - Changed the scheme used to generate truncatedMike Bayer2010-07-211-0/+12
| | | | | | | | | | | | "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]
* force __doc__ to transfer over from the decorated funciton.Mike Bayer2010-07-051-0/+5
| | | | 2.6 does this anyway, 2.4 and 2.5 do not.
* - Fixed @memoized_property and @memoized_instancemethodMike Bayer2010-06-191-2/+2
| | | | | | decorators so that Sphinx documentation picks up these attributes and methods, such as ResultProxy.inserted_primary_key. [ticket:1830]
* mapper.py is entirely 79 char lines nowMike Bayer2010-05-311-0/+4
|
* change the weakkeydict to be just an LRU cache. Add testsMike Bayer2010-05-311-0/+49
| | | | for the "many combinations of UPDATE keys" issue.
* a little bit of refinementMike Bayer2010-04-171-1/+1
|
* a handy @classproperty decoratorChris Withers2010-02-231-0/+10
|
* - added util.portable_instancemethod to provide a quick way to make an ↵Mike Bayer2010-02-221-0/+12
| | | | | | | | | | instancemethod "serializable" - SchemaType and subclasses Boolean, Enum are now serializable, including their ddl listener and other event callables. [ticket:1694] [ticket:1698] - AddConstraint/DropConstraint use the wrapper for _create_rule - added test coverage for AddConstraint override of _create_rule
* more cleanupMike Bayer2010-02-151-5/+10
|
* - make frozendict serializableMike Bayer2010-01-281-0/+3
| | | | - serialize tests use HIGHEST_PROTOCOL
* revert r6686 and adjust the stacklevel of test_notsane_warning's SAWarning soPhilip Jenvey2010-01-251-7/+7
| | | | it can force it to be emitted
* - Connection has execution_options(), generative methodMike Bayer2010-01-241-0/+8
| | | | | | | | | which accepts keywords that affect how the statement is executed w.r.t. the DBAPI. Currently supports "stream_results", causes psycopg2 to use a server side cursor for that statement. Can also be set upon select() and text() constructs directly as well as ORM Query().
* - added native INTERVAL type to the dialect. This supportsMike Bayer2010-01-181-1/+1
| | | | | | | | | | | | | | | only the DAY TO SECOND interval type so far due to lack of support in cx_oracle for YEAR TO MONTH. [ticket:1467] - The Interval type includes a "native" flag which controls if native INTERVAL types (postgresql + oracle) are selected if available, or not. "day_precision" and "second_precision" arguments are also added which propagate as appropriately to these native types. Related to [ticket:1467]. - DefaultDialect.type_descriptor moves back to being per-dialect. TypeEngine/TypeDecorator key type impls to the dialect class + server_version_info so that the colspecs dict can be modified per-dialect based on server version. - Fixed TypeDecorator's incorrect usage of _impl_dict
* - added "statement_options()" to Query, to so options can beMike Bayer2010-01-161-1/+19
| | | | | | | | | | | | | | | | | | | | | passed to the resulting statement. Currently only Select-statements have these options, and the only option used is "stream_results", and the only dialect which knows "stream_results" is psycopg2. - Query.yield_per() will set the "stream_results" statement option automatically. - Added "statement_options()" to Selects, which set statement specific options. These enable e.g. dialect specific options such as whether to enable using server side cursors, etc. - The psycopg2 now respects the statement option "stream_results". This option overrides the connection setting "server_side_cursors". If true, server side cursors will be used for the statement. If false, they will not be used, even if "server_side_cursors" is true on the connection. [ticket:1619] - added a "frozendict" from http://code.activestate.com/recipes/414283/, adding more default collections as immutable class vars on Query, Insert, Select
* NamedTuple is pickleable ! no really with all the protocols too !Mike Bayer2010-01-131-3/+4
|
* happy new yearMike Bayer2010-01-071-1/+1
|
* Within NamedTuple, izip is faster on most cases, and equally fast on othersGaëtan de Menten2009-11-051-1/+1
|
* merged scopefunc patch from r6420 of 0.5 branchMike Bayer2009-10-201-9/+2
|
* - RowProxy objects are now pickleable, i.e. the object returnedMike Bayer2009-10-111-0/+17
| | | | | | by result.fetchone(), result.fetchall() etc. - the "named tuple" objects returned when iterating a Query() are now pickleable.
* python3k fixesMike Bayer2009-08-091-1/+6
|
* merge 0.6 series to trunk.Mike Bayer2009-08-061-8/+45
|
* removed needless "thread" imports from utilMike Bayer2009-05-301-4/+1
|
* Added copy and __copy__ methods to the OrderedDict. Fixes #1377.Michael Trier2009-04-131-0/+6
|
* - _CalculatedClause is goneMike Bayer2009-01-281-4/+1
| | | | | | | | - Function rolls the various standalone execution functionality of CC into itself, accesses its internal state more directly - collate just uses _BinaryExpression, don't know why it didn't do this already - added new _Case construct, compiles directly - the world is a happier place
* WeakCompositeKey was coded incorrectly and was not weakly referencing ↵Mike Bayer2009-01-171-32/+0
| | | | anything. However when repaired, the usage within RelationLoader._create_joins() still creates cycles between key elements and the value placed in the dict. In the interests of risk reduction, WCK is now removed and the two caches it was used for are now non-cached. Speed comparisons with one join/eager-heavy web application show no noticeable effect in response time.
* happy new yearMike Bayer2009-01-121-1/+1
|
* more platform neutral way of getting at 'buffer'Mike Bayer2008-12-191-5/+5
|
* merged -r5299:5438 of py3k warnings branch. this fixes some sqlite py2.6 ↵Mike Bayer2008-12-181-19/+64
| | | | | | | | testing issues, and also addresses a significant chunk of py3k deprecations. It's mainly expicit __hash__ methods. Additionally, most usage of sets/dicts to store columns uses util-based placeholder names.
* - PickleType now favors == comparison by default,Mike Bayer2008-12-111-0/+11
| | | | | | | if the incoming object (such as a dict) implements __eq__(). If the object does not implement __eq__() and mutable=True, a deprecation warning is raised.
* Quashed import sets deprecation warning on 2.6.. not wild about this but it ↵Jason Kirtland2008-11-101-3/+15
| | | | seems like it will be ok. [ticket:1209]
* flattened _get_from_objects() into a descriptor/class-bound attributeMike Bayer2008-11-091-1/+0
|