MCPcopy
hub / github.com/psycopg/psycopg / get_table_stmt

Method get_table_stmt

tests/scripts/copytest.py:68–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

66 self.args = args
67
68 def get_table_stmt(self) -> Query:
69 fields = sql.SQL(", ").join(
70 [sql.SQL(f"f{i} text") for i in range(self.args.nfields)]
71 )
72 stmt = sql.SQL("""\
73create temp table testcopy (id serial primary key, {})
74""").format(fields)
75 return stmt
76
77 def get_copy_stmt(self) -> Query:
78 fields = sql.SQL(", ").join(

Callers 2

main_syncFunction · 0.95
main_asyncFunction · 0.95

Calls 2

formatMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected