Commit Graph

4161 Commits

Author SHA1 Message Date
Michael Trier cae83f6d4f On MSSQL if a field is part of the primary_key then it should not allow NULLS. 2008-12-28 07:40:56 +00:00
Michael Trier defba2fc02 MSSQL refactoring of BINARY type and addition of MSVarBinary and MSImage.
- Added in new types: MSVarBinary and MSImage
- Modified MSBinary to now return BINARY instead of IMAGE. This is a
  backwards incompatible change. Closes #1249.
2008-12-28 01:46:44 +00:00
Mike Bayer 0465d0b880 - added a full exercising test for all of #946, #947, #948, #949 2008-12-27 19:35:12 +00:00
Mike Bayer 8220d9cdbe - Added a mutex for the initial pool creation when
using pool.manage(dbapi).  This prevents a minor
case of "dogpile" behavior which would otherwise
occur upon a heavy load startup.  [ticket:799]
2008-12-27 18:45:41 +00:00
Mike Bayer f80471e6f3 - Added ScopedSession.is_active accessor. [ticket:976] 2008-12-27 18:24:00 +00:00
Mike Bayer fbcaa34b9e - NullPool supports reconnect on failure behavior.
[ticket:1094]
2008-12-27 18:07:35 +00:00
Mike Bayer 83a756c541 - Reflected foreign keys will properly locate
their referenced column, even if the column
was given a "key" attribute different from
the reflected name.  This is achieved via a
new flag on ForeignKey/ForeignKeyConstraint
called "link_to_name", if True means the given
name is the referred-to column's name, not its
assigned key.
[ticket:650]
- removed column types from sqlite doc, we
aren't going to list out "implementation" types
since they aren't significant and are less present
in 0.6
- mysql will report on missing reflected foreign
key targets in the same way as other dialects
(we can improve that to be immediate within
reflecttable(), but it should be within
ForeignKeyConstraint()).
- postgres dialect can reflect table with
an include_columns list that doesn't include
one or more primary key columns
2008-12-26 05:28:38 +00:00
Mike Bayer 3ea2888b7f fix imports for index reflection unit test 2008-12-26 00:51:44 +00:00
Michael Trier 8a8a7ffc52 Fixed bugs in sqlalchemy documentation. Closes #1263. 2008-12-24 14:43:24 +00:00
Mike Bayer 2876c7e46f - Exceptions raised during compile_mappers() are now
preserved to provide "sticky behavior" - if a hasattr()
call on a pre-compiled mapped attribute triggers a failing
compile and suppresses the exception, subsequent compilation
is blocked and the exception will be reiterated on the
next compile() call.  This issue occurs frequently
when using declarative.
2008-12-24 04:47:06 +00:00
Mike Bayer a75af96bcc use new anonymize style for the public _anonymize as well 2008-12-23 19:16:01 +00:00
Michael Trier 88aad2a374 Added MSSQL support for introspecting the default schema name for the logged in user. Thanks Randall Smith. Fixes #1258. 2008-12-23 06:01:09 +00:00
Mike Bayer 10c62a94b0 silly negative ID numbers on linux... 2008-12-23 05:44:49 +00:00
Mike Bayer 864644bee4 - Added Index reflection support to Postgres, using a
great patch we long neglected, submitted by
Ken Kuhlman. [ticket:714]
2008-12-23 04:47:52 +00:00
Michael Trier 5b09d8179e Merge branch 'collation' 2008-12-23 04:08:13 +00:00
Mike Bayer 6cf4db7df3 - Columns can again contain percent signs within their
names. [ticket:1256]
2008-12-23 01:22:54 +00:00
Michael Trier 886ddcd12d Major refactoring of the MSSQL dialect. Thanks zzzeek.
Includes simplifying the IDENTITY handling and the exception handling. Also
includes a cleanup of the connection string handling for pyodbc to favor
the DSN syntax.
2008-12-22 20:20:55 +00:00
Mike Bayer 4bb8489073 also check for primaryjoin/secondaryjoin that equates to False, [ticket:1087] 2008-12-22 17:51:25 +00:00
Mike Bayer b563084d0b - CHANGES update
- added slightly more preemptive message for bad remote_side
2008-12-22 15:10:06 +00:00
Mike Bayer 8dc7bada91 - Fixed mysql bug in exception raise when FK columns not present
during reflection. [ticket:1241]
2008-12-21 18:30:55 +00:00
Mike Bayer f2774461d3 fix unittest import 2008-12-21 02:39:45 +00:00
Michael Trier 12307ecbcf Pulled callable into testlib because path fixup is not available at the point we need it. 2008-12-21 00:47:04 +00:00
Michael Trier 0dc8bce4fe Corrected ColumnsTest for mssql's new explicit nullability behavior. 2008-12-20 22:35:06 +00:00
Mike Bayer 9cccdfb0fd removed the "create_execution_context()" method from dialects and replaced
with a more succinct "dialect.execution_ctx_cls" member
2008-12-19 23:02:45 +00:00
Mike Bayer 16ef52392c more platform neutral way of getting at 'buffer' 2008-12-19 15:32:31 +00:00
Mike Bayer 1b950f13d6 missed an ordering on a set. attempting to nail down linux-specific buildbot errors 2008-12-19 02:07:55 +00:00
Mike Bayer 146ec3469a and try again 2008-12-19 02:03:12 +00:00
Mike Bayer 7c803dfadb 2.4 doesnt have hashlib.... 2008-12-19 02:01:42 +00:00
Mike Bayer 5ddce0ea00 *most* py3k warnings are resolved, with the exception of the various __setslice__ related warnings
I don't really know how to get rid of
2008-12-18 18:46:27 +00:00
Mike Bayer d76dc73f33 merge the test/ directory from -r5438:5439 of py3k_warnings branch. this gives
us a 2.5-frozen copy of unittest so we're insulated from unittest changes.
2008-12-18 18:11:12 +00:00
Mike Bayer be5d326343 merged -r5299:5438 of py3k warnings branch. this fixes some sqlite py2.6 testing issues,
and also addresses a significant chunk of py3k deprecations.  It's mainly
expicit __hash__ methods.  Additionally, most usage of sets/dicts to store columns uses
util-based placeholder names.
2008-12-18 17:57:15 +00:00
Jason Kirtland 98d7d70674 dynamic_loader() accepts query_class= to mix in user Query subclasses. 2008-12-18 17:06:01 +00:00
Jason Kirtland 3c506294e3 Association proxies no longer cloak themselves at the class level. 2008-12-18 16:55:47 +00:00
Mike Bayer b333789336 - Query() can be passed a "composite" attribute
as a column expression and it will be expanded.
Somewhat related to [ticket:1253].
- Query() is a little more robust when passed
various column expressions such as strings,
clauselists, text() constructs (which may mean
it just raises an error more nicely).
- select() can accept a ClauseList as a column
in the same way as a Table or other selectable
and the interior expressions will be used as
column elements. [ticket:1253]
- removed erroneous FooTest from test/orm/query

-This line, and those below, will be ignored--

M    test/orm/query.py
M    test/orm/mapper.py
M    test/sql/select.py
M    lib/sqlalchemy/orm/query.py
M    lib/sqlalchemy/sql/expression.py
M    CHANGES
2008-12-18 16:50:49 +00:00
Mike Bayer 7933395055 document ConnectionProxy 2008-12-18 00:12:12 +00:00
Mike Bayer 6a99f29313 - _execute_clauseelement() goes back to being
a private method.  Subclassing Connection
is not needed now that ConnectionProxy
is available.
- tightened the interface for the various _execute_XXX()
methods to reduce ambiguity
- __distill_params() no longer creates artificial [{}] entry,
blank dict is no longer passed through to do_execute()
in any case unless explicitly sent from the outside
as in connection.execute("somestring"), {})
- fixed a few old sql.query tests which were doing that
- removed needless do_execute() from mysql dialect
- fixed charset param not properly being sent to
_compat_fetchone() in mysql
2008-12-17 23:09:51 +00:00
Mike Bayer 7b7530de19 - sqlite types
- fixed targeting for sqlalchemy.types
2008-12-17 20:53:43 +00:00
Mike Bayer 6788024721 - Fixed bug where many-to-many relation() with
viewonly=True would not correctly reference the
link between secondary->remote.
2008-12-17 20:39:18 +00:00
Mike Bayer 172781e678 - added sphinx handler to allow __init__ methods through
- sqlite module documentation
- some corrections to pool docs
- the example in URL.translate_connect_args() never made any sense anyway so removed it
2008-12-17 20:12:07 +00:00
Gaëtan de Menten 163c4819e0 polymorphic_fetch is deprecated. Mark it so in the documentation. 2008-12-17 14:53:18 +00:00
Mike Bayer 4a662d5966 ok we need find_packages. fine. 2008-12-15 21:58:36 +00:00
Mike Bayer d91219520f corrections 2008-12-15 21:25:17 +00:00
Mike Bayer 4e2d54fdd5 removed dependencies on setuptools. distutils will be used if setuptools is not
present.
2008-12-15 21:23:55 +00:00
Michael Trier c712af4d4c Corrected output on docs and a missing {stop} that prevented python results from displaying in the docs. 2008-12-12 21:59:33 +00:00
Michael Trier f9b8641269 Support for three levels of column nullability: NULL, NOT NULL, and the database's configured default.
The default Column configuration (nullable=True) will now generate NULL in the DDL. Previously no specification was emitted and the database default would take effect (usually NULL, but not always).  To explicitly request the database default, configure columns with nullable=None and no specification will be emitted in DDL. Fixes #1243.
2008-12-12 04:49:24 +00:00
Michael Trier 1d90146210 Modified fails_on testing decorator to take a reason for the failure.
This should assist with helping to document the reasons for testing failures.
Currently unspecified failures are defaulted to 'FIXME: unknown'.
2008-12-12 03:41:05 +00:00
Michael Trier aaac4520d3 Corrected and verified a few more mssql tests. 2008-12-12 03:40:57 +00:00
Michael Trier 7247ca12cf Broke out a specific values test and indicated that it fails on mssql due to duplicate columns in the order by clause. 2008-12-12 01:40:05 +00:00
Mike Bayer b22edf1d8a - turn __visit_name__ into an explicit member.
[ticket:1244]
2008-12-11 23:28:01 +00:00
Jason Kirtland 8d3fab1250 Index entries for thread safety. 2008-12-11 22:09:12 +00:00