summaryrefslogtreecommitdiff
path: root/test/sql/query.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added query coverage for ORDER BY over regular, aliased and DISTINCT columns.Jason Kirtland2007-10-111-1/+37
|
* - Expanded JoinTest further, exercising joins the ORM depends on explicitlyJason Kirtland2007-10-101-14/+209
| | | | in the 'sql' tests.
* - initial sybase support checkin, [ticket:785]Mike Bayer2007-10-101-4/+4
|
* - Expanded the outer join tests, now covering a situation that looked like ↵Jason Kirtland2007-10-081-20/+27
| | | | it would be wonky in oracle.
* - Loosened up test_cant_execute_join for oracle (probably) + bonus typo fixJason Kirtland2007-10-081-8/+10
| | | | - Some docstring formatting waiting for pg to finish the tests... waiting...
* - Added some outerjoin() execution exercises to the query tests.Jason Kirtland2007-10-081-1/+75
|
* - Squashed assumption of transparent type coercion support in defaults testJason Kirtland2007-10-071-1/+1
|
* - Tweaked unordered select tests to not be sensitive to result set order, ↵Jason Kirtland2007-10-071-27/+108
| | | | also split apart some tests (aliases) that sapdb has problems with.
* Firebird dialect now uses SingletonThreadPool as its poolclass.Roger Demetrescu2007-10-071-1/+2
| | | | | | (this fixes all "unsuccessful metadata update\n object XXXXX is in use" test errors) Minor fixes in tests
* - move PG RETURNING tests to postgres dialect testMike Bayer2007-10-041-44/+0
| | | | | - added server_version_info() support for PG dialect - exclude PG versions < 8.4 for RETURNING tests
* add support for returning results from inserts and updates for postgresql ↵Ants Aasma2007-10-021-1/+45
| | | | 8.2+. [ticket:797]
* - created a link between QueryContext and SelectionContext; the attributeMike Bayer2007-09-261-16/+0
| | | | | | | | | | | | | | | | dictionary of QueryContext is now passed to SelectionContext inside of Query.instances(), allowing messages to be passed between the two stages. - removed the recent "exact match" behavior of Alias objects, they're back to their usual behavior. - tightened up the relationship between the Query's generation of "eager load" aliases, and Query.instances() which actually grabs the eagerly loaded rows. If the aliases were not specifically generated for that statement by EagerLoader, the EagerLoader will not take effect when the rows are fetched. This prevents columns from being grabbed accidentally as being part of an eager load when they were not meant for such, which can happen with textual SQL as well as some inheritance situations. It's particularly important since the "anonymous aliasing" of columns uses simple integer counts now to generate labels.
* - columns from Alias objects, when used to target result-row columns, must ↵Mike Bayer2007-09-241-0/+16
| | | | | | | | match exactly to the label used in the generated statement. This is so searching for columns in a result row which match aliases won't accidentally match non-aliased columns. fixes errors which can arise in eager loading scenarios.
* - removed "parameters" argument from clauseelement.compile(), replaced withMike Bayer2007-09-041-6/+14
| | | | | | | | "column_keys". the parameters sent to execute() only interact with the insert/update statement compilation process in terms of the column names present but not the values for those columns. produces more consistent execute/executemany behavior, simplifies things a bit internally.
* - omitted 'table' and 'column' from 'from sqlalchemy import *'Jason Kirtland2007-08-211-2/+2
| | | | | | | - also omitted all modules and classes that aren't expicitly public - omitted 'Smallinteger' (small i), but it's still in schema - omitted NullType-related items from types.__all__ - patched up a few tests to use sql.table and sql.column, other related.
* an early out processing insert/update column parameters was a bit too early.Ants Aasma2007-08-191-0/+6
|
* 1. Module layout. sql.py and related move into a package called "sql".Mike Bayer2007-08-181-4/+5
| | | | | | | | | | | | 2. compiler names changed to be less verbose, unused classes removed. 3. Methods on Dialect which return compilers, schema generators, identifier preparers have changed to direct class references, typically on the Dialect class itself or optionally as attributes on an individual Dialect instance if conditional behavior is needed. This takes away the need for Dialect subclasses to know how to instantiate these objects, and also reduces method overhead by one call for each one. 4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument. 5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
* Allow '$' in bind param detection [ticket:719], added test suite & fixed an ↵Jason Kirtland2007-08-091-1/+32
| | | | edge case
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-126/+120
| | | | maintenance branch in branches/rel_0_3.
* Properly escape table names when reflecting for mssql and sqlite [ticket:653]Paul Johnston2007-07-171-0/+16
|
* - fixed "ambiguous column" result detection, when dupe col names existMike Bayer2007-07-151-1/+10
| | | | in a result [ticket:657]
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-061-7/+7
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation
* postgres:Mike Bayer2007-06-291-45/+1
| | | | | | | | - added support for reflection of domains [ticket:570] - types which are missing during reflection resolve to Null type instead of raising an error - moved reflection/types/query unit tests specific to postgres to new postgres unittest module
* add missing grouping for compound selects. fixes ticket #623Ants Aasma2007-06-261-0/+23
|
* fix #624, modulo operator escaping on mysql and postgresAnts Aasma2007-06-261-0/+24
| | | | someone should test this with oracle, firebird and sql server also
* - fixed precedence of operators so that parenthesis are correctly appliedMike Bayer2007-06-251-1/+50
| | | | | | | | [ticket:620] - calling <column>.in_() (i.e. with no arguments) will return "CASE WHEN (<column> IS NULL) THEN NULL ELSE 0 END = 1)", so that NULL or False is returned in all cases, rather than throwing an error [ticket:545]
* - result.last_inserted_ids() should return a list that is identicallyMike Bayer2007-06-171-0/+79
| | | | | | sized to the primary key constraint of the table. values that were "passively" created and not available via cursor.lastrowid will be None. - sqlite: string PK column inserts dont get overwritten with OID [ticket:603]
* Multiple MSSQL fixes; see ticket #581Paul Johnston2007-06-131-0/+13
|
* - parenthesis are applied to clauses via a new _Grouping construct.Mike Bayer2007-05-141-1/+1
| | | | | | | | uses operator precedence to more intelligently apply parenthesis to clauses, provides cleaner nesting of clauses (doesnt mutate clauses placed in other clauses, i.e. no 'parens' flag) - added 'modifier' keyword, works like func.<foo> except does not add parenthesis. e.g. select([modifier.DISTINCT(...)]) etc.
* - mssql: replace "select @@identity" with "select @@scope_identity". Should ↵Rick Morrison2007-04-291-0/+26
| | | | | | help avoid returning wrong ID when insert triggers are used. Also add unit test (thanks paj) - mssql: if no db-api module specified, probe in the order [pyodbc, pymssql, adodbapi]
* - Fully specify ordering for ordered union test comparisonJason Kirtland2007-04-271-3/+3
|
* - added a col label to help sqlite with order byMike Bayer2007-04-241-3/+3
|
* - fix to case() construct to propigate the type of the firstMike Bayer2007-04-241-15/+15
| | | | | WHEN condition as the return type of the case statement - various unit test tweaks to get oracle working
* - the "mini" column labels generated when using subqueries, whichMike Bayer2007-04-111-0/+1
| | | | | | | | are to work around glitchy SQLite behavior that doesnt understand "foo.id" as equivalent to "id", are now only generated in the case that those named columns are selected from (part of [ticket:513]) - MS-SQL better detects when a query is a subquery and knows not to generate ORDER BY phrases for those [ticket:513]
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* added label truncation for bind param names which was lost in the previous ↵Mike Bayer2007-03-281-0/+4
| | | | | | related commit. added more tests plus test for column targeting with text() clause.
* - fix for fetchmany() "size" argument being positional in mostMike Bayer2007-03-281-1/+11
| | | | dbapis [ticket:505]
* MSSQL now passes still more unit tests [ticket:481]Rick Morrison2007-03-151-0/+8
| | | | | | | Fix to null FLOAT fields in mssql-trusted.patch MSSQL: LIMIT with OFFSET now raises an error MSSQL: can now specify Windows authorization MSSQL: ignores seconds on DATE columns (DATE fix, part 1)
* - fixed function execution with explicit connections, when you dontMike Bayer2007-02-271-0/+10
| | | | | explicitly say "select()" off the function, i.e. conn.execute(func.dosomething())
* Completed previously missed patches from tickets 422 and 415Rick Morrison2007-02-181-0/+10
| | | | | get unit tests to work with pyodbc [ticket:481] fix blank password on adodbapi [ticket:371]
* unit test for "cant execute"Mike Bayer2007-02-021-2/+13
|
* - mysql table create options work on a generic passthru now, i.e. Table(..., ↵Mike Bayer2007-01-201-1/+4
| | | | | | | mysql_engine='InnoDB', mysql_collate="latin1_german2_ci", mysql_auto_increment="5", mysql_<somearg>...), helps [ticket:418]
* added testcase to ensure that type gets propigated from scalar subquery to ↵Mike Bayer2007-01-161-4/+16
| | | | its label
* - made kwargs parsing to Table strict; removed various obsoluete ↵Mike Bayer2006-11-261-22/+68
| | | | | | | | | | | "redefine=True" kw's from the unit tests - documented instance variables in ANSICompiler - fixed [ticket:120], adds "inline_params" set to ANSICompiler which DefaultDialect picks up on when determining defaults. added unittests to query.py - additionally fixed up the behavior of the "values" parameter on _Insert/_Update - more cleanup to sql/Select - more succinct organization of FROM clauses, removed silly _process_from_dict methods and JoinMarker object
* - cleanup on some instance vars in Select (is_scalar, is_subquery, _froms is ↵Mike Bayer2006-11-251-0/+94
| | | | | | | __froms, removed unused 'nowait', '_text', etc) - cleaned up __repr__ on Column, AbstractTypeEngine - added standalone intersect(_all), except(_all) functions, unit tests illustrating nesting patterns [ticket:247]
* - fixed direct execution of Compiled objectsMike Bayer2006-10-311-1/+6
|
* - Function objects know what to do in a FROM clause now. theirMike Bayer2006-10-031-0/+20
| | | | | | | | behavior should be the same, except now you can also do things like select(['*'], from_obj=[func.my_function()]) to get multiple columns from the result, or even use sql.column() constructs to name the return columns [ticket:172]. generally only postgres understands the syntax (and possibly oracle).
* decruftifyMike Bayer2006-09-281-0/+9
|
* [ticket:280] statement execution supports using the same BindParamMike Bayer2006-08-181-0/+10
| | | | | object more than once in an expression; simplified handling of positional parameters. nice job by Bill Noon figuring out the basic idea.
* reorganized unit tests into subdirectoriesMike Bayer2006-06-051-0/+222