| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
the ARRAY type when using psycopg2. The psycopg2 dialect now
employs use of the psycopg2.extras.register_uuid() hook
so that UUID values are always passed to/from the DBAPI as
UUID() objects. The :paramref:`.UUID.as_uuid` flag is still
honored, except with psycopg2 we need to convert returned
UUID objects back into strings when this is disabled.
fixes #2940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using psycopg2 2.5.4 or greater, which features native conversion
of JSONB data so that SQLAlchemy's converters must be disabled;
additionally, the newly added psycopg2 extension
``extras.register_default_jsonb`` is used to establish a JSON
deserializer passed to the dialect via the ``json_deserializer``
argument. Also repaired the Postgresql integration tests which
weren't actually round-tripping the JSONB type as opposed to the
JSON type. Pull request courtesy Mateusz Susik.
- Repaired the use of the "array_oid" flag when registering the
HSTORE type with older psycopg2 versions < 2.4.3, which does not
support this flag, as well as use of the native json serializer
hook "register_default_json" with user-defined ``json_deserializer``
on psycopg2 versions < 2.5, which does not include native json.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
consists mainly of adjusting fixtures to ensure connections are closed
explicitly. psycopg2cffi also handles unicode bind parameter
names differently than psycopg2, and seems to possibly have a little less
control over floating point values at least in one test which is
marked as a "fail", though will see if it runs differently on linux
than osx..
- changelog for psycopg2cffi, fixes #3052
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
levels; :meth:`.Connection.get_isolation_level`,
:attr:`.Connection.default_isolation_level`.
- enhance documentation inter-linkage between new accessors,
existing isolation_level parameters, as well as in
the dialect-level methods which should be fully covered
by Engine/Connection level APIs now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
now be constructed such that the visit methods receive an indication
of the owning expression object, if any. Any visit method that
accepts keyword arguments (e.g. ``**kw``) will in most cases
receive a keyword argument ``type_expression``, referring to the
expression object that the type is contained within. For columns
in DDL, the dialect's compiler class may need to alter its
``get_column_specification()`` method to support this as well.
The ``UserDefinedType.get_col_spec()`` method will also receive
``type_expression`` if it provides ``**kw`` in its argument
signature.
fixes #3074
|
| |
| |
| |
| |
| |
| |
| |
| | |
expression in an :class:`.Index` that did not correspond directly
to a table-bound column; typically when a :func:`.text` construct
was one of the expressions within the index; or could misinterpret the
list of expressions if one or more of them were such an expression.
fixes #3174
|
| |
| |
| |
| | |
get PG stuff working
|
| |
| |
| |
| | |
through all possible set values
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
assume that the empty string, or a set with a single empty string
value, is in fact a set with a single empty string; instead, this
is by default treated as the empty set. In order to handle persistence
of a :class:`.mysql.SET` that actually wants to include the blank
value ``''`` as a legitimate value, a new bitwise operational mode
is added which is enabled by the
:paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist
and retrieve values unambiguously using their bitflag positioning.
Storage and retrieval of unicode values for driver configurations
that aren't converting unicode natively is also repaired.
fixes #3283
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sort_tables_and_constraints function.
- The DDL generation system of :meth:`.MetaData.create_all`
and :meth:`.Metadata.drop_all` has been enhanced to in most
cases automatically handle the case of mutually dependent
foreign key constraints; the need for the
:paramref:`.ForeignKeyConstraint.use_alter` flag is greatly
reduced. The system also works for constraints which aren't given
a name up front; only in the case of DROP is a name required for
at least one of the constraints involved in the cycle.
fixes #3282
|
| | |
|
| |
| |
| |
| | |
- attempt to add a script to semi-automate the fixing of links
|
| | |
|
| |
| |
| |
| |
| |
| | |
format
- add an extra doc to MySQLdb
- changelog
|
|\ \
| | |
| | |
| | | |
https://bitbucket.org/rob_b/sqlalchemy into pr39
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
and extensions into an external library, and also reorganizes most large documentation
pages into many small areas to reduce scrolling and better present the context
into a more fine-grained hierarchy.
|
| |
| |
| |
| |
| | |
check for 'utf8_bin' collation, as this fails on MySQL server < 5.0.
fixes #3274
|
| |
| |
| |
| |
| |
| | |
and regexp parsing of SQL in order to form a complete picture of
constraints + their names. fixes #3244 fixes #3261
- factor various PRAGMA work to be centralized into one call
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
VARBINARY(max) for large text/binary types. The MSSQL dialect will
now respect this based on version detection, as well as the new
``deprecate_large_types`` flag.
fixes #3039
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:class:`.sqlite.TIME`,
or :class:`.sqlite.DATETIME` types, and given a ``storage_format`` that
only renders numbers, will render the types in DDL as
``DATE_CHAR``, ``TIME_CHAR``, and ``DATETIME_CHAR``, so that despite the
lack of alpha characters in the values, the column will still
deliver the "text affinity". Normally this is not needed, as the
textual values within the default storage formats already
imply text.
fixes #3257
|
| |
| |
| |
| |
| | |
Patch courtesy Gabor Gombas.
fixes #3127
|
| |
| |
| |
| |
| |
| |
| | |
to the aliasing syntax, as well as a new CTE feature
:meth:`.CTE.suffix_with`, which is useful for adding in special
Oracle-specific directives to the CTE.
fixes #3220
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
and Pymysql under Python 2. This refers to the SQL statements
themselves, not the parameters, and affects issues such as table
and column names using non-ASCII characters. These drivers both
appear to support Python 2 Unicode objects without issue in modern
versions.
fixes #3121
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
return type is not strictly assumed to be boolean; it now
returns a :class:`.Boolean` subclass called :class:`.MatchType`.
The type will still produce boolean behavior when used in Python
expressions, however the dialect can override its behavior at
result time. In the case of MySQL, while the MATCH operator
is typically used in a boolean context within an expression,
if one actually queries for the value of a match expression, a
floating point value is returned; this value is not compatible
with SQLAlchemy's C-based boolean processor, so MySQL's result-set
behavior now follows that of the :class:`.Float` type.
A new operator object ``notmatch_op`` is also added to better allow
dialects to define the negation of a match operation.
fixes #3263
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
``pg_catalog.pg_table_is_visible(c.oid)``, rather than testing
for an exact schema match, when the schema name is None; this
so that the method will also illustrate that temporary tables
are present. Note that this is a behavioral change, as Postgresql
allows a non-temporary table to silently overwrite an existing
temporary table of the same name, so this changes the behavior
of ``checkfirst`` in that unusual scenario.
fixes #3264
|
| |
| |
| |
| |
| |
| |
| |
| | |
collection has been made consistent; this attribute is now a
:class:`.ColumnCollection` like that of all other constraints and
is initialized at the point when the constraint is associated with
a :class:`.Table`.
fixes #3243
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
for psycopg2 and others, encourage users to take advantage of positional
styles by documenting "paramstyle". A section is added to psycopg2
specifically as this is a pretty common spot for named parameters
that may be unusually named. fixes #3246.
|
|/
|
|
| |
requests for it soon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the python 3 merge, now does not expect percent signs (e.g.
as used as the modulus operator and others) to be doubled,
even when using the "pyformat" bound parameter format (this
change is not documented by Mysqlconnector). The dialect now
checks for py2k and for mysqlconnector less than version 2.0
when detecting if the modulus operator should be rendered as
``%%`` or ``%``.
- Unicode SQL is now passed for MySQLconnector version 2.0 and above;
for Py2k and MySQL < 2.0, strings are encoded. Note that mysqlconnector
as of 2.0.1 appears to have a bug with unicode DDL on py2k, so the tests here
are skipping until we observe it's fixed.
- take out profiling on mysqlconnector, callcounts vary too much with
its current development speed
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
names that started with numbers would not be quoted, as Oracle
doesn't like numerics in bound parameter names.
fixes #2138
|
| |
| |
| |
| |
| | |
at the engine level is not the same thing as at the connect args
level.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- add a test for PG reflection of unique index without any unique
constraint
- for PG, don't include 'duplicates_constraint' in the entry
if the index does not actually mirror a constraint
- use a distinct method for unique constraint reflection within table
- catch unique constraint not implemented condition; this may
be within some dialects and also is expected to be supported by
Alembic tests
- migration + changelogs for #3184
- add individual doc notes as well to MySQL, Postgreql
fixes #3184
|
|\ \
| | |
| | |
| | | |
https://bitbucket.org/jerdfelt/sqlalchemy into pr30
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Calls to reflect a table did not create any UniqueConstraint objects.
The reflection core made no calls to get_unique_constraints and as
a result, the sqlite dialect would never reflect any unique constraints.
MySQL transparently converts unique constraints into unique indexes, but
SQLAlchemy would reflect those as an Index object and as a
UniqueConstraint. The reflection core will now deduplicate the unique
constraints.
PostgreSQL would reflect unique constraints as an Index object and as
a UniqueConstraint object. The reflection core will now deduplicate
the unique indexes.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
test both memory and file-based
- When selecting from a UNION using an attached database file,
the pysqlite driver reports column names in cursor.description
as 'dbname.tablename.colname', instead of 'tablename.colname' as
it normally does for a UNION (note that it's supposed to just be
'colname' for both, but we work around it). The column translation
logic here has been adjusted to retrieve the rightmost token, rather
than the second token, so it works in both cases. Workaround
courtesy Tony Roberts.
fixes #3211
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
psycopg2's ``.closed`` accessor is not as reliable as we assumed,
so we have added an explicit check for the exception messages
"SSL SYSCALL error: Bad file descriptor" and
"SSL SYSCALL error: EOF detected" when detecting an
is-disconnect scenario. We will continue to consult psycopg2's
connection.closed as a first check.
fixes #3021
|
|/
|
|
|
|
|
|
|
| |
kept separate from Postgresql's ON COMMIT for now even though ON COMMIT
is in the SQL standard; the option is still very specific to temp tables
and we eventually would provide a more first class temporary table
feature.
- oracle can apparently do get_temp_table_names() too, so implement that,
fix its get_table_names(), and add it to #3204. fixes #3204 again.
|
|\
| |
| |
| | |
https://bitbucket.org/jerdfelt/sqlalchemy/branch/sqlite-temp-table-reflection into pr31
|
| |
| |
| |
| |
| |
| |
| | |
The sqlite get_unique_constraints() implementation did not do a union
against the sqlite_temp_master table like other code does. This could
result in an exception being raised if get_unique_constraints() was
called against a temporary table.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:meth:`.Inspector.get_temp_view_names`; currently, only the
SQLite dialect supports these methods. The return of temporary
table and view names has been **removed** from SQLite's version
of :meth:`.Inspector.get_table_names` and
:meth:`.Inspector.get_view_names`; other database backends cannot
support this information (such as MySQL), and the scope of operation
is different in that the tables can be local to a session and
typically aren't supported in remote schemas.
fixes #3204
|