Commit Graph

803 Commits

Author SHA1 Message Date
Michael Trier 6ea3521b45 sqlite reflection now stores the actual DefaultClause value for the column. 2009-01-02 22:40:45 +00:00
Michael Trier 2f2d84fbb1 Swap out text_as_varchar on the mssql dialect for the Types tests. 2009-01-02 20:33:14 +00:00
Michael Trier df267fcc77 Added in MSGenericBinary to the mssql dialect tests. 2008-12-29 21:38:04 +00:00
Mike Bayer 8598780e8d - Added OracleNVarchar type, produces NVARCHAR2, and also
subclasses Unicode so that convert_unicode=True by default.
      NVARCHAR2 reflects into this type automatically so
      these columns pass unicode on a reflected table with no explicit
      convert_unicode=True flags.  [ticket:1233]
2008-12-28 22:32:04 +00:00
Michael Trier 8669eda82d Added in a new MSGenericBinary type.
This maps to the Binary type so it can implement the specialized behavior of
treating length specified types as fixed-width Binary types and non-length
types as an unbound variable length Binary type.
2008-12-28 21:07:57 +00:00
Michael Trier cae83f6d4f On MSSQL if a field is part of the primary_key then it should not allow NULLS. 2008-12-28 07:40:56 +00:00
Michael Trier defba2fc02 MSSQL refactoring of BINARY type and addition of MSVarBinary and MSImage.
- Added in new types: MSVarBinary and MSImage
- Modified MSBinary to now return BINARY instead of IMAGE. This is a
  backwards incompatible change. Closes #1249.
2008-12-28 01:46:44 +00:00
Mike Bayer 864644bee4 - Added Index reflection support to Postgres, using a
great patch we long neglected, submitted by
Ken Kuhlman. [ticket:714]
2008-12-23 04:47:52 +00:00
Michael Trier 5b09d8179e Merge branch 'collation' 2008-12-23 04:08:13 +00:00
Michael Trier 886ddcd12d Major refactoring of the MSSQL dialect. Thanks zzzeek.
Includes simplifying the IDENTITY handling and the exception handling. Also
includes a cleanup of the connection string handling for pyodbc to favor
the DSN syntax.
2008-12-22 20:20:55 +00:00
Mike Bayer d76dc73f33 merge the test/ directory from -r5438:5439 of py3k_warnings branch. this gives
us a 2.5-frozen copy of unittest so we're insulated from unittest changes.
2008-12-18 18:11:12 +00:00
Michael Trier f9b8641269 Support for three levels of column nullability: NULL, NOT NULL, and the database's configured default.
The default Column configuration (nullable=True) will now generate NULL in the DDL. Previously no specification was emitted and the database default would take effect (usually NULL, but not always).  To explicitly request the database default, configure columns with nullable=None and no specification will be emitted in DDL. Fixes #1243.
2008-12-12 04:49:24 +00:00
Michael Trier 260c201f65 Corrected mssql schema named subqueries from not properly aliasing the columns. Fixes #973. 2008-11-12 05:36:45 +00:00
Mike Bayer 61db44d958 remove errant pdb.set_trace() 2008-11-11 02:04:56 +00:00
Jason Kirtland d403d8b865 Quashed import sets deprecation warning on 2.6.. not wild about this but it seems like it will be ok. [ticket:1209] 2008-11-10 22:56:22 +00:00
Michael Trier 17980ba83c Fixed E notation problem in mssql. Closes #1216. 2008-11-08 06:37:45 +00:00
Michael Trier 8924a0e4fe Corrected a lot of mssql limit / offset issues. Also ensured that mssql uses the IN / NOT IN syntax when using a binary expression with a subquery. 2008-11-08 04:43:35 +00:00
Jason Kirtland 89b86f41bb Tiny fix to test setup logic. 2008-11-04 18:29:33 +00:00
Jason Kirtland 554f223f6b Accept USING as a prefix or postfix modifer when reflecting keys. [ticket:1117] 2008-10-28 21:32:24 +00:00
Michael Trier d4dcb2e217 Mysql no longer expects include_columns to be specified in lowercase. Fixes #1206. 2008-10-28 16:48:13 +00:00
Mike Bayer ecf22b390b auto_convert_lobs=False honored by OracleBinary, OracleText types
[ticket:1178]
2008-10-24 17:09:58 +00:00
Mike Bayer 3bbf8037f8 - fixed some oracle unit tests in test/sql/
- wrote a docstring for oracle dialect, needs formatting perhaps
- made FIRST_ROWS optimization optional based on optimize_limits=True, [ticket:536]
2008-10-24 15:58:17 +00:00
Mike Bayer 99cd1346fb - CompileTests run without the DBAPI being used
- added stack logic back to visit_compound(), pared down is_subquery
2008-10-23 02:35:08 +00:00
Michael Trier e7b43dd33f Corrected missing declaration in the mssql dialect test. 2008-10-21 03:21:16 +00:00
Michael Trier dfd71d6ac8 Cleaned up the create_connect_args so that it makes no expectations about keys. Fixes 1193. Added server version info into mssql pyodbc dialect. 2008-10-19 01:18:15 +00:00
Mike Bayer a20222fc22 - 0.5.0rc3, doh
- The internal notion of an "OID" or "ROWID" column has been
removed.  It's basically not used by any dialect, and the
possibility of its usage with psycopg2's cursor.lastrowid
is basically gone now that INSERT..RETURNING is available.

- Removed "default_order_by()" method on all FromClause
objects.
- profile/compile/select test is 8 function calls over on buildbot 2.4 for some reason, will adjust after checking
the results of this commit
2008-10-18 18:14:06 +00:00
Mike Bayer 4ca89fd3c4 - String's (and Unicode's, UnicodeText's, etc.) convert_unicode
logic disabled in the sqlite dialect, to adjust for pysqlite
2.5.0's new requirement that only Python unicode objects are
accepted;
http://itsystementwicklung.de/pipermail/list-pysqlite/2008-March/000018.html
2008-10-12 14:39:20 +00:00
Michael Trier 41e1f5526c Removed the visit_function stuff in mssql dialect. Added some tests for the function overrides. Fixed up the test_select in the sql/defaults.py tests which was a mess. 2008-10-11 16:14:20 +00:00
Mike Bayer ff3df488f5 - Oracle will detect string-based statements which contain
comments at the front before a SELECT as SELECT statements.
      [ticket:1187]
2008-10-07 16:58:53 +00:00
Mike Bayer 8d2fd5f87a - Overhauled SQLite date/time bind/result processing
to use regular expressions and format strings, rather
than strptime/strftime, to generically support
pre-1900 dates, dates with microseconds.  [ticket:968]
2008-09-19 22:59:28 +00:00
Mike Bayer a21dc3d3e3 - the function func.utc_timestamp() compiles to UTC_TIMESTAMP, without
the parenthesis, which seem to get in the way when using in
conjunction with executemany().
2008-09-10 21:09:04 +00:00
Mike Bayer a229f0d9c7 correct extra space in SQL assertions 2008-09-03 18:03:03 +00:00
Mike Bayer 9eafb43c0f - limit/offset no longer uses ROW NUMBER OVER to limit rows,
and instead uses subqueries in conjunction with a special
      Oracle optimization comment.  Allows LIMIT/OFFSET to work
      in conjunction with DISTINCT. [ticket:536]
2008-09-03 16:53:05 +00:00
Mike Bayer ae573e047a - Added MSMediumInteger type [ticket:1146]. 2008-08-24 21:20:05 +00:00
Mike Bayer 6f60e76883 - The 'length' argument to all Numeric types has been renamed
to 'scale'.  'length' is deprecated and is still accepted
with a warning. [ticket:827]
- The 'length' argument to MSInteger, MSBigInteger, MSTinyInteger,
MSSmallInteger and MSYear has been renamed to 'display_width'.
[ticket:827]
- mysql._Numeric now consumes 'unsigned' and 'zerofill' from
the given kw, so that the same kw can be passed along to Numeric
and allow the 'length' deprecation logic to still take effect
- added testlib.engines.all_dialects() to return a dialect for
every db module
- informix added to sqlalchemy.databases.__all__.  Since other
"experimental" dbs like access and sybase are there, informix
should be as well.
2008-08-24 19:52:54 +00:00
Michael Trier c622a86286 Raised an error when sqlite version does not support default values. Addresses #909 in a purposeful way. 2008-07-29 03:08:38 +00:00
Jason Kirtland a00b42b289 - mysql.MSEnum value literals now automatically quoted when used in a CREATE.
The change is backward compatible. Slight expansion of patch from catlee.
  Thanks! [ticket:1110]
2008-07-16 18:24:20 +00:00
Jason Kirtland 8b12c8f1c2 - Removed 2.3 Decimal compat 2008-07-15 19:40:08 +00:00
Mike Bayer 05b44779a7 2.4 support ! 2008-07-14 19:42:42 +00:00
Michael Trier f899157ca9 Added new basic match() operator that performs a full-text search. Supported on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends. 2008-07-13 04:45:37 +00:00
Mike Bayer e7e60c05c0 - SQLite Date, DateTime, and Time types only accept Python
datetime objects now, not strings.  If you'd like to format
dates as strings yourself with SQLite, use a String type.
If you'd like them to return datetime objects anyway despite
their accepting strings as input, make a TypeDecorator around
String - SQLA doesn't encourage this pattern.
2008-07-09 16:15:14 +00:00
Mike Bayer 4a66683c9f - Modified SQLite's representation of "microseconds" to
match the output of str(somedatetime), i.e. in that the
microseconds are represented as fractional seconds in
string format.  [ticket:1090]
- implemented a __legacy_microseconds__ flag on DateTimeMixin which can
be used per-class or per-type instances to get the old behavior, for
compatibility with existing SQLite databases encoded by a previous
version of SQLAlchemy.
- will implement the reverse legacy behavior in 0.4.
2008-06-27 20:12:11 +00:00
Mike Bayer 3bff98d530 test coverage for server side statement detection 2008-06-17 20:16:26 +00:00
Mike Bayer 29e34c2a4b merged [ticket:1062] fix from 0.4 branch r4827 2008-05-30 21:01:20 +00:00
Mike Bayer fa42abd213 oracle dialect takes schema name into account when checking for existing tables
of the same name. [ticket:709]
2008-05-24 23:34:04 +00:00
Lele Gaifax 664687adb9 The column default has been renamed server_default in 0.5 2008-05-16 23:09:54 +00:00
Lele Gaifax 590e74182f Fix table.delete() arguments 2008-05-15 12:45:50 +00:00
Jason Kirtland 65f4f02ec8 Columns now have default= and server_default=. PassiveDefault fades away. 2008-05-14 19:49:40 +00:00
Lele Gaifax 623adee1c4 Support Firebird 2.0+ RETURNING 2008-05-14 15:31:29 +00:00
Jason Kirtland e41c0f4107 Test suite modernization in progress. Big changes:
- @unsupported now only accepts a single target and demands a reason
   for not running the test.
 - @exclude also demands an exclusion reason
 - Greatly expanded @testing.requires.<feature>, eliminating many
   decorators in the suite and signficantly easing integration of
   multi-driver support.
 - New ORM test base class, and a featureful base for mapped tests
 - Usage of 'global' for shared setup going away, * imports as well
2008-05-09 20:26:09 +00:00