@@ -371,33 +376,33 @@ func (c *Conn) OneValue(query string, value interface{}, args ...interface{}) er
returns.Scan(value)
}
// Changes counts the number of rows modified.
// Changes returns the number of database rows that were changed or inserted or deleted by the most recently completed SQL statement on the database connection.
// If a separate thread makes changes on the same database connection while Changes() is running then the value returned is unpredictable and not meaningful.
// (See http://sqlite.org/c3ref/changes.html)
func(c*Conn)Changes()int{
returnint(C.sqlite3_changes(c.db))
}
// Total number of rows Modified
// TotalChanges returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the database connection was opened.
// (See http://sqlite.org/c3ref/total_changes.html)
func(c*Conn)TotalChanges()int{
returnint(C.sqlite3_total_changes(c.db))
}
// Return the rowid of the most recent successful INSERT into the database.
// LastInsertRowid returns the rowid of the most recent successful INSERT into the database.
// If a separate thread performs a new INSERT on the same database connection while the LastInsertRowid() function is running and thus changes the last insert rowid, then the value returned by LastInsertRowid() is unpredictable and might not equal either the old or the new last insert rowid.
// (See http://sqlite.org/c3ref/last_insert_rowid.html)
func(c*Conn)LastInsertRowid()int64{
returnint64(C.sqlite3_last_insert_rowid(c.db))
}
// Interrupt a long-running query
// Interrupt interrupts a long-running query.
// (See http://sqlite.org/c3ref/interrupt.html)
func(c*Conn)Interrupt(){
C.sqlite3_interrupt(c.db)
}
// Test for auto-commit mode
// GetAutocommit tests for auto-commit mode.
// (See http://sqlite.org/c3ref/get_autocommit.html)
// Savepoint starts a new transaction with a name.
// (See http://sqlite.org/lang_savepoint.html)
func(c*Conn)Savepoint(namestring)error{
returnc.exec(Mprintf("SAVEPOINT %Q",name))
}
// ReleaseSavepoint causes all savepoints back to and including the most recent savepoint with a matching name to be removed from the transaction stack.
// (See http://sqlite.org/lang_savepoint.html)
func(c*Conn)ReleaseSavepoint(namestring)error{
returnc.exec(Mprintf("RELEASE %Q",name))
}
// RollbackSavepoint reverts the state of the database back to what it was just before the corresponding SAVEPOINT.
// (See http://sqlite.org/lang_savepoint.html)
func(c*Conn)RollbackSavepoint(namestring)error{
returnc.exec(Mprintf("ROLLBACK TO SAVEPOINT %Q",name))