+ [misc] run getExpression unit test.
This commit is contained in:
@@ -9,6 +9,16 @@ title=biModel->getExpression();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 测试 * @*
|
||||
- 测试 id @`id`
|
||||
- 测试 t1.id @`t1`.`id`
|
||||
- 测试 t1.* @`t1`.*
|
||||
- 测试 id as project @`id` AS `project`
|
||||
- 测试 t1.id as project @`t1`.`id` AS `project`
|
||||
- 测试 year(date) @YEAR(`date`)
|
||||
- 测试 year(date) as year @YEAR(`date`) AS `year`
|
||||
- 测试 year(t1.date) as year @YEAR(`t1`.`date`) AS `year`
|
||||
|
||||
*/
|
||||
|
||||
$bi = new biTest();
|
||||
@@ -20,4 +30,4 @@ r($bi->getExpressionTest(null, 'id', 'project')) && p('') && e('`id` AS `
|
||||
r($bi->getExpressionTest('t1', 'id', 'project')) && p('') && e('`t1`.`id` AS `project`'); // 测试 t1.id as project
|
||||
r($bi->getExpressionTest(null, 'date', null, 'year')) && p('') && e('YEAR(`date`)'); // 测试 year(date)
|
||||
r($bi->getExpressionTest(null, 'date', 'year', 'year')) && p('') && e('YEAR(`date`) AS `year`'); // 测试 year(date) as year
|
||||
r($bi->getExpressionTest('t1', 'date', 'year', 'year')) && p('') && e('YEAR(`t1`.`date`) AS `year`'); // 测试 year(t1.date) as year
|
||||
r($bi->getExpressionTest('t1', 'date', 'year', 'year')) && p('') && e('YEAR(`t1`.`date`) AS `year`'); // 测试 year(t1.date) as year
|
||||
Reference in New Issue
Block a user