Commit Graph

  • 14f4c2e72d Adjust ignore list for intro. Jason Kirtland 2007-07-31 23:45:20 +00:00
  • 4ae0ee3022 - commented out auto-rollback of attributes for now, added [ticket:705] with the recipe - added "drop_all()" at the start of all unittest runs; see if that helps some of the carwrecks we have Mike Bayer 2007-07-31 22:54:07 +00:00
  • 16b0c038a1 changed aggregate example functions into some that actually make sense Mike Bayer 2007-07-31 20:33:01 +00:00
  • 53979b8aae exec() has always made me a little queasy... Mike Bayer 2007-07-31 20:16:52 +00:00
  • 7c2a042b5d re-jiggered (yes, thats a technical term) DeprecationWarning into SADeprecationWarning so that we can set the "once" filter across all SQLAlchemy-originating DeprecationWarnings. Mike Bayer 2007-07-31 20:12:22 +00:00
  • 8f17efd7a3 - assurances that context.connection is safe to use by column default functions, helps proposal for [ticket:703] Mike Bayer 2007-07-31 17:15:36 +00:00
  • 098b471c88 tweaks Mike Bayer 2007-07-31 16:56:26 +00:00
  • e32d37081f intro... Mike Bayer 2007-07-31 15:24:10 +00:00
  • 9c31abf1d3 - restored old assign_mapper monkey patched query methods but with two differences: * added a deprecation warning * check if a method with that name already exist in the class - more foolproof deprecation warning for scalar kwarg Gaëtan de Menten 2007-07-31 14:54:28 +00:00
  • 04e8a839b4 MetaData can now reflect() all tables in the database en-masse thanks to table_names(). table_names changed to accept an explicit connection ThreadLocalMetaData constructor now takes no arguments. If case_sensitive is needed in a multi-bind context, move it to Table or subclass TLMD to force it. Banished **kwargs from MetaData Lots of class doc and docstring improvements around MetaData and TLMD. Some engine->bind internal naming updates + reorg in schema. MySQL table_names now return Unicode. (Also, a unicode reflect() unit test is needed.) Jason Kirtland 2007-07-31 00:19:23 +00:00
  • a7e81eda73 log-ify warnings module. get rid of one-per-customer deprecationwarning limit. Jonathan Ellis 2007-07-30 23:50:45 +00:00
  • b3c1b32fac add warnings for deprecated methods and options Jonathan Ellis 2007-07-30 23:38:27 +00:00
  • 030554d41b little too happy with the copy/paste there Jonathan Ellis 2007-07-30 22:43:05 +00:00
  • ac541261db crank Mike Bayer 2007-07-30 21:59:09 +00:00
  • 8f63079fce more crankage.... Mike Bayer 2007-07-30 21:30:44 +00:00
  • 2ef7d4173f crankin.... Mike Bayer 2007-07-30 20:03:43 +00:00
  • 47406ca924 test for table_names Jonathan Ellis 2007-07-30 19:14:08 +00:00
  • 6c89138199 docs in progress, new ORM tutorial Mike Bayer 2007-07-30 17:44:35 +00:00
  • 44e0907c2b more explicit doc Gaëtan de Menten 2007-07-30 11:45:56 +00:00
  • 23d1698acc doc reorganize; greater emphasis on overview (just like with 0.1), but still with tutorials (TODO). Mike Bayer 2007-07-30 05:31:40 +00:00
  • cf633e2975 - added Session constructor which turns autoflush/transactional on - Session is used by unitofwork unit test now as well as session.py tests - fixes to table/schema reflection broken last night - doc updates - other unittest fixes Mike Bayer 2007-07-29 20:30:32 +00:00
  • eb6d992b01 bind... Mike Bayer 2007-07-29 18:01:45 +00:00
  • f94d9efecc - removed import of old sqlite module [ticket:654] - removed sqlite version warning, all tests pass 100% with py2.5's older sqlite lib - fixed dynamic test for py2.5 Mike Bayer 2007-07-29 17:39:37 +00:00
  • 6a1d279a9a Big MySQL dialect update, mostly efficiency and style. Added TINYINT [ticket:691]- whoa, how did that one go missing for so long? Added a charset-fixing pool listener. The driver-level option doesn't help everyone with this one. New reflector code not quite done and omiited from this commit. Jason Kirtland 2007-07-29 16:13:23 +00:00
  • c9cc90bbdc Finish table_names. Jason Kirtland 2007-07-29 05:49:55 +00:00
  • cbb9e7f191 add table_names() for mysql. maybe it works. Jonathan Ellis 2007-07-29 04:23:32 +00:00
  • 38e8793759 r/m information_schema from pg Jonathan Ellis 2007-07-29 04:21:09 +00:00
  • a9a1f912fd engine.table_names() Jonathan Ellis 2007-07-29 04:15:14 +00:00
  • e9d6a5eb3e version warning Mike Bayer 2007-07-29 04:11:55 +00:00
  • c838a98102 fixed 'column_literal' to 'literal_column' [ticket:626] Mike Bayer 2007-07-29 03:09:49 +00:00
  • 9b1ccb29d4 clearer error for ForeignKey cant locate parent table, [ticket:565] Mike Bayer 2007-07-29 02:26:42 +00:00
  • 45650694ee fixed pydoc bug in [ticket:564] Mike Bayer 2007-07-29 02:13:29 +00:00
  • 82515ea2fc -fixed [ticket:555] - fixed attribute glitch breaking the build Mike Bayer 2007-07-29 01:16:01 +00:00
  • 33fa7019fb - removed auto_close_cursors and disallow_open_cursors arguments from Pool; reduces overhead as cursors are normally closed by ResultProxy and Connection. Mike Bayer 2007-07-29 00:42:49 +00:00
  • 9f10023179 Added pool hooks for connection creation, check out and check in. Jason Kirtland 2007-07-28 19:51:55 +00:00
  • 7a0a1cbc81 remove print Mike Bayer 2007-07-28 05:23:57 +00:00
  • c23320f09a - trimming down redundancy in lazyloader code - fixups to ORM test fixture code - fixup to dynamic realtions, test for autoflush session, delete-orphan - made new dynamic_loader() function to create them - removed old hasparent() call on AttributeHistory Mike Bayer 2007-07-28 05:16:03 +00:00
  • e9155b6138 Got basic backrefs going with dynamic attributes Jason Kirtland 2007-07-28 00:33:59 +00:00
  • 3f1c33cdc7 - an experimental feature that combines a Query with an InstrumentedAttribute, to provide "always live" results in conjunction with mutator capability Mike Bayer 2007-07-27 23:02:20 +00:00
  • d43fbfb93a removed LONG_STRING, LONG_BINARY from "binary" types, [ticket:622] Mike Bayer 2007-07-27 22:52:58 +00:00
  • f02aab451c Added some collections slicing tests that somehow escaped the r3040 commit. Jason Kirtland 2007-07-27 22:40:38 +00:00
  • 274ec6d6ed mention include_columns in docs; see #561 Jonathan Ellis 2007-07-27 22:36:37 +00:00
  • 34360bff78 added distinct positional dictionary arg to query.params(), fixes [ticket:690] Mike Bayer 2007-07-27 21:10:12 +00:00
  • a4169b03b3 Fix testing. Really. Jason Kirtland 2007-07-27 20:27:20 +00:00
  • e9f51b2456 Fix coverage again- try really hard not to load anything from lib/ until after the coverage hook runs. Jason Kirtland 2007-07-27 20:21:36 +00:00
  • 4c260b351d some comments, pragma no cover on some deprecated query methods Mike Bayer 2007-07-27 20:12:37 +00:00
  • 2f8ebfef1d - clarified LoaderStrategy implementations, centralized deferred column loading into DeferredColumnLoader (i.e. deferred polymorphic loader) - added generic deferred_load(instance, props) method, will set up "deferred" or "lazy" loads across a set of properties. - mapper post-fetch now uses all deferreds, no more post-selects inside a flush() [ticket:652] Mike Bayer 2007-07-27 18:57:02 +00:00
  • 8db97dad98 fixed glitch in Select visit traversal, fixes #693 Mike Bayer 2007-07-27 16:46:11 +00:00
  • 7252e3d879 Fixed that old inconsistency (person VS employee) in the joined-table inheritance docs Gaëtan de Menten 2007-07-27 08:20:34 +00:00
  • 2dd8c4e7b6 added an order by attempting to get buildbot 100% Mike Bayer 2007-07-27 05:07:05 +00:00
  • 5b7363c338 - merged ants' derived attributes example from 0.4 branch - disabled PG schema test for now (want to see the buildbot succeed) Mike Bayer 2007-07-27 04:12:07 +00:00
  • ed4fc64bb0 merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to maintenance branch in branches/rel_0_3. Mike Bayer 2007-07-27 04:08:53 +00:00
  • 77dfb81e90 added an example on how to share code between sql predicate construction and instance methods. Ants Aasma 2007-07-27 03:30:49 +00:00
  • e5baa9e66f 0.3 maintenance branch Mike Bayer 2007-07-27 03:22:06 +00:00
  • ff464be3de took out extra exception catch/raise SQLError in places where it would already be SQLError Mike Bayer 2007-07-27 03:15:34 +00:00
  • 1dc74fc138 fixed bad import Mike Bayer 2007-07-26 22:39:21 +00:00
  • 097bd23abd - all oracle testtypes pass in this rev Mike Bayer 2007-07-26 22:34:57 +00:00
  • e979b3cf12 - removed problematic generate_dbapi_typemap() method. its hardcoded just for oracle so far (which needs it the most). Mike Bayer 2007-07-26 22:30:09 +00:00
  • 6da610b89a temporarily disabling genrated type_map which breaks all the othe rdialects Mike Bayer 2007-07-26 22:18:59 +00:00
  • f9faba23b2 - very rudimental support for OUT parameters added; use sql.outparam(name, type) to set up an OUT parameter, just like bindparam(); after execution, values are avaiable via result.out_parameters dictionary. [ticket:507] - dialect.get_type_map() apparently never worked, not sure why unit test seemed to work the first time around. - OracleText doesn't seem to return cx_oracle.LOB. Mike Bayer 2007-07-26 22:09:52 +00:00
  • e0d26f03f6 Um... "ImportError: No module named profile; please install the python-profiler package" Jason Kirtland 2007-07-26 21:12:20 +00:00
  • 9310999f34 - Compiled is just an object now. the ClauseVisitor portion is now specific to ANSICompiler. Mike Bayer 2007-07-26 18:55:57 +00:00
  • e4c99a2c2a - fixed clause_element/expression_element change from preivous checkin - starting to add "out" params for oracle - implemented partial check for "rejoin on conflicting paths" for [ticket:687] Mike Bayer 2007-07-26 18:37:53 +00:00
  • 3a8e235af6 - added a check for joining from A->B using join(), along two different m2m tables. this raises an error in 0.3 but is possible in 0.4 when aliases are used. [ticket:687] Mike Bayer 2007-07-26 18:25:50 +00:00
  • 6bbe6dc24d mssql and test changes from trunk Rick Morrison 2007-07-26 18:18:54 +00:00
  • e753bbd133 added addresses table delete Mike Bayer 2007-07-26 17:47:16 +00:00
  • e5c0fc4372 - added array slice support to row[<index>] [ticket:686] Mike Bayer 2007-07-26 17:45:25 +00:00
  • 28b86bcd4f - fix to oracle table aliasing - added select.prefix_with(), adds arbitrary prefixes to a SELECT's columns clause, [ticket:504] Mike Bayer 2007-07-26 17:37:30 +00:00
  • 02a3be96e8 - changed 'desired_columns' argument to 'include_columns' - made 'include_columns' an explicit argument to Table. I'm trying to avoid the "x can be a foo, or a bar, or a list of dictionaries of hoho's"-type behavior - added unit test, closes [ticket:561] Mike Bayer 2007-07-26 17:11:37 +00:00
  • d918eb8ce8 mssql: indexes are now quoted when dropping from reflected tables [ticket:684] Rick Morrison 2007-07-26 17:05:11 +00:00
  • 1c66e35132 mssql: added support for TIME type (simulated via DATETIME col) [ticket:679] Rick Morrison 2007-07-26 16:51:09 +00:00
  • 778cb994f5 - ANSICompiler now uses its own traversal when compiling, returning a composed string from each visit_XXXX method, so that the full string is compiled at once without using any dictionary storage. dialects modified accordingly. tested on mysql/sqlite/postgres fully, tested with string-only tests for oracle/fb/informix/mssql so far. Mike Bayer 2007-07-26 07:19:37 +00:00
  • 58a0341e7c "You can also specify a list or set of column names to autoload, if you only want to load a subset of the columns in the actual database." Jonathan Ellis 2007-07-26 00:50:07 +00:00
  • d18786096c fix up a docstring and some examples Ants Aasma 2007-07-26 00:01:28 +00:00
  • 51013961ba - removed the ridiculous AbstractDialect do-nothing class - fixup to docstrings Mike Bayer 2007-07-25 23:36:31 +00:00
  • a98e651da4 typo fix (unbreak test suite) Jonathan Ellis 2007-07-25 23:13:48 +00:00
  • 1ef7de461b Really finish proxied list methods. Either these last couple (count, remove, setitem w/ slice) weren't possible in 0.3 and/or I spaced these. Improved messaging on flubbed stepped slice assignment in collection decorators. Jason Kirtland 2007-07-25 22:02:49 +00:00
  • 7b64c4c259 add checks for well-formed ColumnProperty. fixes #683 Jonathan Ellis 2007-07-25 21:17:48 +00:00
  • 9e8671198e add __repr__ for engine, metadata, sqlsoup Jonathan Ellis 2007-07-25 19:05:33 +00:00
  • 0effb191b7 use sha instead of crypt to decrease suckage for windows users. also crypt kinda blows anyway Jonathan Ellis 2007-07-25 19:00:14 +00:00
  • e3908c916e - added unittest for sharding module - fixed shard test/example datatype to "Float" since Numeric behavior has changed - added docstrings to sqlalchemy/orm/__init__.py functions; still need to proof within generated HTML pages/fix errors - added engine.threadlocal to docs, removed old mods.threadlocal Mike Bayer 2007-07-25 18:57:56 +00:00
  • 1fa2017b50 test graceful fallback to lazy loading for cyclical eager load with no join_depth Mike Bayer 2007-07-24 22:31:46 +00:00
  • 2da4d11792 - added has(), like any() but for scalars - added **kwargs to has() and any(), criterion is optional; generate equality criterion against the related table (since we know the related property when has() and any() are used), i.e. filter(Address.user.has(name='jack')) equivalent to filter(Address.user.has(User.name=='jack')) - added "from_joinpoint=False" arg to join()/outerjoin(). yes, I know join() is getting a little crazy, but this flag is needed when you want to keep building along a line of aliased joins, adding query criterion for each alias in the chain. self-referential unit test added. - fixed basic_tree example a little bit Mike Bayer 2007-07-24 22:00:19 +00:00
  • 851524aa59 renamed new scalar() method to as_scalar(), not deprecating normal ClauseElement.scalar()... Mike Bayer 2007-07-24 20:18:32 +00:00
  • 6b776ad1de restored Float's full constructor to play better with overriding types, i.e. mysql.MSFloat Mike Bayer 2007-07-24 20:08:20 +00:00
  • 0f7e7c3a6e - deprecated scalar=True argument on select(). its replaced by select().scalar() which returns a _ScalarSelect object, that obeys the ColumnElement interface fully - removed _selectable() method. replaced with __selectable__() as an optional duck-typer; subclassing Selectable (without any __selectable__()) is equivalent - query._col_aggregate() was assuming bound metadata. ick ! - probably should deprecate ClauseElement.scalar(), in favor of ClauseElement.execute().scalar()... otherwise might need to rename select().scalar() Mike Bayer 2007-07-24 20:05:10 +00:00
  • 782e578a41 - Numeric and Float types now have an "asdecimal" flag; defaults to True for Numeric, False for Float. when True, values are returned as decimal.Decimal objects; when False, values are returned as float(). the defaults of True/False are already the behavior for PG and MySQL's DBAPI modules. [ticket:646] Mike Bayer 2007-07-24 16:36:14 +00:00
  • a095e8d0ce - ColumnCollection (i.e. the 'c' attribute on tables) follows dictionary semantics for "__contains__" [ticket:606] Mike Bayer 2007-07-24 15:43:32 +00:00
  • 91803812e8 - a rudimental sharding (horizontal scaling) system is introduced. This system uses a modified Session which can distribute read and write operations among multiple databases, based on user-defined functions defining the "sharding strategy". Instances and their dependents can be distributed and queried among multiple databases based on attribute values, round-robin approaches or any other user-defined system. [ticket:618] Mike Bayer 2007-07-24 04:05:55 +00:00
  • 42f8aae98d deprecated extra arguments on instances() Mike Bayer 2007-07-23 22:47:52 +00:00
  • bd19700161 removed methods instance_key(), identity_key(), identity() Mike Bayer 2007-07-23 22:44:12 +00:00
  • 5130d25fd1 - joined-table inheritance will now generate the primary key columns of all inherited classes against the root table of the join only. This implies that each row in the root table is distinct to a single instance. If for some rare reason this is not desireable, explicit primary_key settings on individual mappers will override it. Mike Bayer 2007-07-23 22:20:44 +00:00
  • 47f36041de Oops, --log-{info,debug}= args need to accept values... Jason Kirtland 2007-07-23 22:05:46 +00:00
  • c482122d6a patched fix for [ticket:677], thanks ! Mike Bayer 2007-07-23 21:01:13 +00:00
  • 0a4d9f9a8f ColumnDefault functions pass ExecutionContext to callables which accept a single argument; refactored workings of defaults so that they share the same execution context. Mike Bayer 2007-07-23 20:56:27 +00:00
  • 555cb454f5 _ConnectionRecord gains a .properties collection, with contents scoped to the lifetime of the underlying DBAPI connection. Accessors on Connections and fairies. Jason Kirtland 2007-07-23 20:32:19 +00:00
  • 344890e467 corrected literals_as_binds to recognize sql.Operators objects for [ticket:675] Mike Bayer 2007-07-23 19:53:16 +00:00
  • 24c98dc697 Rearrange profiling a bit Jason Kirtland 2007-07-23 16:04:37 +00:00
  • a9d93d7467 - refinement of connection.execute() , parameter processing behavior - Connection's dealings with params are simplified; generation of ClauseParameters pushed into DefaultDialect. - simplified ClauseParameters. - this is to make room for execute_raw() but I haven't decided how that should look yet. Mike Bayer 2007-07-23 15:52:09 +00:00
  • 586e8b2374 Finished up the workflow in ormsession test Jason Kirtland 2007-07-23 05:57:05 +00:00