diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 6b45102a..8ed0e3bc 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -60,14 +60,11 @@ import Configuration # Other library modules try: import sqlalchemy.pool as pool - #use_pool = True - # Forcing to False so we can use connection.row_factory - use_pool = False + use_pool = True except ImportError: log.info(_("Not using sqlalchemy connection pool.")) use_pool = False - try: from numpy import var use_numpy = True @@ -450,8 +447,7 @@ class Database: self.db_path = database log.info(_("Connecting to SQLite: %(database)s") % {'database':self.db_path}) if os.path.exists(database) or create: - self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES) - self.connection.row_factory = sqlite3.Row + self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES ) self.__connected = True sqlite3.register_converter("bool", lambda x: bool(int(x))) sqlite3.register_adapter(bool, lambda x: "1" if x else "0")