MCPcopy Index your code
hub / github.com/PyMySQL/mysqlclient / create_table

Method create_table

tests/capabilities.py:67–80  ·  view source on GitHub ↗

Create a table using a list of column definitions given in columndefs. generator must be a function taking arguments (row_number, col_number) returning a suitable data object for insertion into the table.

(self, columndefs)

Source from the content-addressed store, hash-verified

65 i = i + 1
66
67 def create_table(self, columndefs):
68 """Create a table using a list of column definitions given in
69 columndefs.
70
71 generator must be a function taking arguments (row_number,
72 col_number) returning a suitable data object for insertion
73 into the table.
74
75 """
76 self.table = self.new_table_name()
77 self.cursor.execute(
78 "CREATE TABLE %s (%s) %s"
79 % (self.table, ",\n".join(columndefs), self.create_table_extra)
80 )
81
82 def check_data_integrity(self, columndefs, generator):
83 # insert

Callers 4

check_data_integrityMethod · 0.95
test_transactionsMethod · 0.95
test_truncationMethod · 0.95

Calls 2

new_table_nameMethod · 0.95
executeMethod · 0.80

Tested by 3

test_transactionsMethod · 0.76
test_truncationMethod · 0.76