Commit Graph

141 Commits

Author SHA1 Message Date
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
Mike Bayer 84ec085d47 MSText no longer implicitly creates TEXT for string with no length
(this actually allows CAST (foo, VARCHAR) to render too)
2008-05-09 19:00:55 +00:00
Mike Bayer 4a6afd469f r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
2008-05-09 16:34:10 +00:00
Lele Gaifax c79342ef95 Firebird 2 has a SUBSTRING() builtin, expose it thru a function 2008-04-11 22:14:34 +00:00
Mike Bayer e3b2305d67 - merged -r4458:4466 of query_columns branch
- this branch changes query.values() to immediately return an iterator, adds a new "aliased" construct which will be the primary method to get at aliased columns when using values()
- tentative ORM versions of _join and _outerjoin are not yet public, would like to integrate with Query better (work continues in the branch)
- lots of fixes to expressions regarding cloning and correlation.  Some apparent ORM bug-workarounds removed.
- to fix a recursion issue with anonymous identifiers, bind parameters generated against columns now just use the name of the column instead of the tablename_columnname label (plus the unique integer counter).  this way expensive recursive schemes aren't needed for the anon identifier logic.   This, as usual, impacted a ton of compiler unit tests which needed a search-n-replace for the new bind names.
2008-04-07 01:12:44 +00:00
Mike Bayer bf77ddaabb - Got PG server side cursors back into shape, added fixed
unit tests as part of the default test suite.  Added
better uniqueness to the cursor ID [ticket:1001]
- update().values() and insert().values() take keyword
arguments.
2008-04-02 22:33:50 +00:00
Mike Bayer 38b2869bb8 some fixes to the MS-SQL aliasing so that result_map is properly populated 2008-04-02 16:35:06 +00:00
Mike Bayer cfd7807838 some test fixup for oracle 2008-04-02 16:12:07 +00:00
Jason Kirtland f12969a4d8 - Revamped the Connection memoize decorator a bit, moved to engine
- MySQL character set caching is more aggressive but will invalidate the cache if a SET is issued.
- MySQL connection memos are namespaced: info[('mysql', 'server_variable')]
2008-04-02 11:39:26 +00:00
Mike Bayer c08c6c2185 continue attempting to get proper count for pybot on 2.5, ensure order_by for oracle query 2008-04-02 02:42:29 +00:00
Mike Bayer 61d8644320 - added verbose activity to profiling.function_call_count
- simplified oracle non-ansi join generation, removed hooks from base compiler
- removed join() call from _label generation, fixed repeat label gen
2008-04-01 22:36:40 +00:00
Mike Bayer 7ae89c28f0 fix up some unit tests 2008-04-01 17:46:36 +00:00
Mike Bayer 7512b5e548 - schema-qualified tables now will place the schemaname
ahead of the tablename in all column expressions as well
as when generating column labels.  This prevents cross-
schema name collisions in all cases [ticket:999]
- the "use_schema" argument to compiler.visit_column() is removed.  It uses
schema in all cases now.
- added a new test to the PG dialect to test roundtrip insert/update/delete/select
statements with full schema qualification
2008-03-30 21:48:19 +00:00