[Dbix-class] Announcing 0.08099_06
Michael Higgins
linux at evolone.org
Sun Mar 15 20:29:47 GMT 2009
On Fri, 23 Jan 2009 08:44:19 +0100
Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
I've been looking at the _07 last dev release and have a question... getting some odd results, wondering if there is some way to get feedback.
I altered two tests for mssql to change the artistid to "artist #", accessor =>artistid. (This is because I've inherited a table with a column that looks like that.)
Turned on quot_char => '"'. Also with [ ]...
Statement(s) could not be prepared. (SQL-42000) [for Statement "SELECT * FROM
(
SELECT TOP 3 * FROM
(
SELECT TOP 3 [me.artist #], [me.name], [me.rank], [me.charfield] FROM [artist] [me] ORDER BY "artist #" DESC
) AS foo
ORDER BY "artist #" ASC
) AS bar
ORDER BY "artist #" DESC
Same problem. Quotes are not supposed to encapsulate the alias, no?
So, I tested with an unmolested version, adding one line to the test to turn on the quoting:
t/746mssql.t
# fresh $schema so we start unconnected
$schema = DBICTest::Schema->connect($dsn, $user, $pass, {AutoCommit => 1,
quote_char => '"'
});
Statement(s) could not be prepared. (SQL-42000) [for Statement "SELECT * FROM
(
SELECT TOP 3 * FROM
(
SELECT TOP 3 "me.artistid", "me.name", "me.rank", "me.charfield" FROM "artist" "me" ORDER BY artistid ASC
) AS foo
ORDER BY artistid DESC
) AS bar
ORDER BY artistid ASC
"] a
Anyone else see this happening?
Cheers,
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org
More information about the DBIx-Class
mailing list