mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-15671 support for table sequence resetting - code by Andrei Bautu (with minor modifications)
This commit is contained in:
parent
a3668b25c0
commit
e16e38818e
6 changed files with 98 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue