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()
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)
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)
def make_connection(*args, **kwargs): warn( "make_connection() is deprecated and will be removed from future versions" ) return connect(*args, **kwargs)
def create(*args, **kwargs) -> Cursor: warn("create() is deprecated and will be removed from future versions") return connect().cursor().create(*args, **kwargs)