Commit Graph

803 Commits

Author SHA1 Message Date
Mike Bayer 8b505e7c24 - Narrowed the assumption made when reflecting
a foreign-key referenced table with schema in
the current search path; an explicit schema will
be applied to the referenced table only if
it actually matches that of the referencing table,
which also has an explicit schema.   Previously
it was assumed that "current" schema was synonymous
with the full search_path.  [ticket:2249]
2011-08-09 19:45:20 -04:00
Mike Bayer 5751eb17f1 - Query will convert an OFFSET of zero when
slicing into None, so that needless OFFSET
clauses are not invoked.
- mssql: "0" is accepted as an argument for limit() which
will produce "TOP 0". [ticket:2222]
- add tests to default compiler test for LIMIT/OFFSET generation
2011-08-06 15:03:33 -04:00
Mike Bayer 757400f82f - Ensured that the same ValueError is raised for
illegal date/time/datetime string parsed from
    the database regardless of whether C
    extensions are in use or not.
2011-08-04 15:34:24 -04:00
Mike Bayer 086ae95614 - SQLite dialect no longer strips quotes
off of reflected default value, allowing
    a round trip CREATE TABLE to work.
    This is consistent with other dialects
    that also maintain the exact form of
    the default.  [ticket:2189]
2011-07-28 11:53:18 -04:00
Mike Bayer 1ae69566cc fix keyword error 2011-07-20 11:09:04 -04:00
Mike Bayer b2d50f2807 - Added new "postgresql_ops" argument to
Index, allows specification of PostgreSQL
    operator classes for indexed columns.
    [ticket:2198]  Courtesy Filip Zyzniewski.
2011-07-20 10:49:36 -04:00
Mike Bayer bd45f22e17 - repaired the oracle.RAW type which did not
generate the correct DDL.  [ticket:2220]
Also in 0.6.9.
2011-07-19 11:44:21 -04:00
Mike Bayer 772ae63bdb add test for [ticket:2159] 2011-06-05 12:32:04 -04:00
Mike Bayer c0f9221160 - Some unit test fixes regarding numeric arrays,
MATCH operator.   A potential floating-point
inaccuracy issue was fixed, and certain tests
of the MATCH operator only execute within an
EN-oriented locale for now.  [ticket:2175].
Also in 0.6.8.
2011-06-04 20:20:28 -04:00
Mike Bayer ef654af35a - Fixed bug affecting PG 9 whereby index reflection
would fail if against a column whose name
had changed.  [ticket:2141].  Also in 0.6.8.
2011-05-20 17:53:13 -04:00
Mike Bayer c7713a6f0a - Fixed bug in MSSQL dialect whereby the aliasing
applied to a schema-qualified table would leak
    into enclosing select statements [ticket:2169].
    Also in 0.6.8.
2011-05-19 12:00:47 -04:00
Philip Jenvey ee2154d994 mark more postgresql+zxjdbc failures 2011-05-11 18:44:23 -07:00
Mike Bayer 6850ba6ac5 - split all SS tests into separate + engine per test + close_all() + dispose within teardown 2011-05-01 00:45:39 -04:00
Philip Jenvey 24e6c56da8 update warnings per zxjdbc 2011-04-23 14:15:08 -07:00
Mike Bayer 55f87348f3 - add test for [ticket:2142] 2011-04-23 15:05:50 -04:00
Mike Bayer c718dea749 - Fixed the psycopg2_version parsing in the
psycopg2 dialect.
2011-04-18 12:38:08 -04:00
Mike Bayer 4dd69ff878 - remove obsolete test regarding PG server side cursors + ORM query, was failing + hanging jenkins 2011-04-17 16:51:04 -04:00
Mike Bayer c67b0c56a3 test only runs on sqlite 2011-04-10 20:53:14 -04:00
Mike Bayer fb97a666bb - Fixed bug where reflection of foreign key
created as "REFERENCES <tablename>" without
col name would fail.  [ticket:2115]
(also in 0.6.7)
2011-04-10 10:47:34 -04:00
Mike Bayer 51fea2e159 - The limit/offset keywords to select() as well
as the value passed to select.limit()/offset()
will be coerced to integer.  [ticket:2116]
(also in 0.6.7)
- Oracle dialect adds use_binds_for_limits=False
create_engine() flag, will render the LIMIT/OFFSET
values inline instead of as binds, reported to
modify the execution plan used by Oracle.
[ticket:2116] (Also in 0.6.7)
2011-04-07 13:34:38 -04:00
Mike Bayer b462373b46 - REAL has been added to the core types. Supported
by Postgresql, SQL Server, MySQL, SQLite.  Note
that the SQL Server and MySQL versions, which
add extra arguments, are also still available
from those dialects.  [ticket:2081]
2011-04-05 12:40:55 -04:00
Mike Bayer 545b70e8a2 - Using column names that would require quotes
for the column itself or for a name-generated
bind parameter, such as names with special
characters, underscores, non-ascii characters,
now properly translate bind parameter keys when
talking to cx_oracle.  [ticket:2100]  (Also
in 0.6.7)
2011-03-27 19:39:39 -04:00
Mike Bayer 7b24e458c7 - move all the comments that got shoved below the fixture grabs back up 2011-03-27 17:19:00 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer ebd0fdad73 - convert @provide_metadata to use self access
- having occasional issues with BasicEntity grabbing, if it persists
may have to pass an explicit base class into setup_classes()/setup_mappers()
2011-03-26 21:40:05 -04:00
Mike Bayer 14a2fae239 - remove @testing.resolve_artifact_names, replace with direct attribute
access to the cls/self.tables/classes registries
- express orm/_base.py ORMTest in terms of engine/_base.py TablesTest,
factor out common steps into TablesTest, remove AltEngineTest as a
separate class.   will further consolidate these base classes
2011-03-26 19:03:11 -04:00
Mike Bayer 5d385768e6 whoops, only on SQL server 2011-03-18 12:30:06 -04:00
Mike Bayer 798339430a - Rewrote the query used to get the definition of a view,
typically when using the Inspector interface, to
use sys.sql_modules instead of the information schema,
thereby allowing views definitions longer than 4000
characters to be fully returned.  [ticket:2071]
2011-03-16 14:06:33 -04:00
Mike Bayer f75ea6945c - Fixed the BIT type to allow a "length" parameter, "varying"
parameter.  Reflection also fixed.  [ticket:2073]
2011-03-16 11:01:20 -04:00
Michael Trier a50b362b1b Merge 2011-03-15 18:00:17 -04:00
Jim Phares fde2a7f8fe Informix and postgresql reserved words changes -- almost done. 2011-03-15 16:56:45 -04:00
Diana Clarke 13242f766e corrected a bunch of spelling typos 2011-02-28 13:17:46 -05:00
Mike Bayer 74f26d2279 - Fixed regression from 0.6 where SMALLINT and
BIGINT types would both generate SERIAL
on an integer PK column, instead of
SMALLINT and BIGSERIAL [ticket:2065]
2011-02-17 20:43:17 -05:00
Mike Bayer 2e4da52221 - The Sequence() construct, when passed a MetaData()
object via its 'metadata' argument, will be
included in CREATE/DROP statements within
metadata.create_all() and metadata.drop_all(),
including "checkfirst" logic.  [ticket:2055]
2011-02-13 19:32:00 -05:00
Mike Bayer 33eae4a140 make it more explicit in tests which dialect we want to use for things 2011-02-11 11:24:54 -05:00
Mike Bayer 09efc11fbc - need to limit the list of oracle fn's that don't get parens to a
fixed list.  window functions need parens
2011-02-11 00:49:28 -05:00
Mike Bayer ed4534ea8a fix sqlite test 2011-02-11 00:24:38 -05:00
Mike Bayer 134a4cb3a6 fix some tests 2011-02-10 23:37:15 -05:00
Mike Bayer ad8700a556 - oursql dialect accepts the same "ssl" arguments in
create_engine() as that of MySQLdb.  [ticket:2047]
2011-02-10 18:04:54 -05:00
Mike Bayer bc52cae455 - mssql VARBINARY emits 'max' for length when no length specified, as is
the case already for VARCHAR, NVARCHAR [ticket:1833]
2011-02-10 15:22:07 -05:00
Mike Bayer e43f85965e - The path given as the location of a sqlite database is now
normalized via os.path.abspath(), so that directory changes
within the process don't affect the ultimate location
of a relative file path.  [ticket:2036]
2011-02-10 15:03:11 -05:00
Mike Bayer 3f9a343d72 - Query.distinct() now accepts column expressions
as *args, interpreted by the Postgresql dialect
  as DISTINCT ON (<expr>). [ticket:1069]
- select.distinct() now accepts column expressions
  as *args, interpreted by the Postgresql dialect
  as DISTINCT ON (<expr>).  Note this was already
  available via passing a list to the `distinct`
  keyword argument to select(). [ticket:1069]
- select.prefix_with() accepts multiple expressions
  (i.e. *expr), 'prefix' keyword argument to select()
  accepts a list or tuple.
- Passing a string to the `distinct` keyword argument
  of `select()` for the purpose of emitting special
  MySQL keywords (DISTINCTROW etc.) is deprecated -
  use `prefix_with()` for this.
- put kw arguments to select() in order
- restore docs for _SelectBase, renamed from _SelectBaseMixin
2011-02-10 14:17:08 -05:00
Mike Bayer 7e8f351097 - Non-DBAPI errors which occur in the scope of an execute()
call are now wrapped in sqlalchemy.exc.StatementError,
and the text of the SQL statement and repr() of params
is included.  This makes it easier to identify statement
executions which fail before the DBAPI becomes
involved.  [ticket:2015]
2011-02-09 18:11:40 -05:00
Mike Bayer d5cc2f83c1 - When explicit sequence execution derives the name
of the auto-generated sequence of a SERIAL column,
which currently only occurs if implicit_returning=False,
now accommodates if the table + column name is greater
than 63 characters using the same logic Postgresql uses.
[ticket:1083]
2011-02-04 17:37:36 -05:00
Mike Bayer 5a2c332f5e - Some adjustments so that Interbase is supported as well.
FB/Interbase version idents are parsed into a structure
such as (8, 1, 1, 'interbase') or (2, 1, 588, 'firebird')
so they can be distinguished. [ticket:1885]
- fixed relfection of the "autoincrement" flag against a default
placed on the column.
2011-02-01 16:34:37 -05:00
Mike Bayer 1515073b96 - New DBAPI support for pymysql, a pure Python port
of MySQL-python.  [ticket:1991]
2011-01-26 11:18:03 -05:00
Mike Bayer aa62a3a833 - factor consistent set_isolation_level(), get_isolation_level()
per-connection methods for sqlite, postgresql, psycopg2 dialects
- move isolation test suite to test engines/test_transaction
- preparing for [ticket:2001]
2011-01-16 13:05:18 -05:00
Mike Bayer fc0ffac241 stupid workaround for pg8000 2011-01-15 13:49:39 -05:00
Mike Bayer 75b5236e69 - the _pk_processors/_prefetch_processors approach relied upon calling RPs without a cursor.description
result, also generates procs that are not used in most cases.  simplify the approach
by passing type to _exec_default() to be used if needed by _execute_scalar(),
looking for the proc on just t._autoincrement_column in post_insert().
2011-01-15 11:53:37 -05:00
Mike Bayer af3bfefc62 - fix reflection of unknown types with arguments, NullType() accepts no arguments. 2011-01-12 17:17:33 -05:00