parent
1a4d43dbbf
commit
bec8cea3e3
@ -65,6 +65,7 @@ class Postgresql:
|
|||||||
query = query.replace("?", "%s")
|
query = query.replace("?", "%s")
|
||||||
query = query.replace("REGEXP", "~")
|
query = query.replace("REGEXP", "~")
|
||||||
query = query.replace("desc", "desc_")
|
query = query.replace("desc", "desc_")
|
||||||
|
query = query.replace("BLOB", "bytea")
|
||||||
## LIMIT offset, count
|
## LIMIT offset, count
|
||||||
## count can be -1, for all
|
## count can be -1, for all
|
||||||
## LIMIT -1
|
## LIMIT -1
|
||||||
@ -114,7 +115,7 @@ class Postgresql:
|
|||||||
def table_exists(self, table):
|
def table_exists(self, table):
|
||||||
self.__cursor.execute("SELECT COUNT(*) "
|
self.__cursor.execute("SELECT COUNT(*) "
|
||||||
"FROM information_schema.tables "
|
"FROM information_schema.tables "
|
||||||
"WHERE table_name=?;", [table])
|
"WHERE table_name=%s;", [table])
|
||||||
return self.fetchone()[0] != 0
|
return self.fetchone()[0] != 0
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user