Commit Graph

22 Commits

Author SHA1 Message Date
Mike Bayer f1e54a69fb - merge default tip 2010-12-05 14:56:26 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
outside of "sqlalchemy" and under "test/".

Rationale:

- coverage plugin works without issue, without need for an awkward
additional package install
- command line for "nosetests" isn't polluted with SQLAlchemy options

[ticket:1949]
2010-11-28 14:19:44 -05:00
Mike Bayer 59a177a4c0 - _literal_as_text raises if the incoming arg is not a Visitable or basestring.
[ticket:1847]
2010-11-28 11:24:57 -05:00
Mike Bayer 77f641429f - Fixed operator precedence rules for multiple
chains of a single non-associative operator.
I.e. "x - (y - z)" will compile as "x - (y - z)"
and not "x - y - z".  Also works with labels,
i.e. "x - (y - z).label('foo')"
[ticket:1984]
- Single element tuple expressions inside an IN clause
parenthesize correctly, also from [ticket:1984],
added tests for PG
- re-fix again importlater, [ticket:1983]
2010-11-25 12:20:13 -05:00
Mike Bayer ea55a4644c - bindparam() gets a new option "callable", which is a lambda or def
evaluated at execution time to determine the value.  This replaces
the implicit recognition of callables sent as the primary value
of bindparam(), which was an undocumented behavior used by the ORM.
The argument is separated now so that values can be passed to
bindparams that are also callables without ambiguity, such
as user defined objects that include a __call__() method.
[ticket:1950]
2010-11-20 15:43:12 -05:00
Mike Bayer e3ca3a773f - merge FromObj cleanup, immutable .c attribute patch, [ticket:1917] 2010-11-20 15:35:43 -05:00
Mike Bayer 041a329e69 - adapt initial patch from [ticket:1917] to current tip
- raise TypeError for immutability
2010-11-16 15:53:14 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer 6fb06409c6 merge tip 2010-11-14 18:25:13 -05:00
Mike Bayer b96e6232a4 cleanup most egregiously long lines 2010-10-24 13:26:34 -04:00
Mike Bayer 90c8d8e0c9 merge tip 2010-09-19 16:11:16 -04:00
Mike Bayer c5c8cdf3b4 - as_scalar(), label() can be called on a selectable
which contains a Column that is not yet named.
[ticket:1862]
2010-09-18 13:34:04 -04:00
Mike Bayer 003149c504 - An informative error message is raised if a Column
which has not yet been assigned a name, i.e. as in
declarative, is used in a context where it is
exported to the columns collection of an enclosing
select() construct, or if any construct involving
that column is compiled before its name is
assigned.  [ticket:1862]
2010-09-18 13:18:44 -04:00
Mike Bayer e4bc7d2894 - move LIMIT/OFFSET rendering to be as bind parameters, for all backends
which support it.  This includes SQLite, MySQL, Postgresql, Firebird,
Oracle (already used binds with ROW NUMBER OVER), MSSQL (when ROW NUMBER
is used, not TOP).   Not included are Informix, Sybase, MaxDB, Access
[ticket:805]
- LIMIT/OFFSET parameters need to stay as literals within SQL
constructs.  This because they may not be renderable as binds on
some backends.
2010-08-29 16:35:02 -04:00
Mike Bayer 7dcfc49b34 fix test 2010-06-24 12:45:37 -04:00
Mike Bayer 074ecc4376 - expr.in_() now accepts a text() construct as the argument.
Grouping parenthesis are added automatically, i.e. usage
is like `col.in_(text("select id from table"))`.
[ticket:1793]
2010-05-08 16:25:30 -04:00
Mike Bayer 5c758932a5 - Restored some bind-labeling logic from 0.5 which ensures
that tables with column names that overlap another column
of the form "<tablename>_<columnname>" won't produce
errors if column._label is used as a bind name during
an UPDATE.  Test coverage which wasn't present in 0.5
has been added.  [ticket:1755]
2010-03-31 13:01:40 -04:00
Mike Bayer 5d0d680693 comment out test that relies on dictionary ordering for now 2010-03-27 18:15:05 -04:00
Mike Bayer 36047e9bb2 - Added with_hint() method to Query() construct. This calls
directly down to select().with_hint() and also accepts
entities as well as tables and aliases.  See with_hint() in the
SQL section below. [ticket:921]
- Added with_hint() method to select() construct.  Specify
a table/alias, hint text, and optional dialect name, and
"hints" will be rendered in the appropriate place in the
statement.  Works for Oracle, Sybase, MySQL.  [ticket:921]
2010-03-27 17:18:53 -04:00
Mike Bayer 6acc9e6d9e - The Oracle dialect will issue VARCHAR type definitions
using character counts, i.e. VARCHAR2(50 CHAR), so that
the column is sized in terms of characters and not bytes.
Column reflection of character types will also use
ALL_TAB_COLUMNS.CHAR_LENGTH instead of
ALL_TAB_COLUMNS.DATA_LENGTH.  Both of these behaviors take
effect when the server version is 9 or higher - for
version 8, the old behaviors are used.  [ticket:1744]
2010-03-25 22:26:11 +00:00
Mike Bayer 1321db6473 - Fixed bug introduced in 0.6beta2 where column labels would
render inside of column expressions already assigned a label.
[ticket:1747]
2010-03-23 20:41:40 -04:00
Mike Bayer 0f55ef3bea rename test_select to test_compiler 2010-03-19 15:32:17 -04:00