summaryrefslogtreecommitdiff
path: root/test/sql/defaults.py
Commit message (Collapse)AuthorAgeFilesLines
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-634/+0
| | | | | See README.unittests for information on how to run the tests. [ticket:970]
* Modified fails_on testing decorator to take a reason for the failure.Michael Trier2008-12-121-13/+13
| | | | | This should assist with helping to document the reasons for testing failures. Currently unspecified failures are defaulted to 'FIXME: unknown'.
* - fixed some oracle unit tests in test/sql/Mike Bayer2008-10-241-1/+2
| | | | | - wrote a docstring for oracle dialect, needs formatting perhaps - made FIRST_ROWS optimization optional based on optimize_limits=True, [ticket:536]
* Modifications to allow the backends to control the behavior of an empty ↵Michael Trier2008-10-201-1/+17
| | | | insert. If supports_empty_insert is True then the backend specifically supports the 'insert into t1 () values ()' syntax. If supports_default_values is True then the backend supports the 'insert into t1 default values' syntax. If both are false then the backend has no support for empty inserts at all and an exception gets raised. Changes here are careful to not change current behavior except where the current behavior was failing to begin with.
* Verified that Subqueries are not allowed in VALUES. mssql supports a SELECT ↵Michael Trier2008-10-191-1/+1
| | | | | | syntax but only as the source of all inserts. (cherry picked from commit 4516db6b322fb1feaa04915f09b8b4fabd6b9735)
* Removed the visit_function stuff in mssql dialect. Added some tests for the ↵Michael Trier2008-10-111-3/+4
| | | | function overrides. Fixed up the test_select in the sql/defaults.py tests which was a mess.
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-151-1/+0
| | | | (sets.Set-based collections & DB-API returns still work.)
* - Quick cleanup of defaults.py. The main DefaultTest is still a mess.Jason Kirtland2008-05-201-151/+151
|
* Split out a couple true autoincrement/identity tests from ↵Jason Kirtland2008-05-191-30/+43
| | | | emulated-with-sequences autoincrement=True tests.
* - Removed @unsupportedJason Kirtland2008-05-141-1/+1
|
* Columns now have default= and server_default=. PassiveDefault fades away.Jason Kirtland2008-05-141-34/+131
|
* Test suite modernization in progress. Big changes:Jason Kirtland2008-05-091-4/+7
| | | | | | | | | | | - @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
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-3/+3
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - updated the naming scheme of the base test classes in test/testlib/testing.py;Mike Bayer2008-02-111-4/+4
| | | | | tests extend from either TestBase or ORMTest, using additional mixins for special assertion methods as needed
* - ColumnDefault callables can now be any kind of compliant callable, ↵Jason Kirtland2008-02-041-10/+33
| | | | previously only actual functions were allowed.
* - testbase is gone, replaced by testenvJason Kirtland2008-01-121-27/+27
| | | | | | - Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase - testing.db has the configured db - Fixed up the perf/* scripts
* - added a mapper() flag "eager_defaults"; when set toMike Bayer2008-01-101-2/+6
| | | | | | | True, defaults that are generated during an INSERT or UPDATE operation are post-fetched immediately, instead of being deferred until later. This mimics the old 0.3 behavior.
* Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. ↵Jason Kirtland2008-01-101-1/+1
| | | | No surprises.
* fix up oracle handling of LOB/string [ticket:902], slight fixes to ↵Mike Bayer2008-01-011-5/+7
| | | | | | defaults.py but we will need to fix up result-type handling some more
* - Removed @testing.supported. Dialects in development or maintained outsideJason Kirtland2007-12-131-64/+65
| | | | | | | | | | | the tree can now run the full suite of tests out of the box. - Migrated most @supported to @fails_on, @fails_on_everything_but, or (last resort) @unsupported. @fails_on revealed a slew of bogus test skippage, which was corrected. - Added @fails_on_everything_but. Yes, the first usage *was* "fails_on_everything_but('postgres')". How did you guess! - Migrated @supported in dialect/* to the new test-class attribute __only_on__. - Test classes can also have __unsupported_on__ and __excluded_on__.
* - flush() refactor merged from uow_nontree branch r3871-r3885Mike Bayer2007-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - topological.py cleaned up, presents three public facing functions which return list/tuple based structures, without exposing any internals. only the third function returns the "hierarchical" structure. when results include "cycles" or "child" items, 2- or 3- tuples are used to represent results. - unitofwork uses InstanceState almost exclusively now. new and deleted lists are now dicts which ref the actual object to provide a strong ref for the duration that they're in those lists. IdentitySet is only used for the public facing versions of "new" and "deleted". - unitofwork topological sort no longer uses the "hierarchical" version of the sort for the base sort, only for the "per-object" secondary sort where it still helps to group non-dependent operations together and provides expected insert order. the default sort deals with UOWTasks in a straight list and is greatly simplified. Tests all pass but need to see if svilen's stuff still works, one block of code in _sort_cyclical_dependencies() seems to not be needed anywhere but i definitely put it there for a reason at some point; if not hopefully we can derive more test coverage from that. - the UOWEventHandler is only applied to object-storing attributes, not scalar (i.e. column-based) ones. cuts out a ton of overhead when setting non-object based attributes. - InstanceState also used throughout the flush process, i.e. dependency.py, mapper.save_obj()/delete_obj(), sync.execute() all expect InstanceState objects in most cases now. - mapper/property cascade_iterator() takes InstanceState as its argument, but still returns lists of object instances so that they are not dereferenced. - a few tricks needed when dealing with InstanceState, i.e. when loading a list of items that are possibly fresh from the DB, you *have* to get the actual objects into a strong-referencing datastructure else they fall out of scope immediately. dependency.py caches lists of dependent objects which it loads now (i.e. history collections). - AttributeHistory is gone, replaced by a function that returns a 3-tuple of added, unchanged, deleted. these collections still reference the object instances directly for the strong-referencing reasons mentiontioned, but it uses less IdentitySet logic to generate.
* MSSQL doesn't support subqueries in insert values; disable testPaul Johnston2007-11-251-0/+1
|
* - fixed INSERT statements w.r.t. primary key columns that have SQL-expressionMike Bayer2007-10-281-0/+28
| | | | | | based default generators on them; SQL expression executes inline as normal but will not trigger a "postfetch" condition for the column, for those DB's who provide it via cursor.lastrowid
* Added support for dialects that have both sequences and autoincrementing PKs.Jason Kirtland2007-10-231-19/+53
|
* - Rewrote autoincrement tests: added new scenarios, changed the orm fetchid ↵Jason Kirtland2007-10-071-40/+63
| | | | to explicit test of last_row_ids(), and now testing transactional/autocommit modes separately to help catch any subtle issues that may exist due to assumed cursor state during post_exec().
* Avoid tickling the MySQL-python 1.2.2 executemany parsing bug on a couple tests.Jason Kirtland2007-09-261-0/+10
|
* - got all examples workingMike Bayer2007-09-011-1/+1
| | | | | | | - inline default execution occurs for *all* non-PK columns unconditionally - preexecute only for non-executemany PK cols on PG, Oracle, etc. - new default docs
* - merged inline inserts branchMike Bayer2007-09-011-20/+34
| | | | | | | | | | | | - all executemany() style calls put all sequences and SQL defaults inline into a single SQL statement and don't do any pre-execution - regular Insert and Update objects can have inline=True, forcing all executions to be inlined. - no last_inserted_ids(), lastrow_has_defaults() available with inline execution - calculation of pre/post execute pushed into compiler; DefaultExecutionContext greatly simplified - fixed postgres reflection of primary key columns with no sequence/default generator, sets autoincrement=False - fixed postgres executemany() behavior regarding sequences present, not present, passivedefaults, etc. - all tests pass for sqlite, mysql, postgres; oracle tests pass as well as they did previously including all insert/update/default functionality
* Adjusted ColumnDefault default function fitness check to only insure that a ↵Jason Kirtland2007-08-221-7/+20
| | | | given function had no more than one non-defaulted positional arg.
* `from foo import (name, name)` isn't valid syntax for 2.3. ah well.Jason Kirtland2007-08-211-2/+1
| | | | omitting modules from sqlalchemy.__all__...
* - merged "fasttypes" branch. this branch changes the signatureMike Bayer2007-08-141-6/+33
| | | | | | | | | | | | | of convert_bind_param() and convert_result_value() to callable-returning bind_processor() and result_processor() methods. if no callable is returned, no pre/post processing function is called. - hooks added throughout base/sql/defaults to optimize the calling of bind param/result processors so that method call overhead is minimized. special cases added for executemany() scenarios such that unneeded "last row id" logic doesn't kick in, parameters aren't excessively traversed. - new performance tests show a combined mass-insert/mass-select test as having 68% fewer function calls than the same test run against 0.3. - general performance improvement of result set iteration is around 10-20%.
* - oracle reflection of case-sensitive names all fixed upMike Bayer2007-08-101-4/+4
| | | | - other unit tests corrected for oracle
* - assurances that context.connection is safe to use by column default ↵Mike Bayer2007-07-311-8/+17
| | | | functions, helps proposal for [ticket:703]
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-34/+95
| | | | maintenance branch in branches/rel_0_3.
* - improved ability to get the "correct" and most minimal set of primary keyMike Bayer2007-07-141-0/+10
| | | | | | | columns from a join, equating foreign keys and otherwise equated columns. this is also mostly to help inheritance scenarios formulate the best choice of primary key columns. [ticket:185] - added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
* Fix setup for standalone sequence testJason Kirtland2007-07-131-1/+1
|
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-061-5/+5
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation
* - oracle:Mike Bayer2007-03-101-3/+3
| | | | | | | | - got binary working for any size input ! cx_oracle works fine, it was my fault as BINARY was being passed and not BLOB for setinputsizes (also unit tests werent even setting input sizes). - auto_setinputsizes defaults to True for Oracle, fixed cases where it improperly propigated bad types.
* reverted unit test changeMike Bayer2007-02-191-1/+1
|
* Completed previously missed patches from tickets 422 and 415Rick Morrison2007-02-181-1/+28
| | | | | get unit tests to work with pyodbc [ticket:481] fix blank password on adodbapi [ticket:371]
* - more quoting fixes for [ticket:450]...quoting more aggressive (but still ↵Mike Bayer2007-02-041-0/+1
| | | | | | | | skips already-quoted literals) - got mysql to have "format" as default paramstyle even if mysql module not available, allows unit tests to pass in non-mysql system for [ticket:457]. all the dialects should be changed to pass in their usual paramstyle.
* - sequences on a non-pk column will properly fire off on INSERT for PG/oracleMike Bayer2007-02-021-4/+19
|
* further fixes to sqlite booleans, weren't working as defaultsMike Bayer2006-10-291-3/+6
|
* - added autoincrement=True to Column; will disable schema generationMike Bayer2006-09-231-6/+37
| | | | | of SERIAL/AUTO_INCREMENT/identity seq for postgres/mysql/mssql if explicitly set to False. #303
* reorganized unit tests into subdirectoriesMike Bayer2006-06-051-0/+168