MDL-15671 support for table sequence resetting - code by Andrei Bautu (with minor modifications)

This commit is contained in:
skodak 2008-08-25 12:52:49 +00:00
parent a3668b25c0
commit e16e38818e
6 changed files with 98 additions and 3 deletions

View file

@ -455,6 +455,13 @@ abstract class moodle_database {
$this->columns = array();
}
/**
* Reset a sequence to the id field of a table.
* @param string $table name of table
* @return success
*/
public abstract function reset_sequence($table);
/**
* Returns sql generator used for db manipulation.
* Used mostly in upgrade.php scripts.
@ -1346,7 +1353,7 @@ abstract class moodle_database {
/**
* Returns the SQL for returning searching one string for the location of another.
* Note, there is no guarantee which order $needle, $haystack will be in
* Note, there is no guarantee which order $needle, $haystack will be in
* the resulting SQL, so when using this method, and both arguments contain
* placeholders, you should use named placeholders.
* @param string $needle the SQL expression that will be searched for.