picodb(mssql): teach picodb to use TOP for limits on MSSQL

This commit is contained in:
Joe Nahmias
2022-07-08 15:32:29 -04:00
committed by Frédéric Guillot
parent 5493c2997e
commit 37bc859df5
3 changed files with 38 additions and 2 deletions

View File

@@ -25,6 +25,18 @@ class Mssql extends Base
'database',
);
/**
* Constructor
*
* @access public
* @param array $settings
*/
public function __construct(array $settings)
{
parent::__construct($settings);
$this->useTop = true;
}
/**
* Table to store the schema version
*
@@ -180,4 +192,5 @@ class Mssql extends Base
$this->getConnection()->exec('SET SHOWPLAN_ALL ON');
return $this->getConnection()->query($this->getSqlFromPreparedStatement($sql, $values))->fetchAll(PDO::FETCH_ASSOC);
}
}