summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authormichaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-25 21:36:41 +0000
committermichaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-25 21:36:41 +0000
commit389e0a485fe2c33cd25677ef5adf36b6f246c26c (patch)
tree2571a4bedd0047ee8b2f6fa6f8cab7e35f2ae17b /sync
parent680ca65370fa194b8eea14b1c9c822e66fb2dd32 (diff)
downloadchromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.zip
chromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.tar.gz
chromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.tar.bz2
Added parameter 'clear_bound_vars', so we could reset the statement without clearing bound variables, so and current row is reset to the beginning.
It is used to support the Andorid' sqlite cursor feature which could move the cursor around the result set. BUG= TEST=Added a new test. TBR=agl,akalin,michaeln Review URL: http://codereview.chromium.org/10171014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/syncable/directory_backing_store.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc
index 1685610..fda6d71 100644
--- a/sync/syncable/directory_backing_store.cc
+++ b/sync/syncable/directory_backing_store.cc
@@ -163,7 +163,7 @@ bool DirectoryBackingStore::DeleteEntries(const MetahandleSet& handles) {
statement.BindInt64(0, *i);
if (!statement.Run())
return false;
- statement.Reset();
+ statement.Reset(true);
}
return true;
}
@@ -227,7 +227,7 @@ bool DirectoryBackingStore::SaveChanges(
if (!s2.Run())
return false;
DCHECK_EQ(db_->GetLastChangeCount(), 1);
- s2.Reset();
+ s2.Reset(true);
}
}
@@ -499,7 +499,7 @@ bool DirectoryBackingStore::SaveEntryToDB(const EntryKernel& entry) {
save_entry_statement_.Assign(
db_->GetUniqueStatement(query.c_str()));
} else {
- save_entry_statement_.Reset();
+ save_entry_statement_.Reset(true);
}
BindFields(entry, &save_entry_statement_);
@@ -583,7 +583,7 @@ bool DirectoryBackingStore::MigrateToSpecifics(
update.BindInt64(1, metahandle);
if (!update.Run())
return false;
- update.Reset();
+ update.Reset(true);
}
return query.Succeeded();
}
@@ -868,7 +868,7 @@ bool DirectoryBackingStore::MigrateVersion74To75() {
update.BindBool(2, query.ColumnBool(2));
if (!update.Run())
return false;
- update.Reset();
+ update.Reset(true);
}
}
if (!query.Succeeded())