summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
Commit message (Collapse)AuthorAgeFilesLines
* - rework the JSON expression system so that "astext" is called *after*Mike Bayer2013-12-273-48/+120
| | | | | | | | | the indexing. this is for more natural operation. - also add cast() to the JSON expression to complement astext. This integrates the CAST call which will be needed frequently. Part of [ticket:2687]. - it's a little unclear how more advanced unicode attribute-access is going to go, some quick attempts at testing yielded strange error messages from psycopg2. - do other cross linking as mentioned in [ticket:2687].
* - Declarative does an extra check to detect if the sameMike Bayer2013-12-271-1/+14
| | | | | | | :class:`.Column` is mapped multiple times under different properties (which typically should be a :func:`.synonym` instead) or if two or more :class:`.Column` objects are given the same name, raising a warning if this condition is detected. [ticket:2828]
* - Changed the queries used by Firebird to list table and view namesMike Bayer2013-12-271-5/+21
| | | | | | | | | to query from the ``rdb$relations`` view instead of the ``rdb$relation_fields`` and ``rdb$view_relations`` views. Variants of both the old and new queries are mentioned on many FAQ and blogs, however the new queries are taken straight from the "Firebird FAQ" which appears to be the most official source of info. [ticket:2898]
* - actually check the list of views!Mike Bayer2013-12-271-0/+1
|
* - The firebird dialect will quote identifiers which begin with anMike Bayer2013-12-271-0/+1
| | | | underscore. Courtesy Treeve Jelbert. [ticket:2897]
* - add a test which creates tables and views at the same time, then tests ↵Mike Bayer2013-12-271-0/+6
| | | | | | that the lists of each can be reflected independently. Testing [ticket:2898] at the moment.
* - Fixed bug in Firebird index reflection where the columns within theMike Bayer2013-12-271-1/+1
| | | | | index were not sorted correctly; they are now sorted in order of RDB$FIELD_POSITION.
* - The "asdecimal" flag used with the :class:`.Float` type will nowMike Bayer2013-12-271-1/+8
| | | | | | work with Firebird dialects; previously the decimal conversion was not occurring. - scale back some firebird FP numeric tests
* - repair some suite tests for firebirdMike Bayer2013-12-272-1/+29
|
* Merge pull request #51 from sontek/pymssql_handle_terminated_connectionmike bayer2013-12-271-0/+1
|\ | | | | Remove terminated connections from the pool.
| * Remove terminated connections from the pool.pr/51John Anderson2013-12-161-0/+1
| | | | | | | | | | | | In pymssql, if you terminate a long running query manually it will give you a connection reset by peer message, but this connection remains in the pool and will be re-used.
* | - alter the decorator function, and the newer public_factory function,Mike Bayer2013-12-211-6/+20
| | | | | | | | | | to use a named def instead of a lambda. this so that TypeError on wrong arguments are more legible. [ticket:2884]
* | - improve documentation for return_defaults() and returned_defaults. ↵Mike Bayer2013-12-202-27/+68
| | | | | | | | [ticket:2852]
* | - Fixed issue where a primary key column that has a Sequence on it,Mike Bayer2013-12-201-1/+7
| | | | | | | | | | | | | | | | | | yet the column is not the "auto increment" column, either because it has a foreign key constraint or ``autoincrement=False`` set, would attempt to fire the Sequence on INSERT for backends that don't support sequences, when presented with an INSERT missing the primary key value. This would take place on non-sequence backends like SQLite, MySQL. [ticket:2896]
* | - Fixed bug with :meth:`.Insert.from_select` method where the orderMike Bayer2013-12-192-5/+20
| | | | | | | | | | | | | | | | of the given names would not be taken into account when generating the INSERT statement, thus producing a mismatch versus the column names in the given SELECT statement. Also noted that :meth:`.Insert.from_select` implies that Python-side insert defaults cannot be used, since the statement has no VALUES clause. [ticket:2895]
* | fix doc targetMike Bayer2013-12-191-1/+1
| |
* | - Improvements to the system by which SQL types generate withinMike Bayer2013-12-183-49/+90
| | | | | | | | | | | | | | | | ``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]
* | - remove very ancient TypeEngine constructor, not used by anythingMike Bayer2013-12-171-6/+0
| |
* | - make the json serializer and deserializer per-dialect, so that we areMike Bayer2013-12-173-15/+28
| | | | | | | | | | compatible with psycopg2's per-connection/cursor approach. add round trip tests for both native and non-native.
* | - The :func:`.cast` function, when given a plain literal value,Mike Bayer2013-12-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | will now apply the given type to the given literal value on the bind parameter side according to the type given to the cast. This essentially replaces what would normally be the detected type of the literal value. This only takes effect if the auto-detected type of the literal value is either "nulltype" (e.g. couldn't detect) or a type that is of the same "affinity" as the cast type. The net change here is that the :func:`.cast` function includes more of the functionality already present in the :func:`.type_coerce` function.
* | - rework JSON expressions to be based off __getitem__ exclusivelyMike Bayer2013-12-174-38/+48
| | | | | | | | | | | | | | | | | | - add support for "standalone" JSON objects; this involves getting CAST to upgrade the given type of a bound parameter. should add a core-only test for this. - add tests for "standalone" json round trips both with and without unicode - add mechanism by which we remove psycopg2's "json" handler in order to get the effect of using our non-native result handlers
* | - enhance the exclusions system to support database versions within the ↵Mike Bayer2013-12-172-7/+17
| | | | | | | | __only_on__ attribute
* | Merge branch 'issue_2581' of github.com:nathan-rice/sqlalchemy into pg_jsonMike Bayer2013-12-174-1/+148
|\ \
| * | sqlalchemy/dialects/postgresql/pgjson:pr/50nathan2013-12-111-7/+14
| | | | | | | | | | | | - Updated documentation for JSON class
| * | sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-111-2/+14
| | | | | | | | | | | | | | | - Added support for additional operators - Made return as json default (rather than text)
| * | sqlalchemy/dialects/postgresql/psycopg2:nathan2013-12-101-2/+0
| | | | | | | | | | | | - Removed unneeded import of psycopg2.extensions
| * | sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-102-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * | Merge branch 'rel_0_9' of https://github.com/nathan-rice/sqlalchemy into rel_0_9nathan2013-12-092-6/+8
| |\ \
| * | | sqlalchemy/dialects/postgresql/__init__.py:nathan2013-12-093-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | - for [ticket:2651], leaving CheckConstraint alone, preferring to keepMike Bayer2013-12-162-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backwards compatibility. A note about backslashing escapes is added. Because the Text() construct now supports bind params better, the example given in the code raises an exception now, so that should cover us. The exception itself has been enhanced to include the key name of the bound param. We're backporting this to 0.8 but 0.8 doesn't have the text->bind behavior that raises.
* | | | - An adjustment to the :func:`.subqueryload` strategy which ensures thatMike Bayer2013-12-161-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the query runs after the loading process has begun; this is so that the subqueryload takes precedence over other loaders that may be hitting the same attribute due to other eager/noload situations at the wrong time. [ticket:2887]
* | | | - Fixed bug when using joined table inheritance from a table to aMike Bayer2013-12-161-1/+3
| |_|/ |/| | | | | | | | | | | | | | | | | select/alias on the base, where the PK columns were also not same named; the persistence system would fail to copy primary key values from the base table to the inherited table upon INSERT. [ticket:2885]
* | | wrong method nameMike Bayer2013-12-161-1/+1
| | |
* | | - add "force_nocheck" as a way to turn on unicode=force without evenMike Bayer2013-12-152-21/+16
| | | | | | | | | | | | | | | | | | | | | doing the isinstance() check - currently used only by psycopg2 + native enum + py2k. - didn't realize psycopg2 had UNICODEARRAY extension all this time; replace _PGArray with just using UNICODEARRAY instead. - replace unnecessary/inconsistent __import__ in _isolation_lookup.
* | | load_on_pending is different from enable_relationship_loading and shouldMike Bayer2013-12-152-6/+14
| | | | | | | | | | | | not be superseded. both have a potential use.
* | | make the error message for [ticket:2889] more accurate, as we supportMike Bayer2013-12-121-1/+1
| | | | | | | | | | | | composites to many-to-ones now also
* | | - :func:`.composite` will raise an informative error message when theMike Bayer2013-12-121-0/+5
| | | | | | | | | | | | | | | | | | 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]
* | | - Error message when a string arg sent to :func:`.relationship` whichMike Bayer2013-12-121-12/+10
| | | | | | | | | | | | | | | | | | | | | 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]
* | | - implement "literal binds" for the text() clause, [ticket:2882]Mike Bayer2013-12-111-3/+3
| | |
* | | - The :class:`.ForeignKey` class more aggressively checks the givenMike Bayer2013-12-111-21/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | - The :class:`.exc.StatementError` or DBAPI-related subclassMike Bayer2013-12-112-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | - round trip testMike Bayer2013-12-091-18/+44
| | | | | | | | | | | | | | | - changelog - some doc rearrangement
* | | Adds tsvector to ischema_names for reflection to work.Noufal Ibrahim2013-12-101-0/+1
| | | | | | | | | | | | Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
* | | Updates documentation for tsvector type.Noufal Ibrahim2013-12-101-1/+26
| | | | | | | | | | | | Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
* | | Implements TSVECTOR type for postgresql.Noufal Ibrahim2013-12-102-2/+10
| | | | | | | | | | | | Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
* | | - The :func:`.engine_from_config` function has been improved so thatMike Bayer2013-12-074-34/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | - documentation cleanup in ORM including [ticket:2816]Mike Bayer2013-12-073-43/+88
| | |
* | | - A DBAPI that raises an error on ``connect()`` which is not a subclassMike Bayer2013-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | - restore having the connection closed before decrementing the overflow counterMike Bayer2013-12-061-2/+4
| | |
* | | - The :class:`.QueuePool` has been enhanced to not block new connectionMike Bayer2013-12-061-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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]