Commit Graph

1087 Commits

Author SHA1 Message Date
Mike Bayer ecb5b87c19 refactor to engine to have a separate SQLSession object. allows nested transactions.
util.ThreadLocal __hasattr__ method/raise_error param meaningless, removed
renamed old engines test to reflection
2006-03-17 02:15:09 +00:00
Mike Bayer 53527a8a07 fixes to function/property formatting 2006-03-17 01:01:34 +00:00
Mike Bayer 550cb31999 SQLSession..... 2006-03-17 01:01:15 +00:00
Mike Bayer 568fe87572 factored objectstore into two packages, one more public facing the other more to be *feared* ! :) 2006-03-17 00:48:12 +00:00
Mike Bayer c3e614abd2 John Dell'Aquila's patch which fixes [ticket:103] [ticket:105], selecting primary keys properly and using the ALL_* instead of USER_* tables 2006-03-16 23:55:00 +00:00
Mike Bayer 7eedf88370 expanded and integrated qvx's patch for dotted function names 2006-03-16 23:38:14 +00:00
Mike Bayer c858ba70b1 reorganized SingletonThreadPool to return distinct connections in the same thread; use_threadlocal behavior is now switchable 2006-03-16 19:09:53 +00:00
Mike Bayer 0fb425ac1f added txt2myt.py to the genhtml/runhtml scripts, added exception if required modules arent found.
edited tutorial.txt, added particles, etc.
added clue that firebird might be supported to dbengine.myt
2006-03-16 19:08:35 +00:00
Mike Bayer 49064f9b1e J. Ellis' "Simple" ORM module...for Spyce ! (and others...) 2006-03-16 17:48:51 +00:00
Alexey Shamrin 33e30aacc3 Tutorial draft (not finished) and documentation framework improvements
* a first step to a new documentation framework, using Markdown syntax, with
  some extensions (detailed in txt2myt.py docstrings):
  * `rel:something` for internal links
  * `{@name=something}` to override default header names (used when linking)
  * `{python}` to force code block to use Python syntax highlighting (not
     needed when using examples with `>>>` prompt)
* txt2myt.py -- converter from .txt to .myt
* a draft of tutorial.txt, which uses new syntax
* testdocs.py -- check examples in documentation using doctest (currently only
  in tutorial.txt)
2006-03-15 13:39:11 +00:00
Mike Bayer 7f98b58c87 added unique_connection() method to engine, connection pool to return a connection
that is not part of the thread-local context or any current transaction
2006-03-14 19:51:03 +00:00
Mike Bayer bbf9f191ec fixed attributes bug where if an object is committed, its lazy-loaded list got
blown away if it hadnt been loaded
2006-03-14 16:56:05 +00:00
Mike Bayer fc43d50cec formatting... 2006-03-14 16:49:15 +00:00
Mike Bayer a9f83cf3a6 removed redundant is_dirty function 2006-03-14 16:24:12 +00:00
Mike Bayer c081749aa6 more notes, docs rel_0_1_4 2006-03-13 17:32:13 +00:00
Mike Bayer c5bc99b8cb tweak 2006-03-13 17:18:03 +00:00
Mike Bayer ae15f93f8d added scalar subqueries within the column clause of another select 2006-03-13 17:16:52 +00:00
Alexey Shamrin 989f77bc4b Fix docstring and exception message in selectone_by 2006-03-13 07:16:53 +00:00
Alexey Shamrin 1e5495943b Minor typo: encode and decode are methods. 2006-03-13 07:05:00 +00:00
Alexey Shamrin eebf468b35 Fix typos, closing #89, #91, #92 2006-03-13 06:51:47 +00:00
Mike Bayer 16d21f6401 added selectfirst_by/selectone_by, selectone throws exception if more than one row returned, courtesy J.Ellis 2006-03-13 02:53:51 +00:00
Mike Bayer 4ab782cb0e tweak to get_direction, rolls back a comparison of "foreigntable" to "parent"/"mapper" table to be more constrained. this change was originally in [changeset:1101] to help out the polymorph example but it now works without it. the change breaks the Post/Comment relationship in the ZBlog demo since the Post mapper has the comments table inside of it (also with no workaround). 2006-03-13 02:39:52 +00:00
Mike Bayer 479903bebf caveat 2006-03-13 02:04:13 +00:00
Mike Bayer 1fc3d22655 oracle is requiring dictionary params to be in a clean dict, added conversion
some fixes to unit tests
2006-03-13 02:00:21 +00:00
Mike Bayer a579e8f687 small tweak to select in order to fix [ticket:112]...the exported columns when doing select on a select() will be the column names, not the keys. this is with selects that have use_labels=False. which makes sense since using the "key" and not the name implies a label has to be used. 2006-03-13 01:13:47 +00:00
Mike Bayer 8690e2e303 tweak to mysql default test 2006-03-13 01:06:33 +00:00
Mike Bayer c5e1abc7f7 refactor to Compiled.get_params() to return new ClauseParameters object, a more intelligent bind parameter dictionary that does type conversions late and preserves the unconverted value; used to fix mappers not comparing correct value in post-fetch [ticket:110]
removed pre_exec assertion from oracle/firebird regarding "check for sequence/primary key value"
fix to Unicode type to check for null, fixes [ticket:109]
create_engine() now uses genericized parameters; host/hostname, db/dbname/database, password/passwd, etc. for all engine connections
fix to select([func(column)]) so that it creates a FROM clause to the column's table, fixes [ticket:111]
doc updates for column defaults, indexes, connection pooling, engine params
unit tests for the above bugfixes
2006-03-13 00:24:54 +00:00
Mike Bayer 2ce45d70c7 added expire() function + unit test fixes [ticket:95] 2006-03-10 05:03:17 +00:00
Mike Bayer d333168e00 utf-8 encoding is switchable at the engine level, ticket [ticket:101] 2006-03-10 04:47:38 +00:00
Mike Bayer 612205c3fd committed patch for MSDouble/tinyint from [ticket:106] 2006-03-10 04:35:34 +00:00
Mike Bayer 05737ef9fa added exception import 2006-03-10 04:26:35 +00:00
Mike Bayer be4373c92d HistoryArrayList checks internal list as a list or dict to clear it 2006-03-10 04:22:59 +00:00
Mike Bayer 3f620ec490 overhaul to types system, decoupled base type and engine-specific type into a composed pattern instead of goofy inheritance....gets rid of TypeDecorator (now a no-op) and enables all inhertance 2006-03-09 18:30:27 +00:00
Mike Bayer 5207bd4c52 fixed assocaition example 2006-03-09 15:54:44 +00:00
Mike Bayer b5060e88ff added 'noninherited table' prop to mapper indicating the "lead" table, in the case of
inheritance.  relations now create priamry/secondary joins against that lead table.  if you want to create it against
an inherited table, use explicit join conditions.
added 'correlate' argument to CompoundSelect to get polymorph example working again.
2006-03-09 00:24:15 +00:00
Mike Bayer f057ed6136 a few tweaks to get table creates/reflection working
table names are always reflected back as having lowercase names
2006-03-08 22:32:55 +00:00
Mike Bayer 6f3bd2b0d4 tweak to engine param.. 2006-03-08 22:11:51 +00:00
Mike Bayer ef6d2c0cf5 added identity() method to mapper, to help get the primary key of an instance. 2006-03-08 21:55:33 +00:00
Mike Bayer 376f4af318 added check to relation that will see if the same table is included between the primaryjoin and secondaryjoin, and raises a descriptive exception if so. 2006-03-08 21:39:53 +00:00
Mike Bayer 06b8c73ad5 serious overhaul to get eager loads to work inline with an inheriting mapper, when the inheritance/eager loads share the same table. mapper inheritance will also favor the columns from the child table over those of the parent table when assigning column values to object attributes. "correlated subqueries" require a flag "correlated=True" if they are in the FROM clause of another SELECT statement, and they want to be correlated. this flag is set by default when using an "exists" clause. 2006-03-08 20:51:51 +00:00
Mike Bayer 3aa4dd6f2b took erroneous 'count' off Alias 2006-03-08 01:18:26 +00:00
Mike Bayer e29da1e6ce took excess visit_func out, handled by ansisql compiler 2006-03-07 05:46:36 +00:00
Mike Bayer 72a8c3aa22 comment 2006-03-07 03:17:34 +00:00
Mike Bayer ab46fefce2 backref() func will also honor lazy=True/False 2006-03-07 03:16:10 +00:00
Mike Bayer 55ad2dc22a added backref() function, allows the creation of a backref where you also send keyword arguments that will be placed on the relation 2006-03-07 03:14:08 +00:00
Mike Bayer 2d596b61c0 checking in patch for column labels limit at 30 chars...what the heck 2006-03-06 23:15:47 +00:00
Mike Bayer 97b1c3a59a patch on index create syntax to fix [ticket:90] so schema name gets included 2006-03-06 19:09:30 +00:00
Mike Bayer 32aa76601d fixed bug in eager loading on a many-to-one [ticket:96], added the ticket tests as a unit test eagerload2.
got eagerload1 to be a unit test also.
2006-03-06 19:06:06 +00:00
Mike Bayer 34cd446912 sqlite likes OFFSET with LIMIT else its buggy 2006-03-06 17:14:50 +00:00
Mike Bayer 1644a44628 a mapper with inheritance will place itself as "dependent" on the inherited mapper; even though this is not usually needed, it allows certain exotic combinations of mapper setups to work (i.e. the one in the polymorph example) 2006-03-06 03:10:46 +00:00