(self, table, cols)
| 140 | # Create new table |
| 141 | # Return: True on success |
| 142 | def createTable(self, table, cols): |
| 143 | # TODO: Check current structure |
| 144 | self.execute("DROP TABLE IF EXISTS %s" % table) |
| 145 | col_definitions = [] |
| 146 | for col_name, col_type in cols: |
| 147 | col_definitions.append("%s %s" % (col_name, col_type)) |
| 148 | |
| 149 | self.execute("CREATE TABLE %s (%s)" % (table, ",".join(col_definitions))) |
| 150 | return True |
| 151 | |
| 152 | # Create indexes on table |
| 153 | # Return: True on success |