MCPcopy
hub / github.com/psycopg/psycopg / ensure_table

Function ensure_table

tests/_test_copy.py:34–36  ·  view source on GitHub ↗
(cur, tabledef, name="copy_in")

Source from the content-addressed store, hash-verified

32
33
34def ensure_table(cur, tabledef, name="copy_in"):
35 cur.execute(f"drop table if exists {name}")
36 cur.execute(f"create table {name} ({tabledef})")
37
38
39async def ensure_table_async(cur, tabledef, name="copy_in"):

Callers 15

test_set_typesFunction · 0.70
test_rowlen_mismatchFunction · 0.70
test_copy_in_buffersFunction · 0.70
test_copy_in_strFunction · 0.70
test_copy_in_errorFunction · 0.70
test_copy_in_emptyFunction · 0.70
test_copy_big_size_blockFunction · 0.70
test_subclass_adapterFunction · 0.70
test_copy_in_error_emptyFunction · 0.70

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected