MCPcopy
hub / github.com/psycopg/psycopg / choose_schema

Method choose_schema

tests/fix_faker.py:199–205  ·  view source on GitHub ↗
(self, ncols=20)

Source from the content-addressed store, hash-verified

197 )
198
199 def choose_schema(self, ncols=20):
200 schema: list[tuple[type, ...] | type] = []
201 while len(schema) < ncols:
202 if (s := self.make_schema(choice(self.types))) is not None:
203 schema.append(s)
204 self.schema = schema
205 return schema
206
207 def make_records(self, nrecords):
208 self.records = [self.make_record(nulls=0.05) for i in range(nrecords)]

Callers 15

schemaMethod · 0.95
test_copy_to_leaksFunction · 0.80
test_copy_from_leaksFunction · 0.80
test_copy_table_acrossFunction · 0.80
test_leakFunction · 0.80
test_leakFunction · 0.80
test_leakFunction · 0.80
test_copy_to_leaksFunction · 0.80
test_copy_from_leaksFunction · 0.80
test_copy_table_acrossFunction · 0.80
test_leakFunction · 0.80
test_randomFunction · 0.80

Calls 1

make_schemaMethod · 0.95

Tested by 15

test_copy_to_leaksFunction · 0.64
test_copy_from_leaksFunction · 0.64
test_copy_table_acrossFunction · 0.64
test_leakFunction · 0.64
test_leakFunction · 0.64
test_leakFunction · 0.64
test_copy_to_leaksFunction · 0.64
test_copy_from_leaksFunction · 0.64
test_copy_table_acrossFunction · 0.64
test_leakFunction · 0.64
test_randomFunction · 0.64
test_leakFunction · 0.64