Commit Graph

  • 0296f9c412 Refactored test support code, moved most into 'testlib/' Cleaned up imports, all tests should be runnable stand-alone or suite now Updated most of the perf tests Removed dead test suites Added new profiling decorator Added new profilable perf test, 'ormsession' to try to capture a typical workload Jason Kirtland 2007-07-23 01:50:54 +00:00
  • 9e5d28f842 added some of the newer query styles to some inheritance tests. more inheritance + new query stuff needs to be tested Mike Bayer 2007-07-22 22:32:58 +00:00
  • afc37cdd26 fixed up testbase coverage to get module-level stuff fixed activemapper tests Mike Bayer 2007-07-22 22:16:15 +00:00
  • 4674e400bc dead Jason Kirtland 2007-07-22 21:52:00 +00:00
  • cb45629abc edits Mike Bayer 2007-07-22 20:19:49 +00:00
  • 341a54a93c removed small cruftlet Mike Bayer 2007-07-22 20:00:12 +00:00
  • 0c7a116971 - fix to _CalculatedClause._copy_internals() behavior so that ClauseAdapter works with _Function objects better - factored AliasedClauses out of EagerLoader into its own unit; Query makes heavy use of it for joins - added support to Query for full interaction between aliased and nonalised joins with appended entities, columns, and externally-mapped columns Mike Bayer 2007-07-22 19:35:46 +00:00
  • 741a6c05d7 Consigned to history. Jason Kirtland 2007-07-22 17:01:25 +00:00
  • 94ea86c195 - got self-referential query.join()/query.outerjoin() to work. - PropertyLoader adds local_side set which is the opposite of remote_side, makes the self-referential aliasing a snap. - added "id" argument to join()/outerjoin() to allow access to the aliased joins in add_entity(). - added "alias" argument to add_entity() to get at entities selected from an explicit Alias - starting to move EagerLoader.AliasedClasues to a general utility function which will be used by Query as well Mike Bayer 2007-07-22 14:07:15 +00:00
  • da72aac465 filter_by([joinpath], ...) is gone. join([path], aliased=True) replaces it, all subsequent filter() criterion is converted against that alias; represents a much more flexible and consistent solution. needs some tweaks and can then work with self-referential loading too. Mike Bayer 2007-07-22 03:26:13 +00:00
  • 364a7a7824 edits Mike Bayer 2007-07-22 03:23:41 +00:00
  • c85e35e3dc Queries now __str__ as their statement Jason Kirtland 2007-07-21 20:03:18 +00:00
  • 2c646c80cc make this test runnable stand-alone Jason Kirtland 2007-07-21 20:00:20 +00:00
  • bdf8f4ca80 postgres cant do this particular test b.c. the default "public" schema is taken as a blank "schema" argument on Table rel_0_3_10 Mike Bayer 2007-07-20 21:01:51 +00:00
  • e7182af8f1 - merged bind unittest fix from r2999 Mike Bayer 2007-07-20 20:27:27 +00:00
  • 9aa1b946ed hopefully resolved all the PG deadlocks occuring here Mike Bayer 2007-07-20 20:22:35 +00:00
  • c75ff59fc5 - added query.populate_existing().. - marks the query to reload all attributes and collections of all instances touched in the query, including eagerly-loaded entities [ticket:660] Mike Bayer 2007-07-20 20:02:41 +00:00
  • 834c0e9056 Merged lower case caching, fetching from r2955 Be sure to close rows fetched in reflection (if not autoclosed) Fixed bind test, needed transactional storage engine for mysql Jason Kirtland 2007-07-20 19:43:46 +00:00
  • 9e2aac2a77 merged most recent overflow mutex tweak Mike Bayer 2007-07-20 18:58:46 +00:00
  • 794c43c5ae further adjustment to pool.get Mike Bayer 2007-07-20 18:35:51 +00:00
  • 8da43f42c0 dont clobber existing methodnames, [ticket:596] Mike Bayer 2007-07-20 17:17:46 +00:00
  • 172ba37229 implemented Class.any(criterion) Mike Bayer 2007-07-20 17:00:53 +00:00
  • a4ec7c80ee changed assignmapper API per [ticket:636] Mike Bayer 2007-07-20 16:52:00 +00:00
  • d1a776efed merged pool fix from [changeset:2989] and timeout fix from [changeset:2990] Mike Bayer 2007-07-20 15:42:46 +00:00
  • c1bf74462f assert timeout is 3 seconds, not 2 Mike Bayer 2007-07-20 15:41:42 +00:00
  • 687d9342e6 - a new mutex that was added in 0.3.9 causes the pool_timeout feature to fail during a race condition; threads would raise TimeoutError immediately with no delay if many threads push the pool into overflow at the same time. this issue has been fixed. Mike Bayer 2007-07-20 15:10:56 +00:00
  • 0836f5cdfd - Eager loading now functions at any arbitrary depth along self-referential and cyclical structures. When loading cyclical structures, specify "join_depth" on relation() indicating how many times you'd like the table to join to itself; each level gets a distinct table alias. - adds a stack to the Mapper->eagerloader->Mapper process which is the single point of tracking the various AliasedClause objects both at query compile time as well as result fetching time. self-referential relationships narrow down the "aliasing" of tables more sharply so as to produce the correct eager joins in those cases without stepping on more generalized cases. the mechanism of detecting "too deep" of an eager load now works based on locating a true cycle, but only if join_depth is not specified; otherwise join_depth is used. [ticket:659] Mike Bayer 2007-07-20 03:20:33 +00:00
  • c4b081cc1d Merged reference fixes from r2986 Jason Kirtland 2007-07-19 23:46:37 +00:00
  • 6318b43408 Remove unused imports, typo and light formatting tweaks. Fixed comparison of _UnaryExpressions Jason Kirtland 2007-07-19 23:13:23 +00:00
  • 819c944a9a Remove mysql enum out of range test, not really needed and seems WAY too dependent on server version Jason Kirtland 2007-07-19 22:56:04 +00:00
  • a0e9e333fc small fix to detect a "scalar" query when constructing columns clauses Mike Bayer 2007-07-19 21:02:36 +00:00
  • 7fed906a9b Better quoting of identifiers when manipulating schemas Merged from r2981 Jason Kirtland 2007-07-19 20:44:19 +00:00
  • e9da3425e4 - changed set used to generate FROM list to an ordered set; may fix [ticket:669] - improvements to select generative capability, ClauseAdapter - one select test is failing, but not from this checkin Mike Bayer 2007-07-19 20:36:51 +00:00
  • a72897f9aa Better quoting of identifiers when manipulating schemas. Jason Kirtland 2007-07-19 19:24:51 +00:00
  • 4a19dac458 info on db-specific types Mike Bayer 2007-07-19 16:59:21 +00:00
  • e45932dde2 added info on DB types Mike Bayer 2007-07-19 16:58:47 +00:00
  • f2812d3744 docstrings Mike Bayer 2007-07-19 16:05:29 +00:00
  • daf74523f3 removed ancient group_parenthesized() method, its purpose handled by _Grouping now Mike Bayer 2007-07-19 15:57:20 +00:00
  • 06486580c3 fixed LIKE/BEWTEEN operators Mike Bayer 2007-07-19 07:21:50 +00:00
  • 459dcfb472 removed print statement...this is the year i start using a debugger Mike Bayer 2007-07-19 07:17:01 +00:00
  • 95d2771c6f - all "type" keyword arguments, such as those to bindparam(), column(), Column(), and func.<something>(), renamed to "type_". those objects still name their "type" attribute as "type". - new SQL operator implementation which removes all hardcoded operators from expression structures and moves them into compilation; allows greater flexibility of operator compilation; for example, "+" compiles to "||" when used in a string context, or "concat(a,b)" on MySQL; whereas in a numeric context it compiles to "+". fixes [ticket:475]. - major cruft cleanup in ANSICompiler regarding its processing of update/insert bind parameters. code is actually readable ! - a clause element embedded in an UPDATE, i.e. for a correlated update, uses standard "grouping" rules now to place parenthesis. Doesn't change much, except if you embed a text() clause in there, it will not be automatically parenthesized (place parens in the text() manually). Mike Bayer 2007-07-19 07:11:55 +00:00
  • 5e7b01166c Target testcreate schema test better. Jason Kirtland 2007-07-19 01:23:01 +00:00
  • 65121ca59e Clarity fix for assocproxy example code Jason Kirtland 2007-07-18 23:25:07 +00:00
  • 25a5468f4f .pop() on association proxies is no longer problematic with 0.4 collections. Jason Kirtland 2007-07-18 22:19:12 +00:00
  • 1f1bc09234 - unittest cleanup: after removal of threadlocal mod + changes to session calling signature, got sqlite, postgres, mysql all working again (one unresolved failure for mysql) Mike Bayer 2007-07-18 21:00:14 +00:00
  • 2a492db506 partial progress on adding prop.compare(), new behavior for prop == Mike Bayer 2007-07-18 20:07:25 +00:00
  • dbd566b6c1 added some aggregate tests Mike Bayer 2007-07-18 19:37:10 +00:00
  • f22b03f9ae - merged fix of PG identifier length from 68 to 63 [ticket:571] - merged r2958, commutativity for _BinaryExpression.compare Mike Bayer 2007-07-18 19:06:10 +00:00
  • 7f3bb10cb6 - merged some more of the SessionTransaction connection-bound checks from 0.4 - _BinaryExpression.compare() checks for a base set of "commutative" operators and checks for itself in reverse if so - added ORM-based unit test for the above, fixes [ticket:664] Mike Bayer 2007-07-18 18:51:35 +00:00
  • 68f706b5ba - foreign key specs can have any chararcter in their identifiers [ticket:667] Mike Bayer 2007-07-18 18:32:48 +00:00
  • 1caa97ac62 - put a generic regexp for chopping foreign key specs along the "." [ticket:667] Mike Bayer 2007-07-18 18:30:01 +00:00
  • d0910b2275 - Merged r2945, r2946, r2947 from trunk - Cache 'lower_case_table_names' test for the lifetime of a connection - Clean up compat fetch stuff Jason Kirtland 2007-07-18 07:34:43 +00:00
  • 3f1c5016af typo Mike Bayer 2007-07-17 22:50:17 +00:00
  • 567d5ca2d3 - changed the order of args to session.execute(), session.scalar() - removed session.connect(). theres only connection() - implemented twophase flag on session, twophase calls within SessionTransaction, one unit test so far which tests that it succeeds (but doesnt test a failure yet or do any mocking) - rewrote session transaction docs Mike Bayer 2007-07-17 22:38:54 +00:00
  • aa299318a9 Properly escape table names when reflecting for mssql and sqlite [ticket:653] Paul Johnston 2007-07-17 22:32:16 +00:00
  • 0c578f31b6 Rewrote association proxy documentation to be more accessible and promote the general awesomeness of association proxies. Jason Kirtland 2007-07-17 22:18:10 +00:00
  • 0b3e7577c7 - removed ancient threadlocal/legacy_session mods - Session now has tranasaction API built into it, SessionTransaction not part of the usual API now (but still does the work) - integrated nested transactions/SAVEPOINT with Session transactional system - Session gets "transactional" mode, it always begins a transaction and reopens after commit/rollback - Session gets "autoflush=True" flag, implies "transactional", issues a flush before the execution of every query so that query results include whatever is currently in the session - various unit test fixes Mike Bayer 2007-07-17 20:38:57 +00:00
  • a966505992 Properly escape table names when reflecting for mssql and sqlite [ticket:653] Paul Johnston 2007-07-17 20:13:36 +00:00
  • 1dba9d48c2 bind/connectable compat, allow .bind = None fix import for DBAPIError raise Jason Kirtland 2007-07-17 16:54:34 +00:00
  • 7e1cf0cef4 Minor cleanups. Jason Kirtland 2007-07-17 13:56:50 +00:00
  • 378bf5b2fc Be specfic when detecting "no table" exceptions. Jason Kirtland 2007-07-17 13:40:44 +00:00
  • 23d0188749 - Added basic schema reflection coverage to main tests - Fix stupid mysql typo (#662) - Merged mysql osx/multibyte has_table from 0.4 (r2943) Jason Kirtland 2007-07-17 13:21:46 +00:00
  • 6506939352 - fixed max identifier length on postgres (63) [ticket:571] - fixed doc typo ("in_" operator) - misc indent stuff Gaëtan de Menten 2007-07-17 09:00:25 +00:00
  • b58097dfde - Adjust has_table for MySQL, workaround multibyte issue on osx Jason Kirtland 2007-07-17 06:22:58 +00:00
  • 76aad5c7ef another order_by fix Mike Bayer 2007-07-17 05:05:30 +00:00
  • cc9292be84 - got in_() working, enhanced sql.py treatment of Comparator so comparators can be used in any SQL expression (i.e. order bys, desc(), etc.) - adding various tests for new clause generation Mike Bayer 2007-07-17 04:54:30 +00:00
  • bd3816a1fd - added operator support to class-instrumented attributes. you can now filter() (or whatever) using <classname>.<attributename>==<whatever>. for column based properties, all column operators work (i.e. ==, <, >, like(), in_(), etc.). For relation() and composite column properties, ==<instance>, !=<instance>, and ==<None> are implemented so far. [ticket:643] Mike Bayer 2007-07-17 04:25:09 +00:00
  • 9ff169028d - moved query._with_parent into prop.compare() calls - built extensible operator framework in sql package, ORM builds on top of it to shuttle python operator objects back down to the individual columns. no relation() comparisons yet. implements half of [ticket:643] Mike Bayer 2007-07-17 01:14:33 +00:00
  • c8acf825ce Ignore generated doc build artifacts Jason Kirtland 2007-07-17 01:10:35 +00:00
  • 7cd1465300 Tweak collections doc to fit in with long-lines club. Jason Kirtland 2007-07-17 01:05:35 +00:00
  • 9617aa16e6 - Finish collections doc changes started in r2839, expanding coverage in main documentation and docstrings. - Per list discussion, removed backward compat. for dict- and object-derived collection types. This is the safest course of action given the major change in dict iterator behavior. - Minor typos and code cleanups. Jason Kirtland 2007-07-17 00:41:45 +00:00
  • 1879b3799b removed get_str(), get_from_text() from ansicompiler. removes a few hundred method calls Mike Bayer 2007-07-16 22:05:08 +00:00
  • 8d5f048d8a regexp searches for negative decimals too Mike Bayer 2007-07-16 21:35:46 +00:00
  • a3f25674fc - fixes for connection bound sessions, connection-bound compiled objects via metadata Mike Bayer 2007-07-16 21:29:27 +00:00
  • 1978553803 When testing unicode for MySQL, ensure the connection is utf8 Jason Kirtland 2007-07-16 21:23:51 +00:00
  • a1f274c72f fix to connection-bound compiled objects Mike Bayer 2007-07-16 21:22:17 +00:00
  • 56fe7f8cb7 fix to SessionTransaction so it holds onto a Connection properly Mike Bayer 2007-07-16 21:01:23 +00:00
  • f6044803eb few more tweaks for the aliasing change Mike Bayer 2007-07-16 20:33:31 +00:00
  • be68a8e306 - converted all anonymous labels and aliases to be generated within the compilation phase. this allows fully "deterministic" label generation. theres a couple of unit test failures that need to be fixed but most are passing. - also some tweaks to unicode result column names; no longer chopping out characters from the names, since the name might be composed of all non-ascii characters. mysql needs some work here since its returning, i think, the unicode's internally-encoded bytes directly within a bytestring. - need to simplify the amount of dictionaries present in ANSICompiler, its pretty hard to follow at this point. Mike Bayer 2007-07-16 18:55:05 +00:00
  • 3f73c4c912 removed some remaining "connectable"/"bind_to" keywords Mike Bayer 2007-07-16 16:39:38 +00:00
  • f593723414 completed connectable/bind_to/engine work for [ticket:645] Mike Bayer 2007-07-16 16:23:00 +00:00
  • 96e3d6b64f merged trunk r2901-2924 Mike Bayer 2007-07-16 16:06:16 +00:00
  • 40ded34819 fixes rel_0_3_9 Mike Bayer 2007-07-15 16:27:42 +00:00
  • d1ddc84e7d fixes Mike Bayer 2007-07-15 16:00:05 +00:00
  • 3a794d36e7 spelling error Mike Bayer 2007-07-15 15:54:20 +00:00
  • 13e1cf09c6 - bind test in query.orm - merged ambiguous colname fix from r2915 Mike Bayer 2007-07-15 15:42:47 +00:00
  • 8cb8daaafe - fixed "ambiguous column" result detection, when dupe col names exist in a result [ticket:657] Mike Bayer 2007-07-15 15:40:09 +00:00
  • 471c3f8102 updated interval type for [ticket:595] Mike Bayer 2007-07-15 15:29:41 +00:00
  • 5804e82215 - added friendlier error checking for query.get() with too-short pk - more docs Mike Bayer 2007-07-15 15:11:05 +00:00
  • 82c4c1fa36 removed prints Mike Bayer 2007-07-15 06:02:55 +00:00
  • 9cc7d73ea1 - more docs - got from_statement() to actually work with query, tests were not covering - added auto-labeling of anonymous columns sent to add_column(), tests Mike Bayer 2007-07-15 06:02:03 +00:00
  • d92489fd2a - more docs - some more query tests - removed warnings from testbase to appease the buildbots Mike Bayer 2007-07-15 05:23:32 +00:00
  • 3a9af19d14 - columns can be overridden in a reflected table with a "key" attribute different than the column's name, including for primary key columns [ticket:650] - more docs Mike Bayer 2007-07-15 04:50:11 +00:00
  • e40a6183a0 - fixed unicode conversion in Oracle TEXT type Mike Bayer 2007-07-15 04:24:41 +00:00
  • 6566427fd0 - converts cx_oracle datetime objects to Python datetime.datetime when Python 2.3 used [ticket:542] Mike Bayer 2007-07-15 04:11:51 +00:00
  • 5e93bb7152 - mod operator '%' produces MOD [ticket:624] Mike Bayer 2007-07-15 03:59:38 +00:00
  • ecc963ff88 - more docs - query will unique tupled results - fixed [ticket:605] which is for psycopg1 anyway... Mike Bayer 2007-07-15 03:52:13 +00:00
  • 751d2b340b more query methods, overhauliung docs for forwards 0.4 method Mike Bayer 2007-07-15 01:50:27 +00:00
  • 1a840730c2 added some text tests Mike Bayer 2007-07-15 00:25:18 +00:00
  • 60f60b9a60 - merged trunk r2880-r2901 (slightly manually for 2900-2901) - merges "bind" argument change - merges join fixes for [ticket:185] - removed all "engine"/"connectable"/"bind_to"/"engine_or_url" arguments/attributes Mike Bayer 2007-07-14 23:36:17 +00:00