protected function parseLimit($limit)
{
$limitStr = '';
if (!empty($limit)) {
switch ($this->dbType) {
case 'PGSQL':
case 'SQLITE':
$limit = explode(',', $limit);
if (count($limit) > 1) {
$limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' ';
} else {
$limitStr .= ' LIMIT ' . $limit[0] . ' ';
}
break;
case 'MSSQL':
case 'SQLSRV':
break;
case 'IBASE':
// 暂时不支持
break;
case 'ORACLE':
case 'OCI':
break;
case 'MYSQL':
default:
$limitStr .= ' LIMIT ' . $limit . ' ';
}
}
return $limitStr;
}