Beispiel #1
0
 def _match(self, table, where=None, orderBy=None):
     sql = ["SELECT * FROM %s" % table]
     if where is not None:
         sql.append(" WHERE %s" % toSQL(where))
     if orderBy is not None:
         sql.append(" ORDER BY %s" % orderBy)
         # sql.append(" LIMIT 1000")
     sql = ''.join(sql)
     self._execute(sql)
     return self._dictify(self.cur)
Beispiel #2
0
 def _match(self, table, where=None, orderBy=None):
     sql = ["SELECT * FROM %s" % table]
     if where is not None:
         sql.append(" WHERE %s" % toSQL(where))
     if orderBy is not None:
         sql.append(" ORDER BY %s" % orderBy)
         # sql.append(" LIMIT 1000")
     sql = ''.join(sql)
     self._execute(sql)
     return self._dictify(self.cur)
Beispiel #3
0
 def delete(self, table, where):
     if isinstance(where, Expr):
         self._execute("DELETE FROM %s WHERE %s" % (table, toSQL(where)))
     else:
         # might be a string, int, or long
         self._execute("DELETE FROM %s WHERE ID=%s" % (table, where))
Beispiel #4
0
 def delete(self, table, where):
     if isinstance(where, Expr):
         self._execute("DELETE FROM %s WHERE %s" % (table, toSQL(where)))
     else:
         # might be a string, int, or long
         self._execute("DELETE FROM %s WHERE ID=%s" % (table, where))