Commit Graph

342 Commits

Author SHA1 Message Date
Mike Bayer deaff3e97f - Fixed bug when calling select([literal('foo')])
or select([bindparam('foo')]).
2008-07-15 15:04:43 +00:00
Mike Bayer 45a2b0fedf possible fix for MS-SQL version of match() test, but the real solution here may be to have the correct default paramstyle set up on the MS-SQL dialect. 2008-07-14 19:39:50 +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 f3a9acc7e2 merge r4889, SQLite Float type, from 0.4 branch 2008-07-02 18:29:36 +00:00
Mike Bayer 8c1f08c8aa merged r4870 from 0.4 branch, index name truncation, [ticket:820] 2008-06-22 17:52:13 +00:00
Mike Bayer b2b754c2ce - merged r4868, disallow overly long names from create/drop, from 0.4 branch, [ticket:571] 2008-06-22 16:56:16 +00:00
Jason Kirtland 18a31d0316 - Quick cleanup of defaults.py. The main DefaultTest is still a mess. 2008-05-20 00:14:51 +00:00
Jason Kirtland 8e9fce417a Split out a couple true autoincrement/identity tests from emulated-with-sequences autoincrement=True tests. 2008-05-19 23:15:41 +00:00
Mike Bayer b3102a097a - changed char_length() to use a fake, neutral "generic function"
- assert_compile() reports the dialect in use
2008-05-19 22:46:14 +00:00
Mike Bayer 07496da9b5 - added some help for a heavily flush-order-dependent test
- quote flag propagates to _Label, [ticket:1045]
2008-05-16 22:10:04 +00:00
Jason Kirtland f7cc199d37 Don't blat Table.quote= when resolving foreign keys. 2008-05-15 16:20:50 +00:00
Lele Gaifax d044346a3c Corrected Firebird failure reasons 2008-05-15 00:18:58 +00:00
Jason Kirtland dd20ca5cb9 - Removed @unsupported 2008-05-14 22:09:23 +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 78c9603af4 Tag some tests that fail under Firebird 2008-05-13 09:06:27 +00:00
Mike Bayer e02114ce49 - clause adaption hits _raw_columns of a select() (though no ORM tests need this feature currently)
- broke up adapter chaining in eagerload, erroneous "wrapping" in row_decorator.  column_property() subqueries are now affected only by the ORMAdapter for that mapper.  fixes [ticket:1037], and may possibly impact some of [ticket:949]
2008-05-12 16:15:28 +00:00
Lele Gaifax 52c965a188 Tagged two tests that fail under Firebird 2008-05-12 10:10:21 +00:00
Mike Bayer d3621ae961 - fixed a fairly critical bug in clause adaption/corresponding column in conjunction with annotations
- implicit order by is removed, modified many tests to explicitly set ordering, probably many more to go
once it hits the buildbot.
2008-05-09 23:58:30 +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
Mike Bayer 538861143f - _Label adds itself to the proxy collection so that it works in correspoinding column. fixes some eager load with column_property bugs.
- this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now
2008-05-06 00:55:49 +00:00
Mike Bayer 5932e8649d - an unfortunate naming conflict
- needed sql import on and()
2008-05-02 01:15:26 +00:00
Mike Bayer e3460573d0 - factored out the logic used by Join to create its join condition
- With declarative, joined table inheritance mappers use a slightly relaxed
function to create the "inherit condition" to the parent
table, so that other foreign keys to not-yet-declared
Table objects don't trigger an error.
2008-05-02 01:02:23 +00:00
Mike Bayer 3560379ff7 fix order by for MySQL environment 2008-04-26 20:18:31 +00:00
Mike Bayer f3bcc15c5c - improved behavior of text() expressions when used as
FROM clauses, such as select().select_from(text("sometext"))
[ticket:1014]
- removed _TextFromClause; _TextClause just adds necessary FromClause descriptors
at the class level
2008-04-26 16:34:14 +00:00
Jason Kirtland 2479711370 - Support for COLLATE: collate(expr, col) and expr.collate(col) 2008-04-16 00:53:21 +00:00
Matt Harrison fdb9440d2e refactor of default_paramstyle, use paramstyle argument on Dialect to change 2008-04-07 22:42:28 +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 de209ded31 factored down exportable_columns/flatten_cols/proxy_column/oid_etc_yada down to a single, streamlined "_populate_column_collection" method called for all selectables 2008-04-04 18:41:08 +00:00
Mike Bayer 1a68456795 fixed union() bug whereby oid_column would not be available if no oid_column in embedded selects 2008-04-04 16:06:58 +00:00
Mike Bayer abb10856dc - case() interprets the "THEN" expressions
as values by default, meaning case([(x==y, "foo")]) will
interpret "foo" as a bound value, not a SQL expression.
use text(expr) for literal SQL expressions in this case.
For the criterion itself, these may be literal strings
only if the "value" keyword is present, otherwise SA
will force explicit usage of either text() or literal().
2008-04-03 16:34:03 +00:00
Ants Aasma 921efb250c The case() function now also takes a dictionary as its whens parameter. But beware that it doesn't escape literals, use the literal construct for that. 2008-04-03 14:08:22 +00:00
Mike Bayer f16c41b00b fixed OracleRaw type adaptation [ticket:902] 2008-04-02 17:34:24 +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
Mike Bayer 30020880d9 - can now allow selects which correlate all FROM clauses
and have no FROM themselves.  These are typically
used in a scalar context, i.e. SELECT x, (SELECT x WHERE y)
FROM table.  Requires explicit correlate() call.
2008-03-28 15:55:26 +00:00
Mike Bayer fc2cf22038 - fixed SQL function truncation of trailing underscores
[ticket:996]
2008-03-25 17:25:20 +00:00
Jason Kirtland 92a5df7753 - Added generic func.random (non-standard SQL) 2008-03-25 16:51:29 +00:00
Mike Bayer bade0092d1 removed AbstractClauseProcessor, merged its copy-and-visit behavior into ClauseVisitor 2008-03-24 23:55:21 +00:00
Mike Bayer 8d0c5672f0 added escape kw arg to contains(), startswith(), endswith(), [ticket:791] 2008-03-19 20:25:51 +00:00
Mike Bayer 0cc04e6e1b - like() and ilike() take an optional keyword argument
"escape=<somestring>", which is set as the escape character
using the syntax "x LIKE y ESCAPE '<somestring>'"
[ticket:993]
2008-03-19 19:35:42 +00:00
Jason Kirtland 031c500ff4 - Column._set_parent will complete the key==name contract for instances constructed anonymously 2008-03-18 03:07:54 +00:00
Jason Kirtland f979c19841 - 'name' is no longer a require constructor argument for Column(). It (and .key) may now be deferred until the Column is added to a Table. 2008-03-18 00:15:34 +00:00
Jason Kirtland aa033afeee Added support for vendor-extended INSERT syntax like INSERT DELAYED INTO 2008-03-07 16:56:37 +00:00
Mike Bayer 8e0ea84c33 - fixed bug which was preventing UNIONS from being cloneable,
[ticket:986]
2008-03-04 18:20:09 +00:00
Mike Bayer 7f43bc55e0 - can again create aliases of selects against textual
FROM clauses, [ticket:975]
2008-02-19 23:46:14 +00:00
Mike Bayer 84485fb7bb - fixed bug in result proxy where anonymously generated
column labels would not be accessible using their straight
string name
2008-02-14 18:22:47 +00:00
Mike Bayer 9fffa2c7e1 - fixed bug introduced in r4070 where union() and other compound selects would not get
an OID column if it only contained one selectable element, due to missing return in _proxy_column()
- visit_column() calls itself to render a primary key col being used as the interpretation of the oid col instead of relying upon broken partial logic
2008-02-12 21:16:31 +00:00
Mike Bayer c0b5a0446b - updated the naming scheme of the base test classes in test/testlib/testing.py;
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
2008-02-11 00:28:39 +00:00
Mike Bayer 842934f40c - added generative where(<criterion>) method to delete()
and update() constructs which return a new object with
criterion joined to existing criterion via AND, just
like select().where().
- compile assertions use assertEquals()
2008-02-08 22:57:45 +00:00