override _onOwnRowUpdate to implement custom functionality
511103
public final function onOwnRowUpdate(Kwf_Events_Event_Row_Abstract $event)
    {
        $cmps = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId(
            $event->row->component_id, array('ignoreVisible'=>true)
        );
        foreach ($cmps as $c) {
            if ($c->componentClass == $this->_class) {
                if ($c->isVisible()) {
                    $this->fireEvent(new Kwf_Component_Event_Component_ContentChanged(
                        $this->_class, $c
                    ));
                    if (Kwc_Abstract::hasSetting($this->_class, 'throwHasContentChangedOnRowColumnsUpdate')) {
                        if ($event->isDirty(Kwc_Abstract::getSetting($this->_class, 'throwHasContentChangedOnRowColumnsUpdate'))) {
                            $this->fireEvent(new Kwf_Component_Event_Component_HasContentChanged(
                                $this->_class, $c
                            ));
                        }
                    }
                    $this->_onOwnRowUpdate($c, $event);
                    $this->_onOwnRowUpdateNotVisible($c, $event);
                } else {
                    $this->_onOwnRowUpdateNotVisible($c, $event);
                }
            }
        }
    }
786923
void onCategorySelected(String columnId, int row) {
        Integer maxSelections = displayerSettings.isFilterSelfApplyEnabled() ? null : dataSet.getRowCount();
        filterUpdate(columnId, row, maxSelections);

        // Update the displayer in order to reflect the current selection
        // (only if not has already been redrawn in the previous filterUpdate() call)
        if (!displayerSettings.isFilterSelfApplyEnabled()) {
            updateVisualization();
        }
    }
366017
function(oEvent) {
			var oScrollExtension = this._getScrollExtension();
			var bExecuteDefault = VerticalScrollingHelper.runOnRowsUpdatedPreprocessor(this, oEvent);

			if (!TableUtils.isVariableRowHeightEnabled(this) || !bExecuteDefault) {
				return;
			}

			var sReason = oEvent.getParameters().reason;
			var bRowExpandedOrCollapsed = sReason === TableUtils.RowsUpdateReason.Expand || sReason === TableUtils.RowsUpdateReason.Collapse;
			var iFirstVisibleRowIndexInBuffer = this.getFirstVisibleRow() - this._getMaxFirstRenderedRowIndex();

			log("onRowsUpdated: Reason " + sReason, this);

			if (iFirstVisibleRowIndexInBuffer >= 0 && bRowExpandedOrCollapsed) {
				internal(this).iFirstVisibleRowInBuffer = iFirstVisibleRowIndexInBuffer;
				oScrollExtension.updateInnerVerticalScrollPosition();
			}
		}
849194
function(db) {
		var methods_uuid = uuid();
		debug.assert(methods_uuid).is('uuid');

		return db.query('CREATE SEQUENCE methods_seq')
			.query(['CREATE TABLE IF NOT EXISTS methods (',
					"	id uuid PRIMARY KEY NOT NULL default uuid_generate_v5('"+methods_uuid+"', nextval('methods_seq'::regclass)::text),",
					'	types_id uuid REFERENCES types,',
					'	type text NOT NULL,',
					'	name text NOT NULL,',
					'	body text NOT NULL,',
					'	meta json NOT NULL,',
					'	active BOOLEAN DEFAULT TRUE,',
					'	created timestamptz NOT NULL default now(),',
					'	modified timestamptz NOT NULL default now(),',
					'	CONSTRAINT active_not_false CHECK(active != false)',
					')'
				].join('\n'))
			.query('ALTER SEQUENCE methods_seq OWNED BY methods.id')
			.query('CREATE INDEX methods_types_id ON methods (types_id)')
			.query('CREATE INDEX methods_types_id_name ON methods (types_id,name)')
			.query('CREATE INDEX methods_type ON methods (type)')
			.query('CREATE INDEX methods_type_name ON methods (type,name)')
			.query('CREATE UNIQUE INDEX ON methods USING btree(types_id, name, active nulls LAST);')
			.query('CREATE TRIGGER methods_modified BEFORE UPDATE ON methods FOR EACH ROW EXECUTE PROCEDURE moddatetime (modified)')
			.query(
				[
	'CREATE OR REPLACE FUNCTION ensure_only_one_active_row_trigger()',
	'RETURNS trigger',
	'AS $function$',
	'BEGIN',
	  // Disable the currently enabled row
	"  IF (TG_OP = 'UPDATE') THEN",
	     // Nothing to do if updating the row currently enabled'
	"    IF (OLD.active = true AND OLD.name = NEW.name) THEN",
	'      RETURN NEW;',
	'    END IF;',
	"    EXECUTE format('UPDATE %I.%I SET active = null WHERE active = true AND name = %L;', TG_TABLE_SCHEMA, TG_TABLE_NAME, OLD.name);",
	"    IF (OLD.name != NEW.name) THEN",
	"      EXECUTE format('UPDATE %I.%I SET active = null WHERE active = true AND name = %L;', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.name);",
	'    END IF;',
	'  ELSE',
	"    EXECUTE format('UPDATE %I.%I SET active = null WHERE active = true AND name = %L;', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.name);",
	'  END IF;',
	   // Enable new row
	'  NEW.active := true;',
	'  RETURN NEW;',
	'END;',
	'$function$',
	'LANGUAGE plpgsql'
				].join('\n')
			)
			.query('CREATE TRIGGER methods_only_one_active_row'+
				' BEFORE INSERT OR UPDATE OF active ON methods'+
				' FOR EACH ROW WHEN (NEW.active = true)'+
				' EXECUTE PROCEDURE ensure_only_one_active_row_trigger()'
			);
	}
378964
function _setRaw(raw: Object, key: string, value: any, columnSchema: ColumnSchema): void {
  const { type, isOptional } = columnSchema

  // If the value is wrong type or invalid, it's set to `null` (if optional) or empty value ('', 0, false)
  if (type === 'string') {
    if (typeof value === 'string') {
      raw[key] = value
    } else {
      raw[key] = isOptional ? null : ''
    }
  } else if (type === 'boolean') {
    if (typeof value === 'boolean') {
      raw[key] = value
    } else if (value === 1 || value === 0) {
      // Exception to the standard rule — because SQLite turns true/false into 1/0
      raw[key] = Boolean(value)
    } else {
      raw[key] = isOptional ? null : false
    }
  } else {
    // type = number
    // Treat NaN and Infinity as null
    if (isValidNumber(value)) {
      raw[key] = value
    } else {
      raw[key] = isOptional ? null : 0
    }
  }
}
1265632
public static <T extends Entity> T handleRow(T row, int columnCount, ResultSetMetaData meta, ResultSet rs, boolean withMetaInfo) throws SQLException {
		String columnLabel;
		int type;
		for (int i = 1; i <= columnCount; i++) {
			columnLabel = meta.getColumnLabel(i);
			type = meta.getColumnType(i);
			row.put(columnLabel, getColumnValue(rs, columnLabel, type, null));
		}
		if (withMetaInfo) {
			row.setTableName(meta.getTableName(1));
			row.setFieldNames(row.keySet());
		}
		return row;
	}
437524
def update(instance, full_clean=True, post_save=False, **kwargs):
    ""

    # apply the updated args to the instance to mimic the change
    # note that these might slightly differ from the true database values
    # as the DB could have been updated by another thread. callers should
    # retrieve a new copy of the object if up-to-date values are required
    for k, v in kwargs.iteritems():
        if isinstance(v, ExpressionNode):
            v = resolve_expression_node(instance, v)
        setattr(instance, k, v)

    # clean instance before update
    if full_clean:
        instance.full_clean()

    # fields that use auto_now=True should be updated corrected, too!
    for field in instance._meta.fields:
        if hasattr(field, 'auto_now') and field.auto_now and field.name not in kwargs:
            kwargs[field.name] = field.pre_save(instance, False)

    rows_affected = instance.__class__._default_manager.filter(
        pk=instance.pk).update(**kwargs)

    if post_save:
        signals.post_save.send(sender=instance.__class__, instance=instance)

    return rows_affected
383187
public void updateUnique(@NotNull SqlQuery query) {
        int modifiedRows = update(query);
        if (modifiedRows != 1)
            throw new NonUniqueUpdateException(modifiedRows);
    }
1298164
def update(self, event_or_list):
        """"""

        for e in super().update(event_or_list):
            if e.type == MOUSEBUTTONDOWN:
                if e.pos in self:
                    self.click()
                else:
                    self.release(force_no_call=True)

            elif e.type == MOUSEBUTTONUP:
                self.release(force_no_call=e.pos not in self)

            elif e.type == MOUSEMOTION:
                if e.pos in self:
                    self.hovered = True
                else:
                    self.hovered = False
1158438
def updateObj(self,event):
        """"""
        
        name=w.objList.get("active")
        w.SearchVar.set(name)
        w.ObjInfo.set(objInfoDict[name])
        return
543914
void insertRow(Session session, PersistentStore store, Object[] data) {

        setIdentityColumn(session, data);

        if (triggerLists[Trigger.INSERT_BEFORE].length != 0) {
            fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data,
                               null);
        }

        if (isView) {
            return;
        }

        checkRowDataInsert(session, data);
        insertNoCheck(session, store, data);
    }
562741
function appendJoinRow(arrayCols, keyDf, leftNonKeyDf, rightNonKeyDf,
  leftInd, rightInd, indicatorValue, rightIndForKey) {

  var keyInd = rightIndForKey ? rightInd : leftInd;
  var i, nCol;
  var colInd = 0;
  nCol = keyDf.nCol();
  for (i = 0; i < nCol; i++) {
    arrayCols[colInd].push(keyDf._cols[i].values[keyInd]);
    colInd++;
  }
  nCol = leftNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var leftVal = (leftInd === null) ? null :
      leftNonKeyDf._cols[i].values[leftInd];
    arrayCols[colInd].push(leftVal);
    colInd++;
  }
  nCol = rightNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var rightVal = (rightInd === null) ? null :
      rightNonKeyDf._cols[i].values[rightInd];
    arrayCols[colInd].push(rightVal);
    colInd++;
  }
  if (colInd < arrayCols.length) {
    // Add the join indicator value if there's a final column for it
    arrayCols[colInd].push(indicatorValue);
  }
}
1265093
def custom_update(self, data, pred, obj):
        '''  '''
        if isinstance(data[pred], str): # for all simple properties of str value
            data[pred] = str(obj)
        else: # synonyms, superclasses, and existing_ids have special requirements
            if pred == 'synonyms':
                literals = [d['literal'] for d in data[pred]]
                if obj not in literals:
                    data[pred].append({'literal': obj}) # synonyms req for post
            elif pred == 'superclasses':
                ilx_ids = [d['ilx'] for d in data[pred]]
                if obj not in ilx_ids:
                    _obj = obj.replace('ILX:', 'ilx_')
                    super_data, success = self.get_data_from_ilx(ilx_id=_obj)
                    super_data = super_data['data']
                    if success:
                        # superclass req post
                        data[pred].append({'id': super_data['id'], 'ilx': _obj})
                    else:
                        return self.test_check('Your superclass ILX ID '
                                                + _obj + ' does not exist.')
            elif pred == 'existing_ids':  # FIXME need to autogenerate curies from a map
                iris = [d['iri'] for d in data[pred]]
                if obj not in iris:
                    if 'http' not in obj:
                        return self.test_check('exisiting id value must \
                                               be a uri containing "http"')
                    data[pred].append({
                        'curie': self.qname(obj),
                        'iri': obj,
                        'preferred': '0' # preferred is auto generated by preferred_change
                    })
                #data[pred] = []
                data = self.preferred_change(data) # One ex id is determined to be preferred
            else:
                # Somehow broke this code
                return self.test_check(pred + ' Has slipped through the cracks')
        return data
954849
function(oTable) {
			if (TableGrouping.isGroupMode(oTable) || TableGrouping.isTreeMode(oTable)) {
				var oBinding = oTable.getBinding("rows");
				var oRowBindingInfo = oTable.getBindingInfo("rows");
				var aRows = oTable.getRows();
				var iCount = aRows.length;
				var iRow;

				if (oBinding) {
					for (iRow = 0; iRow < iCount; iRow++) {
						var oRowGroupInfo = TableGrouping.getRowGroupInfo(oTable, aRows[iRow], oBinding, oRowBindingInfo);
						TableGrouping.updateTableRowForGrouping(oTable, aRows[iRow], oRowGroupInfo.isHeader, oRowGroupInfo.expanded,
							oRowGroupInfo.hidden, false, oRowGroupInfo.level, oRowGroupInfo.title);
					}
				} else {
					for (iRow = 0; iRow < iCount; iRow++) {
						TableGrouping.cleanupTableRowForGrouping(oTable, aRows[iRow]);
					}
				}
			}
		}
214247
function appendAttrs(action, attrs, _updates, opts) {
  var updates = isTypeUpdates(this) ? this : (_updates || (new Updates()));

  if (attrs && hasKeysOnly(attrs)) {
    appendAttrsKeysOnly(action, attrs, updates, opts);
  } else if (typeof attrs === "object") {
    util.forIn(attrs, function(value, key) {
      if (value !== null && typeof value !== 'undefined')
        appendAttr(action, key, value, updates, opts);
    });
  }
  
  return updates;
}
566692
@Override
    public void setRowId(int parameterIndex, RowId x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
158226
@Override
    protected boolean i_updateRow(Connection conn,
                                  String table,
                                  String[] columns,
                                  String[] values,
                                  String uniqueColumn,
                                  boolean[] numeric) throws SQLException {

        // prepare update statement
        StringBuilder sql = new StringBuilder(64);
        sql.append("UPDATE ").append(table).append(" SET ");
        boolean needComma = false;
        for (int i = 0; i < columns.length; i++) {
            if (!columns[i].equals(uniqueColumn)) {
                if (needComma) {
                    sql.append(", ");
                } else {
                    needComma = true;
                }
                sql.append(columns[i] + " = ");
                if (values[i] == null) {
                    sql.append("NULL");
                } else {
                    sql.append('?');
                }
            }
        }
        sql.append(" WHERE ");
        sql.append(uniqueColumn);
        sql.append(" = ?");
        if (logger.isDebugEnabled()) {
            logger.debug("About to execute: " + sql.toString());
        }
        PreparedStatement stmt = conn.prepareStatement(sql.toString());

        try {
            // populate values
            int varIndex = 0;
            for (int i = 0; i < columns.length; i++) {
                if (!columns[i].equals(uniqueColumn) && values[i] != null) {
                    varIndex++;
                    if (numeric != null && numeric[i]) {
                        setNumeric(stmt, varIndex, columns[i], values[i]);
                    } else {
                        stmt.setString(varIndex, values[i]);
                    }
                }
            }
            varIndex++;
            stmt
                    .setString(varIndex, getSelector(columns,
                                                     values,
                                                     uniqueColumn));

            // execute and return true if existing row was updated
            return stmt.executeUpdate() > 0;

        } finally {
            closeStatement(stmt);
        }
    }