MCPcopy Create free account
hub / github.com/apache/impala / cursor

Function cursor

tests/conftest.py:556–568  ·  view source on GitHub ↗

Provides a new DB-API compliant cursor from a connection provided by the conn() fixture. The cursor only exists for the duration of the method it is used in. The returned cursor will have a 'conn' property. The 'conn' will have a 'db_name' property. DEPRECATED: See the 'un

(conn)

Source from the content-addressed store, hash-verified

554
555@pytest.fixture
556def cursor(conn):
557 """Provides a new DB-API compliant cursor from a connection provided by the conn()
558 fixture. The cursor only exists for the duration of the method it is used in.
559
560 The returned cursor will have a 'conn' property. The 'conn' will have a 'db_name'
561 property.
562
563 DEPRECATED:
564 See the 'unique_database' fixture above to use Impala's custom python
565 API instead of DB-API.
566 """
567 with __auto_closed_cursor(conn) as cur:
568 yield cur
569
570
571@contextlib.contextmanager

Callers

nothing calls this directly

Calls 1

__auto_closed_cursorFunction · 0.85

Tested by

no test coverage detected