Beispiel #1
0
def sql(query: str, client=None) -> DataFrame:
    warn("sql() is deprecated and will be removed from future versions")
    if client:
        if not isinstance(client, Connection):
            raise TypeError
        return client.execute(query).fetchdf()
    else:
        return connect().execute(query).fetchdf()
Beispiel #2
0
def insert(*args, **kwargs) -> 'Cursor':
    warn("insert() is deprecated and will be removed from future versions")
    if 'client' in kwargs:
        client = kwargs.pop('client')
        if not isinstance(client, Connection):
            raise TypeError
    else:
        client = connect()
    return client.cursor().insert(*args, **kwargs)
Beispiel #3
0
def create(table, values, schema=None, conn=None) -> 'Cursor':
    warn("create() is deprecated and will be removed from future versions")
    if not conn:
        conn = connect()
    return conn.cursor().create(table=table, values=values, schema=schema)
Beispiel #4
0
def make_connection(*args, **kwargs):
    warn(
        "make_connection() is deprecated and will be removed from future versions"
    )
    return connect(*args, **kwargs)
Beispiel #5
0
def create(*args, **kwargs) -> Cursor:
    warn("create() is deprecated and will be removed from future versions")
    return connect().cursor().create(*args, **kwargs)