reset the last inserted id to 0 after it is saved
This commit is contained in:
parent
494080f303
commit
2ca55543ab
@ -114,6 +114,8 @@ int obelisk::Entity::insertEntity(sqlite3* dbConnection)
|
|||||||
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sqlite3_set_last_insert_rowid(dbConnection, 0);
|
||||||
|
|
||||||
result = sqlite3_finalize(ppStmt);
|
result = sqlite3_finalize(ppStmt);
|
||||||
if (result != SQLITE_OK)
|
if (result != SQLITE_OK)
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,8 @@ int obelisk::Fact::insertFact(sqlite3* dbConnection)
|
|||||||
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sqlite3_set_last_insert_rowid(dbConnection, 0);
|
||||||
|
|
||||||
result = sqlite3_finalize(ppStmt);
|
result = sqlite3_finalize(ppStmt);
|
||||||
if (result != SQLITE_OK)
|
if (result != SQLITE_OK)
|
||||||
{
|
{
|
||||||
|
@ -117,6 +117,8 @@ int obelisk::Verb::insertVerb(sqlite3* dbConnection)
|
|||||||
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
setId((int) sqlite3_last_insert_rowid(dbConnection));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sqlite3_set_last_insert_rowid(dbConnection, 0);
|
||||||
|
|
||||||
result = sqlite3_finalize(ppStmt);
|
result = sqlite3_finalize(ppStmt);
|
||||||
if (result != SQLITE_OK)
|
if (result != SQLITE_OK)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user