def _create_table_setup(self):
column_names_and_types = self._get_column_names_and_types(<EOL>self._sql_type_name<EOL>)<EOL>pat = re.compile(r'<STR_LIT>')<EOL>column_names = [col_name for col_name, _, _ in column_names_and_types]<EOL>if any(map(pat.search, column_names)):<EOL><INDENT>warnings.warn(_SAFE_NAMES_WARNING, stacklevel=<NUM_LIT:6>)<EOL><DEDENT>escape = _get_valid_sqlite_name<EOL>create_tbl_stmts = [escape(cname) + '<STR_LIT:U+0020>' + ctype<EOL>for cname, ctype, _ in column_names_and_types]<EOL>if self.keys is not None and len(self.keys):<EOL><INDENT>if not is_list_like(self.keys):<EOL><INDENT>keys = [self.keys]<EOL><DEDENT>else:<EOL><INDENT>keys = self.keys<EOL><DEDENT>cnames_br = "<STR_LIT:U+002CU+0020>".join(escape(c) for c in keys)<EOL>create_tbl_stmts.append(<EOL>"<STR_LIT>".format(<EOL>tbl=self.name, cnames_br=cnames_br))<EOL><DEDENT>create_stmts = ["<STR_LIT>" + escape(self.name) + "<STR_LIT>" +<EOL>'<STR_LIT>'.join(create_tbl_stmts) + "<STR_LIT>"]<EOL>ix_cols = [cname for cname, _, is_index in column_names_and_types<EOL>if is_index]<EOL>if len(ix_cols):<EOL><INDENT>cnames = "<STR_LIT:_>".join(ix_cols)<EOL>cnames_br = "<STR_LIT:U+002C>".join(escape(c) for c in ix_cols)<EOL>create_stmts.append(<EOL>"<STR_LIT>" + escape("<STR_LIT>" + self.name + "<STR_LIT:_>" + cnames) +<EOL>"<STR_LIT>" + escape(self.name) + "<STR_LIT>" + cnames_br + "<STR_LIT:)>")<EOL><DEDENT>return create_stmts<EOL>
Return a list of SQL statements that creates a table reflecting the
structure of a DataFrame.  The first entry will be a CREATE TABLE
statement while the rest will be CREATE INDEX statements.