def visit_update(self, update_stmt, **kw):
if not update_stmt.parameters andnot hasattr(update_stmt, '<STR_LIT>'):<EOL><INDENT>return super(CrateCompiler, self).visit_update(update_stmt, **kw)<EOL><DEDENT>self.isupdate = True<EOL>extra_froms = update_stmt._extra_froms<EOL>text = '<STR_LIT>'<EOL>if update_stmt._prefixes:<EOL><INDENT>text += self._generate_prefixes(update_stmt,<EOL>update_stmt._prefixes, **kw)<EOL><DEDENT>table_text = self.update_tables_clause(update_stmt, update_stmt.table,<EOL>extra_froms, **kw)<EOL>dialect_hints = None<EOL>if update_stmt._hints:<EOL><INDENT>dialect_hints, table_text = self._setup_crud_hints(<EOL>update_stmt, table_text<EOL>)<EOL><DEDENT>crud_params = self._get_crud_params(update_stmt, **kw)<EOL>text += table_text<EOL>text += '<STR_LIT>'<EOL>include_table = extra_froms andself.render_table_with_column_in_update_from<EOL>set_clauses = []<EOL>for k, v in crud_params:<EOL><INDENT>clause = k._compiler_dispatch(self,<EOL>include_table=include_table) +'<STR_LIT>' + v<EOL>set_clauses.append(clause)<EOL><DEDENT>for k, v in update_stmt.parameters.items():<EOL><INDENT>if isinstance(k, str) and '<STR_LIT:[>' in k:<EOL><INDENT>bindparam = sa.sql.bindparam(k, v)<EOL>set_clauses.append(k + '<STR_LIT>' + self.process(bindparam))<EOL><DEDENT><DEDENT>text += '<STR_LIT:U+002CU+0020>'.join(set_clauses)<EOL>if self.returning or update_stmt._returning:<EOL><INDENT>if not self.returning:<EOL><INDENT>self.returning = update_stmt._returning<EOL><DEDENT>if self.returning_precedes_values:<EOL><INDENT>text += "<STR_LIT:U+0020>" + self.returning_clause(<EOL>update_stmt, self.returning)<EOL><DEDENT><DEDENT>if extra_froms:<EOL><INDENT>extra_from_text = self.update_from_clause(<EOL>update_stmt,<EOL>update_stmt.table,<EOL>extra_froms,<EOL>dialect_hints,<EOL>**kw)<EOL>if extra_from_text:<EOL><INDENT>text += "<STR_LIT:U+0020>" + extra_from_text<EOL><DEDENT><DEDENT>if update_stmt._whereclause is not None:<EOL><INDENT>t = self.process(update_stmt._whereclause)<EOL>if t:<EOL><INDENT>text += "<STR_LIT>" + t<EOL><DEDENT><DEDENT>limit_clause = self.update_limit_clause(update_stmt)<EOL>if limit_clause:<EOL><INDENT>text += "<STR_LIT:U+0020>" + limit_clause<EOL><DEDENT>if self.returning and not self.returning_precedes_values:<EOL><INDENT>text += "<STR_LIT:U+0020>" + self.returning_clause(<EOL>update_stmt, self.returning)<EOL><DEDENT>return text<EOL>
used to compile <sql.expression.Update> expressions
Parts are taken from the SQLCompiler base class.