Skip to content

Commit 7d34e29

Browse files
committed
Add stub method for reseting sequences.
This method needs to be implemented, but first sequence reflection needs to be implemented in schema + postgres.
1 parent b54795c commit 7d34e29

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/Cake/Database/Connection.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public function releaseSavePoint($name) {
413413
}
414414

415415
/**
416-
* Rollsback a save point by its name
416+
* Rollback a save point by its name
417417
*
418418
* @param string $name
419419
* @return void
@@ -422,6 +422,19 @@ public function rollbackSavepoint($name) {
422422
$this->execute($this->_driver->rollbackSavePointSQL($name));
423423
}
424424

425+
/**
426+
* Reset a sequence.
427+
*
428+
* Useful with database platforms that support sequences.
429+
*
430+
* @param string $table The table to reset.
431+
* @param string $key The key to reset.
432+
* @return boolean
433+
*/
434+
public function resetSequence($table, $key) {
435+
// TODO implement this.
436+
}
437+
425438
/**
426439
* Quotes value to be used safely in database query
427440
*

0 commit comments

Comments
 (0)