pass
-class ConnectionWriter(Writer):
+class LibpqWriter(Writer):
def __init__(self, cursor: "Cursor[Any]"):
self.cursor = cursor
self.connection = cursor.connection
self.cursor._rowcount = nrows if nrows is not None else -1
-class QueueWriter(ConnectionWriter):
+class QueueWriter(LibpqWriter):
"""
A writer using a buffer to queue data to write.
pass
-class AsyncConnectionWriter(AsyncWriter):
+class AsyncLibpqWriter(AsyncWriter):
def __init__(self, cursor: "AsyncCursor[Any]"):
self.cursor = cursor
self.connection = cursor.connection
self.cursor._rowcount = nrows if nrows is not None else -1
-class AsyncQueueWriter(AsyncConnectionWriter):
+class AsyncQueueWriter(AsyncLibpqWriter):
"""
A writer using a buffer to queue data to write.
)
def test_connection_writer(conn, format, buffer):
cur = conn.cursor()
- writer = psycopg.copy.ConnectionWriter(cur)
+ writer = psycopg.copy.LibpqWriter(cur)
ensure_table(cur, sample_tabledef)
with cur.copy(
)
async def test_connection_writer(aconn, format, buffer):
cur = aconn.cursor()
- writer = psycopg.copy.AsyncConnectionWriter(cur)
+ writer = psycopg.copy.AsyncLibpqWriter(cur)
await ensure_table(cur, sample_tabledef)
async with cur.copy(