changeset 620:04752b23da8d

changed sql to use filter_eq_dct
author James Bergstra <bergstrj@iro.umontreal.ca>
date Sat, 17 Jan 2009 21:23:36 -0500
parents fa6585609e01
children 7041749cf804
files pylearn/dbdict/sql.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dbdict/sql.py	Sat Jan 17 21:20:32 2009 -0500
+++ b/pylearn/dbdict/sql.py	Sat Jan 17 21:23:36 2009 -0500
@@ -124,7 +124,7 @@
             time.sleep(wait)
     return dct
 
-def book_dct(db):
+def book_dct_non_postgres(db):
     print >> sys.stderr, """#TODO: use the priority field, not the status."""
     print >> sys.stderr, """#TODO: ignore entries with key self.push_error."""
 
@@ -248,7 +248,7 @@
     rval = []
     for job in jobs:
         job = copy.copy(job)
-        do_insert = add_dups or (None is db.query(**job).first())
+        do_insert = add_dups or (None is db.query.filter_eq_dct(job).first())
 
         if do_insert:
             if type_check: