summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - comment typoJason Kirtland2008-02-141-2/+2
|
* - Made testlib's --unhashable and r3935's set changes play niceJason Kirtland2008-02-141-6/+13
| | | | - A bonus overhead reduction for IdentitySet instances
* - Added free-form `DDL` statements, can be executed standalone or tied to ↵Jason Kirtland2008-02-051-0/+38
| | | | | | the DDL create/drop lifecycle of Tables and MetaData. [ticket:903] - Added DDL event hooks, triggers callables before and after create / drop.
* - IdentitySet binops no longer accept plain sets.Jason Kirtland2008-01-241-16/+12
|
* A little clarity tweak to r4093Jason Kirtland2008-01-241-3/+3
|
* Corrected behavior of get_cls_kwargs and friendsJason Kirtland2008-01-241-10/+28
|
* - 2.3 fixup, part two: 100% passing for sqliteJason Kirtland2008-01-211-4/+59
| | | | | | | | | - added 2.4-style binops to util.Set on 2.3 - OrderedSets pickle on 2.3 - more lib/sqlalchemy set vs Set corrections - fixed InstrumentedSet.discard for 2.3 - set, sorted compatibility for test suite - added testing.fails_if decorator
* - Warnings are now issued as SAWarning instead of RuntimeWarning; ↵Jason Kirtland2008-01-111-7/+23
| | | | | | util.warn() wraps this up. - SADeprecationWarning has moved to exceptions. An alias remains in logging until 0.5.
* Include column name in length-less String warning (more [ticket:912])Jason Kirtland2008-01-101-0/+10
|
* Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. ↵Jason Kirtland2008-01-101-5/+2
| | | | No surprises.
* test suite deprecation rampageJason Kirtland2008-01-091-4/+19
|
* happy new yearMike Bayer2008-01-011-1/+1
|
* - simplified _mapper_registry further. its now just a weakkeydict of ↵Mike Bayer2007-12-141-2/+2
| | | | | | | | | | mapper->True, stores all mappers including non primaries, and is strictly used for the list of "to compile/dispose". - all global references are now weak referencing. if you del a mapped class and any dependent classes, its mapper and all dependencies fall out of scope. - attributes.py still had issues which were barely covered by tests. added way more tests (coverage.py still says 71%, doh) fixed things, took out unnecessary commit to states. attribute history is also asserted for ordering.
* - merged instances_yields branch r3908:3934, minus the "yield" part which ↵Mike Bayer2007-12-141-15/+21
| | | | | | | | | | | | | remains slightly problematic - cleanup of mapper._instance, query.instances(). mapper identifies objects which are part of the current load using a app-unique id on the query context. - attributes refactor; attributes now mostly use copy-on-modify instead of copy-on-load behavior, simplified get_history(), added a new set of tests - fixes to OrderedSet such that difference(), intersection() and others can accept an iterator - OrderedIdentitySet passes in OrderedSet to the IdentitySet superclass for usage in difference/intersection/etc. operations so that these methods actually work with ordering behavior. - query.order_by() takes into account aliased joins, i.e. query.join('orders', aliased=True).order_by(Order.id) - cleanup etc.
* - Raise an error when assigning a bogusly keyed dictionary to one of the ↵Jason Kirtland2007-12-141-0/+24
| | | | | | | builtin dict-based collection types [ticket:886] - Collections gain a @converter framework for flexible validation and adaptation of bulk assignment - Bogus bulk assignments now raise TypeError instead of exceptions.ArgumentError
* Restored Python 2.3 compatibility (in IdentitySet)Jason Kirtland2007-11-141-1/+14
|
* - base_columns on ColumnElement becomes a list; as usual, because columns in ↵Mike Bayer2007-11-051-21/+0
| | | | | | | | | | | | | | | | CompoundSelects may extend from more than one root column. - keys_ok argument from corresponding_column() removed. no more name-based matching of columns anywhere. - DictDecorator is gone. all row translators provided by orm.util.create_row_adapter(). Mapper and contains_alias() cache the adapters on target mapper to avoid re-computation of adapters. - create_row_adapter() accepts an "equivalent_columns" map as produced by Mapper, so that row adapters can take join conditions into account (as usual again, to help with the CompoundSelects produced by polymorphic_union). - simplified TableSingleton to just provide lookup; moved all initialization into Table. - the "properties" accessor on Mapper is removed; it now throws an informative exception explaining the usage of mapper.get_property() and mapper.iterate_properties
* - Removed equality, truth and hash() testing of mapped instances. MappedJason Kirtland2007-11-031-3/+19
| | | | classes can now implement arbitrary __eq__ and friends. [ticket:676]
* - A more efficient IdentitySetJason Kirtland2007-10-311-106/+116
|
* Added util.IdentitySet to support [ticket:676] and [ticket:834]Jason Kirtland2007-10-311-1/+192
|
* Formatting tweaks.Jason Kirtland2007-10-311-25/+25
|
* - Removed unused util.hash()Jason Kirtland2007-10-311-7/+1
| | | | - Fixed __hash__ for association proxy collections
* - fixed clear_mappers() behavior to better clean up after itselfMike Bayer2007-10-271-2/+2
|
* - string-based query param parsing/config file parser understandsMike Bayer2007-10-161-2/+14
| | | | wider range of string values for booleans [ticket:817]
* - mapper compilation has been reorganized such that most compilationMike Bayer2007-09-021-4/+5
| | | | | | | | | | occurs upon mapper construction. this allows us to have fewer calls to mapper.compile() and also to allow class-based properties to force a compilation (i.e. User.addresses == 7 will compile all mappers; this is [ticket:758]). The only caveat here is that an inheriting mapper now looks for its inherited mapper upon construction; so mappers within inheritance relationships need to be constructed in inheritance order (which should be the normal case anyway).
* Fixed OrderedProperties pickling [ticket:762]Jason Kirtland2007-08-281-3/+3
|
* Allow custom getter/setters to be specified for a standard AssociationProxyJason Kirtland2007-08-231-0/+6
|
* A couple critical path optimizationsJason Kirtland2007-08-211-20/+23
| | | | (some sql operations faster by nearly 10% wallclock, general orm around 3%)
* - method call removalMike Bayer2007-08-201-1/+5
|
* - Added a "legacy" adapter to types, such that user-defined TypeEngineMike Bayer2007-08-171-1/+1
| | | | | | and TypeDecorator classes which define convert_bind_param()/convert_result_value() will continue to function. Also supports calling the super() version of those methods.
* use threading.local if availableJason Kirtland2007-08-151-20/+26
| | | | | speed up ThreadLocal for python 2.3 [ticket:743] clean in topo (in patch from [ticket:743])
* mass has_key->__contains__ migration, [ticket:738]Mike Bayer2007-08-151-3/+3
|
* Centralized some `try: import foo except: import other as foo` imports in utilJason Kirtland2007-08-131-2/+7
|
* Added `set_types` to util, a tuple of available set implementations.Jason Kirtland2007-08-081-7/+7
| | | | | | Added BIT and SET ([ticket:674])- all mysql data types are now covered! Fix for YEAR DDL generation, also no longer a concatenable type. Expanded docs for some mysql column esoterica.
* - SessionContext and assignmapper are deprecatedMike Bayer2007-08-011-1/+4
| | | | | | - Session function is removed - all replaced with new sessionmaker() function. description at: http://www.sqlalchemy.org/trac/wiki/WhatsNewIn04#create_sessionSessionContextassignmapperDeprecated
* Stopgap for post- #646 and r3030, wedge in 0.3 Decimals-are-floats behavior ↵Jason Kirtland2007-08-011-0/+16
| | | | for vanilla 2.3 Python.
* Don't set __name__ on py 2.3Jason Kirtland2007-08-011-1/+5
|
* re-jiggered (yes, thats a technical term) DeprecationWarning into ↵Mike Bayer2007-07-311-4/+3
| | | | SADeprecationWarning so that we can set the "once" filter across all SQLAlchemy-originating DeprecationWarnings.
* log-ify warnings module. get rid of one-per-customer deprecationwarning limit.Jonathan Ellis2007-07-301-8/+0
|
* add warnings for deprecated methods and optionsJonathan Ellis2007-07-301-0/+23
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-24/+69
| | | | maintenance branch in branches/rel_0_3.
* - improved ability to get the "correct" and most minimal set of primary keyMike Bayer2007-07-141-1/+11
| | | | | | | columns from a join, equating foreign keys and otherwise equated columns. this is also mostly to help inheritance scenarios formulate the best choice of primary key columns. [ticket:185] - added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
* Merged OrderedDict fixes from r2843 (0.4)Jason Kirtland2007-07-031-27/+36
|
* improved handling of exceptions upon __init__(): will preserve the stackMike Bayer2007-06-301-0/+9
| | | | | trace of the original __init__ exception; errors raised during session.expunge() will be reported as warnings
* - New association proxy implementation, implementing complete proxies to ↵Jason Kirtland2007-05-031-0/+18
| | | | | | list, dict and set-based relation collections (and scalar relations). Extensive tests. - Added util.duck_type_collection
* - docstring improvements in queryGaëtan de Menten2007-04-301-0/+3
| | | | - added support for __getitem__ on OrderedSet
* - fixed textual select elements that got broke the other dayMike Bayer2007-04-291-0/+18
| | | | - docstring work
* - Promoted mysql's dburl query string helper to util + fixedJason Kirtland2007-04-191-0/+11
| | | | | | - Coercing sqlite connect args provided in query string to their expected type (e.g. 'timeout' as float, fixes #544) - Coerce mysql's client_flag to int too
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* - corresponding to label/bindparam name generataion, eager loadersMike Bayer2007-03-291-0/+8
| | | | | generate deterministic names for the aliases they create using md5 hashes.