summaryrefslogtreecommitdiff
path: root/test/sql/test_defaults.py
Commit message (Collapse)AuthorAgeFilesLines
* - The SQL compiler now generates the mapping of expected columnspositional_targetingMike Bayer2015-03-071-1/+1
| | | | | | | | | | | | | | | | | such that they are matched to the received result set positionally, rather than by name. Originally, this was seen as a way to handle cases where we had columns returned with difficult-to-predict names, though in modern use that issue has been overcome by anonymous labeling. In this version, the approach basically reduces function call count per-result by a few dozen calls, or more for larger sets of result columns. The approach still degrades into a modern version of the old approach if textual elements modify the result map, or if any discrepancy in size exists between the compiled set of columns versus what was received, so there's no issue for partially or fully textual compilation scenarios where these lists might not line up. fixes #918 - callcounts still need to be adjusted down for this so zoomark tests won't pass at the moment
* - Literal values within a :class:`.DefaultClause`, which is invokedMike Bayer2015-02-091-3/+70
| | | | | | | when using the :paramref:`.Column.server_default` parameter, will now be rendered using the "inline" compiler, so that they are rendered as-is, rather than as bound parameters. fixes #3087
* - fix this test for py3kMike Bayer2015-01-261-1/+1
|
* Merge remote-tracking branch 'origin/pr/150'Mike Bayer2015-01-261-1/+2
|\
| * Report the type of unexpected expression objectspr/150Ryan P. Kelly2014-11-201-1/+2
| |
* | - The multi-values version of :meth:`.Insert.values` has beenMike Bayer2015-01-131-6/+16
|/ | | | | | | | | | | | repaired to work more usefully with tables that have Python- side default values and/or functions, as well as server-side defaults. The feature will now work with a dialect that uses "positional" parameters; a Python callable will also be invoked individually for each row just as is the case with an "executemany" style invocation; a server- side default column will no longer implicitly receive the value explicitly specified for the first row, instead refusing to invoke without an explicit value. fixes #3288
* - :meth:`.Insert.from_select` now includes Python and SQL-expressionMike Bayer2014-10-101-0/+65
| | | | | | | defaults if otherwise unspecified; the limitation where non- server column defaults aren't included in an INSERT FROM SELECT is now lifted and these expressions are rendered as constants into the SELECT statement.
* - optional 'b' here for py3kMike Bayer2014-08-311-1/+1
|
* - A new style of warning can be emitted which will "filter" up toMike Bayer2014-08-311-2/+3
| | | | | | | | | N occurrences of a parameterized string. This allows parameterized warnings that can refer to their arguments to be delivered a fixed number of times until allowing Python warning filters to squelch them, and prevents memory from growing unbounded within Python's warning registries. fixes #3178
* - update the flake8 rules againMike Bayer2014-07-181-0/+8
| | | | - apply autopep8 + manual fixes to most of test/sql/
* PEP8 tidy of subset of test/sql/*.pypr/103Tony Locke2014-07-071-122/+166
|
* pg8000 passing test/sqlTony Locke2014-07-061-2/+2
|
* - rename __multiple__ to __backend__, and apply __backend__ to a large ↵Mike Bayer2014-03-241-0/+15
| | | | | | number of tests. - move out logging tests from test_execute to test_logging
* - Fixed issue where a primary key column that has a Sequence on it,Mike Bayer2013-12-201-0/+28
| | | | | | | | | yet the column is not the "auto increment" column, either because it has a foreign key constraint or ``autoincrement=False`` set, would attempt to fire the Sequence on INSERT for backends that don't support sequences, when presented with an INSERT missing the primary key value. This would take place on non-sequence backends like SQLite, MySQL. [ticket:2896]
* - remove informix dialect, moved out to ↵Mike Bayer2013-11-171-4/+2
| | | | | | https://bitbucket.org/zzzeek/sqlalchemy_informixdb - remove informix, maxdb, access symbols from tests etc.
* The ``default`` argument of :class:`.Column` now accepts a classMike Bayer2013-10-111-10/+20
| | | | | or object method as an argument, in addition to a standalone function; will properly detect if the "context" argument is accepted or not.
* merge defaultMike Bayer2013-05-051-0/+2
|\
| * cleanupMike Bayer2013-05-041-67/+68
| |
* | and int types here...Mike Bayer2013-05-041-1/+2
| |
* | update testMike Bayer2013-05-041-12/+3
| |
* | cleanup and formattingMike Bayer2013-05-041-67/+68
| |
* | - the raw 2to3 runMike Bayer2013-04-271-13/+15
|/ | | | - went through examples/ and cleaned out excess list() calls
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-5/+6
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - further reorganization of test suite:Mike Bayer2012-09-261-3/+0
| | | | | | | | | | | - bootstrap and lib move to all absolute imports - testing.py is no longer internally referenced. - requirements move to be a pluggable class which can be overridden. - cleanup in the interests of third party testing, test/lib and test/bootstrap may move to be an independent package.
* - fixes for mxODBC, some pyodbcMike Bayer2012-09-021-0/+3
| | | | | | - enhancements to test suite including ability to set up a testing engine for a whole test class, fixes to how noseplugin sets up/tears down per-class context
* - [bug] Fixes to the interpretation of theMike Bayer2012-08-201-11/+19
| | | | | | Column "default" parameter as a callable to not pass ExecutionContext into a keyword argument parameter. [ticket:2520]
* -whitespace bonanza, contdMike Bayer2012-07-281-26/+26
|
* add a checkfirst here as s3 seems to be stuck on the jenkins dbMike Bayer2012-03-141-1/+1
|
* tests for FK/autoincrement selectionMike Bayer2011-12-061-0/+24
|
* - Fixed bug where "autoincrement" detection onMike Bayer2011-06-301-1/+11
| | | | | | | Table would fail if the type had no "affinity" value, in particular this would occur when using the UUID example on the site that uses TypeEngine as the "impl".
* fix some testsMike Bayer2011-06-021-1/+1
|
* - move all the comments that got shoved below the fixture grabs back upMike Bayer2011-03-271-0/+4
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-13/+13
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - convert @provide_metadata to use self accessMike Bayer2011-03-261-0/+12
| | | | | - having occasional issues with BasicEntity grabbing, if it persists may have to pass an explicit base class into setup_classes()/setup_mappers()
* - remove @testing.resolve_artifact_names, replace with direct attributeMike Bayer2011-03-261-4/+4
| | | | | | | 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
* - Added new generic function "next_value()", acceptsMike Bayer2011-03-201-26/+184
| | | | | | | | | | | | | | | | | | | | a Sequence object as its argument and renders the appropriate "next value" generation string on the target platform, if supported. Also provides ".next_value()" method on Sequence itself. [ticket:2085] - added tests for all the conditions described in [ticket:2085] - postgresql dialect will exec/compile a Sequence that has "optional=True". the optional flag is now only checked specifically in the context of a Table primary key evaulation. - func.next_value() or other SQL expression can be embedded directly into an insert() construct, and if implicit or explicit "returning" is used in conjunction with a primary key column, the newly generated value will be present in result.inserted_primary_key. [ticket:2084]
* Tests for unicode columns with non-unicode defaults. See #2079.Taavi Burns2011-03-141-1/+27
|
* - The Sequence() construct, when passed a MetaData()Mike Bayer2011-02-131-84/+124
| | | | | | | 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]
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-2/+2
| | | | | | | | 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]
* Regarding reflection for this case, reflection of an int PK colMike Bayer2011-01-151-5/+0
| | | | | | with a server_default sets the "autoincrement" flag to False, except in the case of a PG SERIAL col where we detected a sequence default. [ticket:2020] [ticket:2021]
* - getting slightly more consistent behavior for the edge case of pk columnsMike Bayer2011-01-151-7/+138
| | | | | | with server default - autoincrement is now false with any server_default, so these all return None, applies consistency to [ticket:2020], [ticket:2021]. if prefetch is desired a "default" should be used instead of server_default.
* - dont count server_default absense as part of autoincrement, PGMike Bayer2011-01-121-1/+0
| | | | | | will have a value here upon reflection. - mysql, others will have to check "server_default" when rendering special keywords like AUTOINCREMENT
* - A TypeDecorator of Integer can be used with a primary keyMike Bayer2011-01-111-3/+82
| | | | | | | | | | | | | | | | | | | column, and the "autoincrement" feature of various dialects as well as the "sqlite_autoincrement" flag will honor the underlying database type as being Integer-based. [ticket:2005] - Result-row processors are applied to pre-executed SQL defaults, as well as cursor.lastrowid, when determining the contents of result.inserted_primary_key. [ticket:2006] - Bind parameters present in the "columns clause" of a select are now auto-labeled like other "anonymous" clauses, which among other things allows their "type" to be meaningful when the row is fetched, as in result row processors. - TypeDecorator is present in the "sqlalchemy" import space.
* - whitespace removal bonanzaMike Bayer2011-01-021-13/+13
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-4/+4
|
* - new oursql dialect added. [ticket:1613]Mike Bayer2009-11-101-2/+2
|
* - The "start" and "increment" attributes on Sequence nowMike Bayer2009-11-031-4/+64
| | | | | | generate "START WITH" and "INCREMENT BY" by default, on Oracle and Postgresql. Firebird doesn't support these keywords right now. [ticket:1545]
* - an executemany() now requires that all bound parameterMike Bayer2009-10-151-3/+12
| | | | | | | | | | | | sets require that all keys are present which are present in the first bound parameter set. The structure and behavior of an insert/update statement is very much determined by the first parameter set, including which defaults are going to fire off, and a minimum of guesswork is performed with all the rest so that performance is not impacted. For this reason defaults would otherwise silently "fail" for missing parameters, so this is now guarded against. [ticket:1566]
* - unit test fixesMike Bayer2009-10-101-1/+1
| | | | | - py3k readme - removed column.sequence accessor
* merge from branches/clauseelement-nonzeroPhilip Jenvey2009-09-241-2/+3
| | | | | | adds a __nonzero__ to _BinaryExpression to avoid faulty comparisons during hash collisions (which only occur on Jython) fixes #1547