From a8e80db8bd9ef3380bfab24ce35f29fc48ae9a33 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 17 Oct 2008 01:24:48 -0700 Subject: [PATCH] Use cursor.executescript() for the SQLite backend only. --- controller/Database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controller/Database.py b/controller/Database.py index 6b2d837..bfd3ca9 100644 --- a/controller/Database.py +++ b/controller/Database.py @@ -364,7 +364,10 @@ class Database( object ): connection = self.__get_connection() cursor = connection.cursor() - cursor.executescript( sql_commands ) + if self.__backend == Persistent.SQLITE_BACKEND: + cursor.executescript( sql_commands ) + else: + cursor.execute( sql_commands ) if commit: connection.commit()