Mike Bayer [Tue, 17 Mar 2009 15:15:10 +0000 (15:15 +0000)]
- Fixed SQLite reflection methods so that non-present
cursor.description, which triggers an auto-cursor
close, will be detected so that no results doesn't
fail on recent versions of pysqlite which raise
an error when fetchone() called with no rows present.
Mike Bayer [Thu, 29 Jan 2009 16:10:08 +0000 (16:10 +0000)]
- The per-dialect cache used by TypeEngine to cache
dialect-specific types is now a WeakKeyDictionary.
This to prevent dialect objects from
being referenced forever for an application that
creates an arbitrarily large number of engines
or dialects. There is a small performance penalty
which will be resolved in 0.6. [ticket:1299]
Michael Trier [Mon, 10 Nov 2008 04:37:08 +0000 (04:37 +0000)]
Handle the mssql port properly. If we're using the SQL Server driver then use the correct host,port syntax, otherwise use the Port= parameter in the connection string. Fixes #1192. Also backports support to handle custom connection string arguments.
Mike Bayer [Wed, 5 Nov 2008 19:08:02 +0000 (19:08 +0000)]
- Fixed RLock-related bug in mapper which could deadlock upon
reentrant mapper compile() calls, something that occurs when
using declarative constructs inside of ForeignKey objects.
Ported from 0.5.
Mike Bayer [Sun, 12 Oct 2008 14:39:11 +0000 (14:39 +0000)]
- String's (and Unicode's, UnicodeText's, etc.) convert_unicode
logic disabled in the sqlite dialect, to adjust for pysqlite
2.5.0's new requirement that only Python unicode objects are
accepted;
http://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html
Mike Bayer [Thu, 31 Jul 2008 15:02:40 +0000 (15:02 +0000)]
- added an extremely rudimental set of python 2.3 compatible tests. these
can at least confirm that we're even on the grid python 2.3-wise.
- fixed usage of native set(), generator expressions
- will release 0.4.7p1
Mike Bayer [Sat, 26 Jul 2008 16:23:14 +0000 (16:23 +0000)]
- Class-bound attributes sent as arguments to
relation()'s remote_side and foreign_keys parameters
are now accepted, allowing them to be used with
declarative (and therefore self-referential many-to-one
relations); merged from 0.5.
Mike Bayer [Sat, 19 Jul 2008 15:47:21 +0000 (15:47 +0000)]
- Added a new SessionExtension hook called after_attach().
This is called at the point of attachment for objects
via save(), update(), delete(), and merge()
(backported from 0.5).
Mike Bayer [Wed, 9 Jul 2008 18:30:07 +0000 (18:30 +0000)]
- Merged 0.5's declarative behavior such that all
Column and MapperProperty objects keep a state
variable indicating their creation order, which
declarative_base() maintains when generating
Table constructs.
Mike Bayer [Wed, 2 Jul 2008 18:26:58 +0000 (18:26 +0000)]
- add SLFloat type, which matches the SQLite REAL
type affinity. Previously, only SLNumeric was provided
which fulfills NUMERIC affinity, but that's not the
same as REAL.
Mike Bayer [Sun, 22 Jun 2008 17:44:35 +0000 (17:44 +0000)]
- The index name generated when you say "index=True"
on a Column is truncated to the length appropriate
for the dialect. Additionally, an Index with a too-
long name cannot be explicitly dropped with
Index.drop(), similar to [ticket:571].
[ticket:820]
Mike Bayer [Sun, 22 Jun 2008 16:53:07 +0000 (16:53 +0000)]
- create_all(), drop_all(), create(), drop() all raise
an error if the table name or schema name contains
more characters than that dialect's configured
character limit. Some DB's can handle too-long
table names during usage, and SQLA can handle this
as well. But various reflection/
checkfirst-during-create scenarios fail since we are
looking for the name within the DB's catalog tables.
[ticket:571]
Mike Bayer [Thu, 12 Jun 2008 03:34:13 +0000 (03:34 +0000)]
- the enable_typechecks=False setting on relation()
now only allows subtypes with inheriting mappers.
Totally unrelated types, or subtypes not set up with
mapper inheritance against the target mapper are
still not allowed.
Mike Bayer [Wed, 4 Jun 2008 19:25:35 +0000 (19:25 +0000)]
- Query.count() will take single-table inheritance
subtypes into account the same way row-based
results do. (ticket:1008]. partial merge of 0.5's r4831.)
Mike Bayer [Sun, 1 Jun 2008 14:08:02 +0000 (14:08 +0000)]
- The contains() operator when used with many-to-many
will alias() the secondary (association) table so
that multiple contains() calls will not conflict
with each other [ticket:1058]
Mike Bayer [Fri, 30 May 2008 20:56:47 +0000 (20:56 +0000)]
- Cursors now have "arraysize" set to 50 by default on
them, the value of which is configurable using the
"arraysize" argument to create_engine() with the
Oracle dialect. This to account for cx_oracle's default
setting of "1", which has the effect of many round trips
being sent to Oracle. This actually works well in
conjunction with BLOB/CLOB-bound cursors, of which
there are any number available but only for the life of
that row request (so BufferedColumnRow is still needed,
but less so). [ticket:1062]
Mike Bayer [Sat, 24 May 2008 17:05:50 +0000 (17:05 +0000)]
get_default_identifier() normalizes the returned name so that it may
by used as the "schema" argument on a Table. Fixes the reflection unit
test that requires this.
Mike Bayer [Thu, 26 Jul 2007 22:09:52 +0000 (22:09 +0000)]
- 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 [Thu, 26 Jul 2007 18:37:53 +0000 (18:37 +0000)]
- 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 [Thu, 26 Jul 2007 17:11:37 +0000 (17:11 +0000)]
- 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 [Thu, 26 Jul 2007 07:19:37 +0000 (07:19 +0000)]
- 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.
Jason Kirtland [Wed, 25 Jul 2007 22:02:49 +0000 (22:02 +0000)]
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.
Mike Bayer [Wed, 25 Jul 2007 18:57:56 +0000 (18:57 +0000)]
- 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 [Tue, 24 Jul 2007 22:00:19 +0000 (22:00 +0000)]
- 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 [Tue, 24 Jul 2007 20:05:10 +0000 (20:05 +0000)]
- 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 [Tue, 24 Jul 2007 16:36:14 +0000 (16:36 +0000)]
- 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]