Commit Graph

4060 Commits

Author SHA1 Message Date
Mike Bayer f03e4ca595 prevent extra nested li items from becoming tiny 2008-11-22 17:46:03 +00:00
Mike Bayer 31450d75e5 - Fixed the import weirdness in sqlalchemy.sql
to not export __names__ [ticket:1215].
2008-11-22 16:09:20 +00:00
Mike Bayer c08192ae5b - Comparison of many-to-one relation to NULL is
properly converted to IS NOT NULL based on not_().
2008-11-21 03:49:36 +00:00
Mike Bayer 7c0ba8028c - Added NotImplementedError for params() method
on Insert/Update/Delete constructs.  These items
currently don't support this functionality, which
also would be a little misleading compared to
values().
2008-11-21 01:21:00 +00:00
Mike Bayer 1b2d7b1096 - the "passive" flag on session.is_modified()
is correctly propagated to the attribute manager.
2008-11-18 16:24:00 +00:00
Mike Bayer c2cbdb2ce0 r5281 knocked down callcounts in 2.5.. 2008-11-17 02:02:42 +00:00
Mike Bayer e1268d4f57 - Query.select_from(), from_statement() ensure
that the given argument is a FromClause,
or Text/Select/Union, respectively.

- Query.add_column() can accept FromClause objects
in the same manner as session.query() can.
2008-11-16 19:33:26 +00:00
Mike Bayer 1ff2b78268 - bump, this may become 0.5.0
- Calling alias.execute() in conjunction with
server_side_cursors won't raise AttributeError.
2008-11-14 22:11:05 +00:00
Mike Bayer 1214e74a38 notes on tuning rel_0_5rc4 2008-11-14 21:36:15 +00:00
Mike Bayer 3e486caaab - switched session.save() to session.add() throughout declarative test
- Fixed PendingDeprecationWarning involving order_by
parameter on relation(). [ticket:1226]
- Unit tests still filter pending deprecation warnings but have a commented-out
line to temporarily disable this behavior.  Tests need to be fully converted
before we can turn this on.
2008-11-14 18:57:24 +00:00
Michael Trier b2a7892b10 Pulled out values test that uses boolean evaluation in the SELECT in order to appropriately flag it as not supported on mssql. I sure hope I didn't jack things up for other dialects. Cleaned up a comment and removed some commented pdb statements. 2008-11-14 03:57:07 +00:00
Michael Trier 61178c5d6d Fixed a problem with the casting of a zero length type to a varchar. It now correctly adjusts the CAST accordingly. 2008-11-14 03:57:04 +00:00
Michael Trier 1227a7674f Fixed up a lot of missing order_by statements in the tests when using offset. A lot of dialects don't really require order_by although you'll get unpredictable results. mssql does require order_by with an offset, so this fixes problems with that dialect. 2008-11-14 03:57:00 +00:00
Michael Trier 43ecc7a581 The str(query) output is also correct on the mssql dialect. 2008-11-14 03:56:55 +00:00
Mike Bayer f3de4d545f - Rearranged the load_dialect_impl() method in
`TypeDecorator` such that it will take effect
even if the user-defined `TypeDecorator` uses
another `TypeDecorator` as its impl.
2008-11-13 20:38:56 +00:00
Mike Bayer 0148adec30 - Can now use a custom "inherit_condition" in
__mapper_args__ when using declarative.
2008-11-12 15:43:17 +00:00
Michael Trier 260c201f65 Corrected mssql schema named subqueries from not properly aliasing the columns. Fixes #973. 2008-11-12 05:36:45 +00:00
Michael Trier 097f76b465 Doing my part-time editorial duties. Normalized session references and fixed lots of small spelling and grammar issues. 2008-11-12 03:05:13 +00:00
Mike Bayer 61db44d958 remove errant pdb.set_trace() 2008-11-11 02:04:56 +00:00
Mike Bayer da0a8b913b - Adjustments to the enhanced garbage collection on
InstanceState to better guard against errors due
to lost state.
2008-11-11 01:52:42 +00:00
Jason Kirtland d403d8b865 Quashed import sets deprecation warning on 2.6.. not wild about this but it seems like it will be ok. [ticket:1209] 2008-11-10 22:56:22 +00:00
Mike Bayer ea12a628e4 - converted some more attributes to @memoized_property in expressions
- flattened an unnecessary KeyError in identity.py
- memoized the default list of mapper properties queried in MapperEntity.setup_context
2008-11-10 20:22:18 +00:00
Mike Bayer eaa359f177 - Restored "active rowcount" fetch before ResultProxy
autocloses the cursor.  This was removed in 0.5rc3.
2008-11-10 16:42:35 +00:00
Mike Bayer 2c5f3e8397 - Restored NotImplementedError on Cls.relation.in_()
[ticket:1140] [ticket:1221]
2008-11-10 16:18:57 +00:00
Michael Trier 306bee4ecd 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. 2008-11-10 04:29:53 +00:00
Michael Trier 6a9b2cb683 Flagged another transaction test as causing mssql to hang. Need to look into these. 2008-11-10 01:11:46 +00:00
Michael Trier d360fd7fe3 Corrected issue with decimal e notation that broke regular decimal tests for mssql. 2008-11-10 01:11:43 +00:00
Michael Trier a8cd5cfd39 If there's a zero offset with mssql just ignore it. 2008-11-10 01:11:40 +00:00
Michael Trier 69cc4e3232 Corrected problem in access dialect that was still referring to the old column.foreign_key property. 2008-11-10 01:11:37 +00:00
Mike Bayer e31c5326c4 flattened _get_from_objects() into a descriptor/class-bound attribute 2008-11-09 21:34:59 +00:00
Mike Bayer 0cff22720b - Removed the 'properties' attribute of the
Connection object, Connection.info should be used.
- Method consoliation in Connection, ExecutionContext
2008-11-09 19:32:25 +00:00
Mike Bayer 043379efa5 - Query.count() has been enhanced to do the "right
thing" in a wider variety of cases. It can now
count multiple-entity queries, as well as
column-based queries. Note that this means if you
say query(A, B).count() without any joining
criterion, it's going to count the cartesian
product of A*B. Any query which is against
column-based entities will automatically issue
"SELECT count(1) FROM (SELECT...)" so that the
real rowcount is returned, meaning a query such as
query(func.count(A.name)).count() will return a value of
one, since that query would return one row.
2008-11-09 16:06:05 +00:00
Michael Trier 3f8914b4b2 Corrected problems with Access dialect. Corrected issue with reflection due to missing Currency type. Functions didn't return the value. JOINS must be specified as LEFT OUTER JOIN or INNER JOIN. Fixes #1017. 2008-11-09 05:21:38 +00:00
Michael Trier 4cd99f5536 Global propigate -> propagate change to correct spelling. Additionally found a couple of insures that should be ensure. 2008-11-09 01:53:08 +00:00
Michael Trier a8c308f349 Corrected problems with reflection on mssql when dealing with schemas. Fixes #1217. 2008-11-09 01:27:25 +00:00
Mike Bayer d6806501f1 usage docstring for pool listener 2008-11-08 23:26:55 +00:00
Mike Bayer e91bc867f5 - Query.count() and Query.get() return a more informative
error message when executed against multiple entities.
[ticket:1220]
2008-11-08 21:18:11 +00:00
Mike Bayer 1901519fa7 removed setup_instance() from the public API
of ClassManager, and made it a private method on
_ClassInstrumentationAdapter.  ClassManager's approach
handles the default task with fewer function calls which chops off
a few hundred calls from the pertinent profile tests.
2008-11-08 21:00:15 +00:00
Michael Trier 17980ba83c Fixed E notation problem in mssql. Closes #1216. 2008-11-08 06:37:45 +00:00
Michael Trier 8924a0e4fe Corrected a lot of mssql limit / offset issues. Also ensured that mssql uses the IN / NOT IN syntax when using a binary expression with a subquery. 2008-11-08 04:43:35 +00:00
Mike Bayer cfca625e94 docstring updates 2008-11-07 22:36:21 +00:00
Mike Bayer f4db072815 docstring fix 2008-11-07 18:56:42 +00:00
Mike Bayer 0a48075161 - added serializer docs to plugins.txt
- CHANGES formatting
rel_0_5rc3
2008-11-07 18:43:39 +00:00
Mike Bayer 9b360dda29 - Fixed bug preventing declarative-bound "column" objects
from being used in column_mapped_collection().  [ticket:1174]
2008-11-07 18:20:53 +00:00
Mike Bayer e6141ef8ae formatting 2008-11-07 18:03:37 +00:00
Mike Bayer da59591a9c - zoomark adjustments
- changelog has separate category for 'features'
2008-11-07 17:45:19 +00:00
Mike Bayer 17b758faed avoid some often unnecessary method calls. i think we might have squeezed all we're going to squeeze out of compiler at this point. 2008-11-07 17:08:23 +00:00
Mike Bayer abf9bef1a9 the @memoized_property fairy pays a visit 2008-11-07 16:41:54 +00:00
Mike Bayer 8a04f99784 - Repaired the table.tometadata() method so that a passed-in
schema argument is propigated to ForeignKey constructs.
2008-11-07 16:19:24 +00:00
Mike Bayer c3352e5542 - Fixed bug in Query involving order_by() in conjunction with
multiple aliases of the same class (will add tests in
[ticket:1218])
- Added a new extension sqlalchemy.ext.serializer.  Provides
Serializer/Deserializer "classes" which mirror Pickle/Unpickle,
as well as dumps() and loads().  This serializer implements
an "external object" pickler which keeps key context-sensitive
objects, including engines, sessions, metadata, Tables/Columns,
and mappers, outside of the pickle stream, and can later
restore the pickle using any engine/metadata/session provider.
This is used not for pickling regular object instances, which are
pickleable without any special logic, but for pickling expression
objects and full Query objects, such that all mapper/engine/session
dependencies can be restored at unpickle time.
2008-11-06 23:07:47 +00:00