| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SQLite allows column types that aren't technically understood in sqlite
by using 'data affinity', which is an algorithm for converting column
types in to some sort of useful type that can be stored and retrieved
from the db. Unfortunatly, this breaks reflection since we (previously)
expected a sqlite db to reflect column types that we permit in the
`ischema_names` for that dialect.
This patch changes the logic for 'unknown' column types during
reflection to instead run through SQLite's data affinity algorithm, and
assigns appropriate types from that.
It also expands the matching for column type to include column types
with spaces (strongly discouraged but allowed by sqlite) and also
completely empty column types (in which case the NullType is assigned,
which sqlite will treat as a Blob - or rather, Blob is treated as
NullType). These changes mean that SQLite will never raise an error for
an unknown type during reflection - there will always be some 'useful'
type returned, which follows the spirit of SQLite (accomodation before
sanity!).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
where a more specific type is adapted to a more generic one - this
use case is needed by some third party tools such as ``sqlacodegen``.
The specific cases that needed repair within this test suite were that
of :class:`.mysql.ENUM` being downcast into a :class:`.types.Enum`,
and that of SQLite date types being cast into generic date types.
The ``adapt()`` method needed to become more specific here to counteract
the removal of a "catch all" ``**kwargs`` collection on the base
:class:`.TypeEngine` class that was removed in 0.9. [ticket:2917]
|
|
|
|
| |
- clean up some shenanigans in reflection
|
|
|
|
|
| |
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
|
|
|
|
| |
- be specific about version 0.9.2
|
|\
| |
| |
| | |
into m
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
PrimaryKeyConstraint
|
|/
|
|
|
|
|
|
|
|
|
| |
observed
to be very slow. this now has the effect of producing "conditional" unicode
conversion for the Oracle backend, as it still returns NVARCHAR etc. as unicode
[ticket:2911]
- add new "conditional" functionality to unicode processors; the C-level
function now uses PyUnicode_Check() as a fast alternative to the isinstance()
check in Python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type such as "charset" and "collation". While MySQL wants all character-
based CAST calls to use the CHAR type, we now create a real CHAR
object at CAST time and copy over all the parameters it has, so that
an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will
render ``CAST(t.col AS CHAR CHARACTER SET utf8)``.
- Added new "unicode returns" detection to the MySQL dialect and
to the default dialect system overall, such that any dialect
can add extra "tests" to the on-first-connect "does this DBAPI
return unicode directly?" detection. In this case, we are
adding a check specifically against the "utf8" encoding with
an explicit "utf8_bin" collation type (after checking that
this collation is available) to test for some buggy unicode
behavior observed with MySQLdb version 1.2.3. While MySQLdb
has resolved this issue as of 1.2.4, the check here should
guard against regressions. The change also allows the "unicode"
checks to log in the engine logs, which was not previously
the case. [ticket:2906]
|
| |
|
|
|
|
|
| |
- wrangle through osx+pyodbc+freetds to get at least test_suite to pass again
with mssql+pyodbc. invovled adding some silly requirements
|
|
|
|
|
|
|
|
|
| |
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].
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
underscore. Courtesy Treeve Jelbert. [ticket:2897]
|
|
|
|
|
| |
index were not sorted correctly; they are now sorted
in order of RDB$FIELD_POSITION.
|
|
|
|
|
|
| |
work with Firebird dialects; previously the decimal conversion was
not occurring.
- scale back some firebird FP numeric tests
|
|\
| |
| | |
Remove terminated connections from the pool.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
``__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]
|
| |
| |
| |
| |
| | |
compatible with psycopg2's per-connection/cursor approach. add round trip tests for
both native and non-native.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
- Updated documentation for JSON class
|
| |
| |
| |
| |
| | |
- Added support for additional operators
- Made return as json default (rather than text)
|
| |
| |
| |
| | |
- Removed unneeded import of psycopg2.extensions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
- changelog
- some doc rearrangement
|
| | |
| | |
| | |
| | | |
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
|
| |/
|/|
| |
| | |
Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
|
|/ |
|
|
|
|
| |
"is disconnect" codes with cx_oracle. [ticket:2864]
|
|
|
|
|
| |
quote signs. Note that this is backwards-incompatible for existing
workarounds that manually escape the single quotes. [ticket:2878]
|
|
|
|
|
| |
- get PG dialect to work around "no nonexistent binds" rule for now,
though we might want to reconsider this behavior
|
|\
| |
| | |
More fixes for cross references and reducing warnings (3rd wave)
|
| | |
|
| |
| |
| |
| |
| | |
- implement Query with_for_update()
- rework docs and tests
|
| |
| |
| |
| |
| |
| | |
- move out tests, dialect specific out of compiler, compiler tests use new API,
legacy API tests in test_selecatble
- add support for adaptation of ForUpdateArg, alias support in compilers
|
| | |
|
|\ \
| | |
| | |
| | | |
for_update_of
|
| | | |
|
| | | |
|
| | | |
|