mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
MSSQL versions of MySQL commands implemented
This commit is contained in:
parent
8b6e13a823
commit
772fb23e22
@ -347,6 +347,8 @@ class MSSQLDatabase extends Database {
|
|||||||
/*
|
/*
|
||||||
$this->runTableCheckCommand("VACUUM FULL \"$tableName\"");
|
$this->runTableCheckCommand("VACUUM FULL \"$tableName\"");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//NOTE: MSSQL does not appear to support any vacuum or optimise commands
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -965,7 +967,6 @@ class MSSQLDatabase extends Database {
|
|||||||
$tables[]="SELECT ID, '{$row['TABLE_NAME']}' AS Source FROM \"{$row['TABLE_NAME']}\" WHERE CONTAINS(\"{$row['FULLTEXT_COLUMN_NAME']}\", N'$keywords')";
|
$tables[]="SELECT ID, '{$row['TABLE_NAME']}' AS Source FROM \"{$row['TABLE_NAME']}\" WHERE CONTAINS(\"{$row['FULLTEXT_COLUMN_NAME']}\", N'$keywords')";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//We'll do a union query on all of these tables... it's easeier!
|
//We'll do a union query on all of these tables... it's easeier!
|
||||||
$query=implode(' UNION ', $tables);
|
$query=implode(' UNION ', $tables);
|
||||||
|
|
||||||
@ -1013,13 +1014,11 @@ class MSSQLQuery extends Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function __destroy() {
|
public function __destroy() {
|
||||||
//mysql_free_result($this->handle);
|
mysql_free_result($this->handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function seek($row) {
|
public function seek($row) {
|
||||||
//return mysql_data_seek($this->handle, $row);
|
return mssql_data_seek($this->handle, $row);
|
||||||
//This is unnecessary in postgres. You can just provide a row number with the fetch
|
|
||||||
//command.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function numRecords() {
|
public function numRecords() {
|
||||||
|
Loading…
Reference in New Issue
Block a user