Adds new data entry to referencing Result

@param array $values
@param string $table
@param string|null $viaColumn
@param Filtering|null $filtering
@param string|null $strategy
490371
public function addToReferencing(array $values, $table, $viaColumn = null, Filtering $filtering = null, $strategy = self::STRATEGY_IN)
    {
        $result = $this->getReferencingResult($table, $viaColumn, $filtering, $strategy);

        foreach ($result as $key => $entry) {
            if (array_diff_assoc($values, $entry) === []) {
                return;
            }
        }

        $result->addDataEntry($values);
        unset($this->index[spl_object_hash($result)]);
    }
904968
protected function addUpdatedAtColumn(array $values)
    {
        if (! $this->model->usesTimestamps()) return $values;

        $column = $this->model->getUpdatedAtColumn();

        return array_add($values, $column, $this->model->freshTimestampString());
    }
57260
public function insertMany($table, array $columns, array $values)
    {
        $collection = array();

        foreach ($values as $index => $data) {
            foreach ($data as $key) {
                $collection[$index][] = $this->createUniqPlaceholder($key);
            }
        }

        $this->queryBuilder->insertMany($table, $columns, $collection);
        return $this;
    }
369902
protected function _insert_batch($table, $keys, $values)
	{
		// Multiple-value inserts are only supported as of SQL Server 2008
		if (version_compare($this->version(), '10', '>='))
		{
			return parent::_insert_batch($table, $keys, $values);
		}

		return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE;
	}
344203
public function addCategoryValues($values)
    {
        $this->_categoryValues = array_unique(array_merge($this->getCategoryValues(true), $this->filterCategoryValues($values)));
    }
845571
public function mergeValuesBase(array $values): void
  {
    if ($this->name==='')
    {
      // Nothing to do.
      ;
    }
    elseif (isset($values[$this->name]))
    {
      $values = &$values[$this->name];
    }
    else
    {
      $values = null;
    }

    if ($values!==null)
    {
      foreach ($this->options as $id => $option)
      {
        if (array_key_exists($option[$this->keyKey], $values))
        {
          $this->options[$id][$this->checkedKey] = !empty($values[$option[$this->keyKey]]);
        }
      }
    }
  }
1151619
public function insert($table, array $values){
        try{
            //Armo y preparo la consulta
            $query= $this->prepareInsert($table, $values);
            //Ejecuto la consulta
            $query->execute($values);
            //Retorno si salio todo bien o no
            return $this->isOk($query);
        } catch (\PDOException $e) {
            throw $e;
        }
    }
714999
protected function addValues($values)
    {
        if (!is_array($values) && !$values instanceof \Traversable) {
            //Unable to process values
            return;
        }

        foreach ($values as $value) {
            //Passing every value thought the filter
            $value = $this->filterValue($value);
            if (!is_null($value)) {
                $this->values[] = $value;
            }
        }
    }
1178953
private function insert($columns, $values)
    {
        return Query::table(static::$table)
        ->column($columns)
        ->value($values)
        ->insert();
    }
650514
public function columns(array $values, $width = 5, $tableStyle = 'compact', array $columnStyles = [])
    {
        $table = new Table($this);
        $table->setHeaders([])->setRows(iterator_to_array($this->chunk($values, $width)))->setStyle($tableStyle);

        foreach ($columnStyles as $columnIndex => $columnStyle) {
            $table->setColumnStyle($columnIndex, $columnStyle);
        }

        $columnWidths = $this->getColumnWidths($width);
        $table->setColumnWidths($columnWidths);

        $table->render();
    }
448764
static function massinsert(\fenrir\system\MysqlDatabaseSignature $db, $table, array $values, $map = null) {
		$db->begin();
		try {
			foreach ($values as $value) {
				static::insert($db, $table, $value, $map);
			}
			$db->commit();
		}
		catch (\Exception $e) {
			$db->rollback();
			throw $e;
		}
	}
1370900
function fromAssociativeResultArray($values) {
		foreach (static::$_columns as $column_name => &$type) {
			if (array_key_exists($column_name, $values)) {
				$this->{$column_name} = $values[$column_name];
			}
		}
		if (static::$_primaryKeys && !$this->hasPrimaryKeyValues()) {
			return false;
		}
		$this->castInts();
		$this->setNew(false);
		return true;
	}
502945
function insertUpdate(string $tableName, array $values, array $wheres)
  {
    $wClause = implode(" and ", $this->makeClauses($wheres));

    if ($this->queryValue("select count(*) from $tableName where $wClause") != 0)
    {
      if (count($values))
      {
        $v = [];
        foreach ($values as $key => &$value)
          $v[] = "`$key`=".$this->quote($value);

        $this->q
        (
          "update $tableName set ".
          implode(",",$v).
          " where $wClause"
        );
      }
      return null;
    }
    else
    {
      return $this->insert($tableName, array_merge($values, $wheres));
    }
  }
332069
public function andWhereIn($column, $values, $filter = false)
    {
        return $this->whereInValues(__FUNCTION__, $column, $values, $filter);
    }
717257
public static function insert( $table, $values = array(), $handler = null ) 
	{
		return Query::insert( $table, $values, $handler );
	}
654968
public function insert($model, $values, $map = null)
    {
        if (is_string($values)) {
            $values = [
                $values => $map,
            ];
            $map = null;
        }

        $this->adapt($model, $this->profile($values));

        $fieldsArray = [];
        $tokensArray = [];
        $valuesArray = [];

        foreach ($values as $field => $value) {
            $field = isset($map[$field]) ? $map[$field] : $field;
            $token = ':'.$field;
            $fieldsArray[] = '`'.$field.'`';
            $tokensArray[] = $token;
            $valuesArray[$token] = $value;
        }

        $fields = implode(',', $fieldsArray);
        $tokens = implode(',', $tokensArray);
        $table = $this->getPrefix($model);
        $sql = "INSERT INTO `{$table}` ({$fields}) VALUES ({$tokens})";
        $this->execute($sql, $valuesArray);

        return $this->getLastId();
    }
480856
public function update(string $table, array $values, array $criteria = []): int {
		
		// like our insertion methods above, this one can impact one or more rows
		// and we want to return the number of rows we alter.  unlike the insertion
		// methods, all we need to do is build our statement which isn't too hard for
		// us to do.
		
		$where = "";
		$updates = [];
		$valueColumns = array_keys($values);
		foreach ($valueColumns as $column) {
			$updates[] = sprintf("%s%s%s = ?", $this->columnPrefix, $column, $this->columnSuffix);
		}
		
		$statement = "UPDATE $table SET " . join(", ", $updates);
		
		if (sizeof($criteria) > 0) {
			$whereColumns = array_keys($criteria);
			foreach ($whereColumns as $column) {
				$where .= sprintf("%s%s%s = ?", $this->columnPrefix, $column, $this->columnSuffix);
			}
			
			$statement .= " WHERE $where";
		}
		
		// now that we've built our statement, we need to combine the values and criteria values
		// which are then bound to the statement by the ExtendedPdo object.  then, we can perform
		// the statement and return the number of affected rows.
		
		$bindings = $this->mergeBindings($values, $criteria);
		
		try {
			return $this->dbConn->fetchAffected($statement, $bindings);
		} catch (\PDOException $pdoException) {
			throw $this->prepareDatabaseException($pdoException, $statement, $bindings);
		}
	}