예제 #1
0
파일: sqlite.py 프로젝트: pygloo/bewype
def delete(table_name, uri=None, where=None):
    # parse value from uri
    _db = sqlite3.connect(_uri(uri=uri))
    # return common
    _c = common.delete(_db, table_name, where=where)
    # check number of removed rows
    _count = _c.rowcount
    # close the connection
    _close(_c)
    # return result
    return _count
예제 #2
0
파일: mysql.py 프로젝트: pygloo/bewype
def delete(table_name, uri=None, where=None):
    # parse value from uri
    _db = MySQLdb.connect(**split_uri(uri=uri))
    # return common
    return common.delete(_db, table_name, where=where)