Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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))
Ejemplo n.º 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))