← Back to team overview

zeitgeist team mailing list archive

[Bug 783688] Re: make sql connection more modular

 

** Changed in: zeitgeist
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/783688

Title:
  make sql connection more modular

Status in Zeitgeist Framework:
  Fix Released

Bug description:
  In order to make handling cursors / connections in sql.py, we should
  create a function _connect_to_db which does exactly that.

  19:34 <thekorn> I think we should make these lines a new method, like connect_to_database:
  19:34 <thekorn> Iconn = sqlite3.connect(file_path)
  19:34 <thekorn> Iconn.row_factory = sqlite3.Row
  19:34 <thekorn> Icursor = conn.cursor(UnicodeCursor)
  19:34 <thekorn> in sql.py that is
  19:35 <jplacerda> thekorn I agree
  19:35 <thekorn> and call it in create_db and in the restore code
  19:35 <jplacerda> I ran into a similar problem (while working on a fix for sqlite memory) because I couldn't easily manipulate cursors / connection
  19:35 <jplacerda> Seems *very* sane to me

To manage notifications about this bug go to:
https://bugs.launchpad.net/zeitgeist/+bug/783688/+subscriptions


References