projects
/
profile
/
ivi
/
automotive-message-broker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd69a46
)
flush left over data in database
author
Kevron Rees
<tripzero.kev@gmail.com>
Sat, 4 May 2013 06:48:04 +0000
(23:48 -0700)
committer
Kevron Rees
<tripzero.kev@gmail.com>
Sat, 4 May 2013 06:48:04 +0000
(23:48 -0700)
plugins/database/databasesink.cpp
patch
|
blob
|
history
diff --git
a/plugins/database/databasesink.cpp
b/plugins/database/databasesink.cpp
index
833ced6
..
67f06a3
100644
(file)
--- a/
plugins/database/databasesink.cpp
+++ b/
plugins/database/databasesink.cpp
@@
-58,6
+58,16
@@
void * cbFunc(gpointer data)
delete obj;
}
+ /// final flush of whatever is still in the queue:
+
+ shared->db->exec("BEGIN IMMEDIATE TRANSACTION");
+ for(int i=0; i< insertList.size(); i++)
+ {
+ DictionaryList<string> d = insertList[i];
+ shared->db->insert(d);
+ }
+ shared->db->exec("END TRANSACTION");
+
return NULL;
}