znt/module/bi/test/model/getsql.php

26 lines
1.2 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
/**
title=测试 biModel::getSQL();
timeout=0
cid=15180
- 测试mysql驱动简单SELECT语句默认分页 @2
- 测试mysql驱动带WHERE条件自定义分页 @2
- 测试duckdb驱动返回数组长度 @2
- 测试dm驱动返回数组长度 @2
- 测试复杂JOIN查询mysql驱动 @2
*/
$bi = new biModelTest();
r($bi->getSQLTest('SELECT id FROM zt_user', 'mysql')) && p() && e('2'); // 测试mysql驱动简单SELECT语句默认分页
r($bi->getSQLTest('SELECT id FROM zt_user WHERE id > 0', 'mysql', 5, 2)) && p() && e('2'); // 测试mysql驱动带WHERE条件自定义分页
r($bi->getSQLTest('SELECT id FROM zt_user', 'duckdb')) && p() && e('2'); // 测试duckdb驱动返回数组长度
r($bi->getSQLTest('SELECT id FROM zt_user', 'dm')) && p() && e('2'); // 测试dm驱动返回数组长度
r($bi->getSQLTest('SELECT u.id FROM zt_user u JOIN zt_dept d ON u.dept = d.id', 'mysql')) && p() && e('2'); // 测试复杂JOIN查询mysql驱动