MCPcopy Index your code
hub / github.com/davispuh/MySQL-for-Python-3 / create_table

Method create_table

tests/capabilities.py:65–79  ·  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

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