forked from lucee/Lucee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LDEV-4691 qoq / hsqldb use sql.enforce_strict_size=false; 5.4
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
component extends="org.lucee.cfml.test.LuceeTestCase" labels="qoq" { | ||
|
||
function run( testResults , testBox ) { | ||
|
||
describe( title='QofQ' , body=function(){ | ||
|
||
it( title='QoQ check decimal types scale are preserved' , body=function() { | ||
var dec = 5.57; | ||
var q1 = QueryNew( "id,dec", "integer,decimal" ); | ||
q1.addRow( { id: 1, dec: dec } ); | ||
var q2 = QueryNew( "id,str", "integer,varchar" ); | ||
q2.addRow( { id: 1, str: "testing" } ); | ||
|
||
var q3sql = " | ||
select q1.* | ||
from q1, q2 | ||
where q1.id = q2.id | ||
"; | ||
var q3 = QueryExecute( q3sql, {}, {dbtype: "query"} ); | ||
// q3.dec should be 5.57. It was 6 instead. | ||
expect( q3.dec ).toBe( dec ); | ||
|
||
var q4sql = " | ||
select * | ||
from q1, q2 | ||
where q1.id = q2.id | ||
"; | ||
var q4 = QueryExecute( q4sql, {}, {dbtype: "query"} ); | ||
// q4.dec should be 5.57. It was 6 instead. | ||
expect( q4.dec ).toBe( dec ); | ||
}); | ||
}); | ||
|
||
} | ||
|
||
} |