← Back to team overview

zeitgeist team mailing list archive

[Bug 783688] Re: make sql connection more modular

 

** Changed in: zeitgeist
   Importance: Undecided => Wishlist

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

** Changed in: zeitgeist
    Milestone: None => 0.8.1

** Changed in: zeitgeist
     Assignee: (unassigned) => J.P. Lacerda (jplacerda)

-- 
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 Committed

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


References