]> git.mxchange.org Git - fba.git/blobdiff - fba/database.py
Continued:
[fba.git] / fba / database.py
index 53b33bcc8b91dd8b71658265e10fdda3e62c6ffc..23bfab08ce2f3502b81a56469b75f04679a824b1 100644 (file)
@@ -20,5 +20,15 @@ logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)
 
 # Connect to database
+logger.debug("Opening database file blocks.db ...")
 connection = sqlite3.connect("blocks.db")
+
+# Attach trace function
+#connection.set_trace_callback(print)
+
+# Init row factory
+logger.debug("connection='%s' - setting row factory ...", connection)
+connection.row_factory = sqlite3.Row
+
+# Get cursor
 cursor = connection.cursor()