def sql(self, translate):
col_translate = partial(translate, self.name)<EOL>clauses = [col.sql(col_translate) for col in self.columns]<EOL>if self.primary_key:<EOL><INDENT>clauses.append('<STR_LIT>'.format(quoted(<EOL>*[col_translate(c) for c in self.primary_key])))<EOL><DEDENT>for fk, ref, refcols in self.foreign_keys:<EOL><INDENT>clauses.append('<STR_LIT>'.format(<EOL>quoted(*[col_translate(c) for c in fk]),<EOL>quoted(translate(ref)),<EOL>quoted(*[translate(ref, c) for c in refcols])))<EOL><DEDENT>return "<STR_LIT>".format(<EOL>translate(self.name), '<STR_LIT>'.join(clauses))<EOL>
:param translate:
:return: The SQL statement to create the table.