summaryrefslogtreecommitdiffstats
path: root/Plugins/DbAndroid/dbandroidinstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/DbAndroid/dbandroidinstance.cpp')
-rw-r--r--Plugins/DbAndroid/dbandroidinstance.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Plugins/DbAndroid/dbandroidinstance.cpp b/Plugins/DbAndroid/dbandroidinstance.cpp
index c1b5629..62a42c4 100644
--- a/Plugins/DbAndroid/dbandroidinstance.cpp
+++ b/Plugins/DbAndroid/dbandroidinstance.cpp
@@ -124,6 +124,17 @@ Db* DbAndroidInstance::clone() const
return new DbAndroidInstance(plugin, name, path, connOptions);
}
+bool DbAndroidInstance::isTransactionActive() const
+{
+ // FIXME: Since there is no way to detect active transaction by PRAGMA or SQL function,
+ // this plugin cannot just test this state. It could potentially be implemented by tracking BEGIN/END keywords
+ // as first keywords in executed queries, but it will require more work and testing.
+ //
+ // Current consiequence of negleting this is that if user uses import() function enclosed with BEGIN & END,
+ // the query will fail due to already active transaction. In that case user needs to skip the BEGIN & END.
+ return false;
+}
+
bool DbAndroidInstance::isOpenInternal()
{
return (connection && connection->isConnected());