Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer f244287f46 - :func:.composite will raise an informative error message when the
columns/attribute (names) passed don't resolve to a Column or mapped
attribute (such as an erroneous tuple); previously raised an unbound
local. [ticket:2889]
2013-12-12 13:30:16 -05:00
Mike Bayer e8823198a2 Merge branch 'master' into rel_0_9 2013-12-12 12:50:12 -05:00
Mike Bayer ace7bdbc78 - Error message when a string arg sent to :func:.relationship which
doesn't resolve to a class or mapper has been corrected to work
the same way as when a non-string arg is received, which indicates
the name of the relationship which had the configurational error.
[ticket:2888]
2013-12-12 12:49:57 -05:00
Mike Bayer 91a1d0f14f Merge branch 'master' into rel_0_9 2013-12-11 20:20:41 -05:00
Mike Bayer 9bef2001a6 move things that are 90% behavioral improvements to that section. the list of things
that can definitely people should be more focused.
2013-12-11 20:19:56 -05:00
Mike Bayer b7c4d7e574 Merge branch 'master' into rel_0_9 2013-12-11 20:02:00 -05:00
Mike Bayer d5384d6011 - implement "literal binds" for the text() clause, [ticket:2882] 2013-12-11 20:00:39 -05:00
Mike Bayer 5294342018 Merge branch 'master' into rel_0_9 2013-12-11 19:48:56 -05:00
Mike Bayer 84af7e6c22 - The :class:.ForeignKey class more aggressively checks the given
column argument.   If not a string, it checks that the object is
at least a :class:`.ColumnClause`, or an object that resolves to one,
and that the ``.table`` attribute, if present, refers to a
:class:`.TableClause` or subclass, and not something like an
:class:`.Alias`.  Otherwise, a :class:`.ArgumentError` is raised.
[ticket:2883]
2013-12-11 19:48:27 -05:00
Mike Bayer ee78767e86 Merge branch 'master' into rel_0_9 2013-12-11 14:30:37 -05:00
Mike Bayer 9087157749 - The :class:.exc.StatementError or DBAPI-related subclass
now can accomodate additional information about the "reason" for
the exception; the :class:`.Session` now adds some detail to it
when the exception occurs within an autoflush.  This approach
is taken as opposed to combining :class:`.FlushError` with
a Python 3 style "chained exception" approach so as to maintain
compatibility both with Py2K code as well as code that already
catches ``IntegrityError`` or similar.
2013-12-11 14:30:18 -05:00
nathan c64b7aabab sqlalchemy/dialects/postgresql/pgjson:
- Updated documentation for JSON class
2013-12-11 10:27:10 -05:00
nathan 015c73c83a sqlalchemy/dialects/postgresql/pgjson:
- Added support for additional operators
 - Made return as json default (rather than text)
2013-12-11 10:21:08 -05:00
nathan 059039e0f7 sqlalchemy/dialects/postgresql/psycopg2:
- Removed unneeded import of psycopg2.extensions
2013-12-10 10:09:15 -05:00
nathan f285b3536f sqlalchemy/dialects/postgresql/pgjson:
- Fixed reference to HSTORE
 - Corrected spelling of SQLAlchemy

 sqlalchemy/dialects/postgresql/psycopg2:
 - Added psycopg2 specific wrapper type for JSON which uses inherent json deserialization facilities
 - Added code to detect and utilize the JSON wrapper if psycopg2 >= 2.5

test/dialect/postgresql/test_types:
- removed reference to use_native_hstore
2013-12-10 10:01:51 -05:00
Mike Bayer 35d11cb097 Merge branch 'master' into rel_0_9 2013-12-09 21:27:37 -05:00
Mike Bayer 164bff0749 - round trip test
- changelog
- some doc rearrangement
2013-12-09 21:27:14 -05:00
Mike Bayer d5a86d8f86 Merge branch 'tsvector' of https://bitbucket.org/nibrahim/sqlalchemy/branch/tsvector into tsvector 2013-12-09 21:01:26 -05:00
Mike Bayer 7c65147805 Merge branch 'master' into rel_0_9 2013-12-09 20:56:18 -05:00
Mike Bayer 111c61546c sqlany dialect moves to github 2013-12-09 20:56:10 -05:00
Noufal Ibrahim d3b65cd9bc Adds test to verify tsvector creation.
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-12-10 01:07:53 +05:30
Noufal Ibrahim 892c8762e6 Adds tsvector to ischema_names for reflection to work.
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-12-10 01:07:52 +05:30
Noufal Ibrahim 4eb8437f61 Updates documentation for tsvector type.
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-12-10 01:07:36 +05:30
Noufal Ibrahim 96359c6f3e Implements TSVECTOR type for postgresql.
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-12-10 00:58:09 +05:30
nathan ba73d619ca Merge branch 'rel_0_9' of https://github.com/nathan-rice/sqlalchemy into rel_0_9 2013-12-09 11:52:23 -05:00
nathan 64288c7d6f sqlalchemy/dialects/postgresql/__init__.py:
- Added import references to JSON class

 sqlalchemy/dialects/postgresql/base.py:
 - Added visitor method for JSON class

 sqlalchemy/dialects/postgresql/pgjson (new):
 - JSON class, supports automatic serialization and deserialization of json data, as well as basic json operators.
2013-12-09 11:46:36 -05:00
Mike Bayer 41f1e3db45 Merge branch 'master' into rel_0_9 2013-12-08 15:00:26 -05:00
Mike Bayer be1251c625 forgot authors!! 2013-12-08 15:00:12 -05:00
Mike Bayer b1bbe2d5ac Merge branch 'master' into rel_0_9 2013-12-07 18:38:37 -05:00
Mike Bayer 49d8026987 - The :func:.engine_from_config function has been improved so that
we will be able to parse dialect-specific arguments from string
configuration dictionaries.  Dialect classes can now provide their
own list of parameter types and string-conversion routines.
The feature is not yet used by the built-in dialects, however.
[ticket:2875]
2013-12-07 18:38:15 -05:00
Mike Bayer 4a8e687c42 Merge branch 'master' into rel_0_9 2013-12-07 18:00:55 -05:00
Mike Bayer 7af17459ca - documentation cleanup in ORM including [ticket:2816] 2013-12-07 18:00:34 -05:00
Mike Bayer b22c468fdf Merge branch 'master' into rel_0_9 2013-12-07 17:37:46 -05:00
Mike Bayer d7da0dfb7a specify run as module here 2013-12-07 17:37:36 -05:00
Mike Bayer b4334cde6d Merge branch 'master' into rel_0_9 2013-12-07 17:33:50 -05:00
Mike Bayer 5517c0eef9 - remove verbiage about "namespaces" from the dogpile example, [ticket:2862]
- fix broken py2k/py3k isms
2013-12-07 17:33:13 -05:00
Mike Bayer 15ace0b0c1 Merge branch 'master' into rel_0_9 2013-12-07 17:20:42 -05:00
Mike Bayer 6d5eae78a7 - A DBAPI that raises an error on `connect()` which is not a subclass
of dbapi.Error (such as ``TypeError``, ``NotImplementedError``, etc.)
will propagate the exception unchanged.  Previously,
the error handling specific to the ``connect()`` routine would both
inappropriately run the exception through the dialect's
:meth:`.Dialect.is_disconnect` routine as well as wrap it in
a :class:`sqlalchemy.exc.DBAPIError`.  It is now propagated unchanged
in the same way as occurs within the execute process. [ticket:2881]
- add tests for this in test_parseconnect, but also add tests in test_execute
to ensure the execute() behavior as well
2013-12-07 17:20:05 -05:00
Mike Bayer 181470e78f Merge branch 'master' into rel_0_9 2013-12-06 23:01:29 -05:00
Mike Bayer a8efeb6c05 - restore having the connection closed before decrementing the overflow counter 2013-12-06 23:01:08 -05:00
Mike Bayer b1e55723c0 Merge branch 'master' into rel_0_9 2013-12-06 19:58:50 -05:00
Mike Bayer d1cc78479d - The :class:.QueuePool has been enhanced to not block new connection
attempts when an existing connection attempt is blocking.  Previously,
the production of new connections was serialized within the block
that monitored overflow; the overflow counter is now altered within
it's own critical section outside of the connection process itself.
[ticket:2880]
2013-12-06 19:57:19 -05:00
Mike Bayer 300264ab38 - Made a slight adjustment to the logic which waits for a pooled
connection to be available, such that for a connection pool
with no timeout specified, it will every half a second break out of
the wait to check for the so-called "abort" flag, which allows the
waiter to break out in case the whole connection pool was dumped;
normally the waiter should break out due to a notify_all() but it's
possible this notify_all() is missed in very slim cases.
This is an extension of logic first introduced in 0.8.0, and the
issue has only been observed occasionally in stress tests.
2013-12-06 16:34:20 -05:00
Mike Bayer 003b288b76 - Made a slight adjustment to the logic which waits for a pooled
connection to be available, such that for a connection pool
with no timeout specified, it will every half a second break out of
the wait to check for the so-called "abort" flag, which allows the
waiter to break out in case the whole connection pool was dumped;
normally the waiter should break out due to a notify_all() but it's
possible this notify_all() is missed in very slim cases.
This is an extension of logic first introduced in 0.8.0, and the
issue has only been observed occasionally in stress tests.
2013-12-06 16:33:42 -05:00
Mike Bayer b653fb3a23 - The precedence rules for the :meth:.ColumnOperators.collate operator
have been modified, such that the COLLATE operator is now of lower
precedence than the comparison operators.  This has the effect that
a COLLATE applied to a comparison will not render parenthesis
around the comparison, which is not parsed by backends such as
MSSQL.  The change is backwards incompatible for those setups that
were working around the issue by applying :meth:`.Operators.collate`
to an individual element of the comparison expression,
rather than the comparison expression as a whole. [ticket:2879]
2013-12-05 19:03:31 -05:00
Mike Bayer 3621e4b8de - changelog + test for pullreq #7, MSSQL dialect for DROP INDEX 2013-12-05 18:36:59 -05:00
Mike Bayer f895e9be62 Merged in dharland/sqlalchemy/patch-mssql-drop-index (pull request #7)
Fix MSSQL dialects visit_drop_index to use the correct DDL
2013-12-05 18:29:13 -05:00
Mike Bayer 3a03c2e715 - add a new example section for "join conditions", start putting
the primaryjoin examples there
2013-12-05 12:17:16 -05:00
Mike Bayer 7c1bb76904 fix underline 2013-12-05 12:13:37 -05:00
donkopotamus b18440c832 Fix MSSQL dialects visit_drop_index to use the correct DDL 2013-12-05 16:49:13 +13:00