@check_precondition
def update(self, gid, sid, did, scid, tid, cid):
    '\n        Updates the Check Constraint object.\n\n        Args:\n            gid: Server Group Id\n            sid: Server Id\n            did: Database Id\n            scid: Schema Id\n            tid: Table Id\n            cid: Check Constraint Id\n        '
    data = (request.form if request.form else json.loads(request.data, encoding='utf-8'))
    try:
        data['schema'] = self.schema
        data['table'] = self.table
        (SQL, name) = self.get_sql(gid, sid, data, scid, tid, cid)
        if (not SQL):
            return name
        SQL = SQL.strip('\n').strip(' ')
        (status, res) = self.conn.execute_scalar(SQL)
        if (not status):
            return internal_server_error(errormsg=res)
        sql = render_template('/'.join([self.template_path, 'get_name.sql']), cid=cid)
        (status, res) = self.conn.execute_dict(sql)
        if (not status):
            return internal_server_error(errormsg=res)
        if (('convalidated' in res['rows'][0]) and res['rows'][0]['convalidated']):
            icon = 'icon-check_constraints_bad'
            valid = False
        else:
            icon = 'icon-check_constraints'
            valid = True
        return jsonify(node=self.blueprint.generate_browser_node(cid, tid, name, icon=icon, valid=valid))
    except Exception as e:
        return internal_server_error(errormsg=str(e))
Updates the Check Constraint object.

Args:
    gid: Server Group Id
    sid: Server Id
    did: Database Id
    scid: Schema Id
    tid: Table Id
    cid: Check Constraint Id
@check_precondition
def update(self, gid, sid, did, scid, tid, cid):
    '\n        Updates the Check Constraint object.\n\n        Args:\n            gid: Server Group Id\n            sid: Server Id\n            did: Database Id\n            scid: Schema Id\n            tid: Table Id\n            cid: Check Constraint Id\n        '
    data = (request.form if request.form else json.loads(request.data, encoding='utf-8'))
    try:
        data['schema'] = self.schema
        data['table'] = self.table
        (SQL, name) = self.get_sql(gid, sid, data, scid, tid, cid)
        if (not SQL):
            return name
        SQL = SQL.strip('\n').strip(' ')
        (status, res) = self.conn.execute_scalar(SQL)
        if (not status):
            return internal_server_error(errormsg=res)
        sql = render_template('/'.join([self.template_path, 'get_name.sql']), cid=cid)
        (status, res) = self.conn.execute_dict(sql)
        if (not status):
            return internal_server_error(errormsg=res)
        if (('convalidated' in res['rows'][0]) and res['rows'][0]['convalidated']):
            icon = 'icon-check_constraints_bad'
            valid = False
        else:
            icon = 'icon-check_constraints'
            valid = True
        return jsonify(node=self.blueprint.generate_browser_node(cid, tid, name, icon=icon, valid=valid))
    except Exception as e:
        return internal_server_error(errormsg=str(e))