Returns a INSERT query with values.

@param  array  $values Array of values
@return string
515010
protected function insertWithValues(array $values): string
	{
		$sql  = 'INSERT INTO ';
		$sql .= $this->escapeTable($this->query->getTable());
		$sql .= ' (' . implode(', ', $this->escapeIdentifiers(array_keys($values))) . ')';
		$sql .= ' VALUES';
		$sql .= ' (' . $this->params($values) . ')';

		return $sql;
	}
310398
public function getExecutedQueryString(array $values = array())
    {
        $sql = $this->queryString;
        $boundValues = empty($values) ? $this->boundValues : $values;
        $matches = array();
        if (preg_match_all('/(:p[0-9]+\b)/', $sql, $matches)) {
            $size = count($matches[1]);
            for ($i = $size - 1; $i >= 0; $i--) {
                $pos = $matches[1][$i];

                // trimming extra quotes, making sure value is properly quoted afterwards
                $boundValue = $boundValues[$pos];
                if (is_string($boundValue)) { // quoting only needed for string values
                    $boundValue = trim($boundValue, "'");
                    $boundValue = $this->pdo->quote($boundValue);
                }
                $sql = str_replace($pos, $boundValue, $sql);
            }
        }

        return $sql;
    }
630674
public function values(array $values)
    {
        $this->sqlParts['values'] = is_array(current($values)) ? $values : [$values];

        return $this;
    }
430450
public function execute(array $values = [])
    {
        if ($this->is_prepared === false) {
            $this->prepare();
        }

        $values = $this->prepareValues($this->sql, $values);
        $this->sendNotification(
            'query:pre',
            [
                'sql'           => $this->sql,
                'parameters'    => $values,
                'session_stamp' => $this->getSession()->getStamp(),
            ]
        );

        $start    = microtime(true);
        $resource = $this
            ->getSession()
            ->getConnection()
            ->sendExecuteQuery(
                $this->getClientIdentifier(),
                $values,
                $this->sql
            );
        $end      = microtime(true);
        $this->sendNotification(
            'query:post',
            [
                'result_count' => $resource->countRows(),
                'time_ms'      => sprintf("%03.1f", ($end - $start) * 1000),
            ]
        );

        return $resource;
    }
994671
protected function insertExecute(string $statement, array $values): ?array {
		
		// our insert method should return either a single ID or a list of created IDs.
		// we can use the ExtendedPdo's fetchAffected method to determine how many were
		// inserted and then use that to determine our return value.  if nothing at all
		// was inserted, we return null.
		
		$affected = $this->dbConn->fetchAffected($statement, array_values($values));
		
		if ($affected === 0) {
			return null;
		}
		
		if ($affected === 1) {
			return [$this->getInsertedId()];
		}
		
		// if we haven't returned, then we inserted more than 1 row.  we can construct a
		// list of the IDs that were created by using the last ID and range as follows.
		// to identify our first ID, it would seem like $lastId - $affected would be enough,
		// but if we inserted 5 rows ending at 10, 10 - 5 = 5 and we don't want a range to
		// be [10,9,8,7,6,5] because that's six IDs.  so, we want to do 10 - (5 - 1) which
		// would result in [10,9,8,7,6] which is the correct response.
		
		$lastId = $this->getInsertedId();
		$firstId = $lastId - ($affected - 1);
		return range($lastId, $firstId);
	}
1242280
public function addValues(array $values)
    {
        // Check if this is a multi-dimensional array
        $isMultiDimensional = 0 == count($values) || (isset($values[0]) && is_array($values[0]));

        if ($isMultiDimensional) {
            $this->insertRows = array_merge($this->insertRows, $values);
        } else {
            // If a single row is provided then it is added
            // to the last row, or a new row if there are none.
            // This is done to maintain BC
            if (count($this->insertRows) > 0) {
                $k = count($this->insertRows) - 1;
                $this->insertRows[$k] = array_replace($this->insertRows[$k], $values);
            } else {
                $this->insertRows = [$values];
            }
        }

        return $this;
    }
841752
public function insertGetId(array $values): string
    {
        $stmt = $this->set($values)->prepare();
        $stmt->execute();

        return $this->pdo->lastInsertId();
    }
460206
public function insert(string $table, array $values): int {
		
		// this is where we start to deviate from simply changing the names of
		// the Aura\Sql functions to match existing function calls within my other
		// applications.  we have two options here:  inserting a single row or
		// multiple ones.  either way the $values array tells us what to do.  if
		// it's an array of arrays, then we do multiples.
		
		try {
			$inserted = isset($values[0]) && is_array($values[0])
				? $this->insertMultiple($table, $values)
				: $this->insertSingle($table, $values);

			return !is_numeric($inserted) ? sizeof($inserted) : $inserted;
		} catch (\PDOException $pdoException) {
			throw $this->prepareDatabaseException($pdoException, $table, $values);
		}
	}
742539
public function addValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->addValues($_values);});
	}
587032
public function insert(array $values): ResultInterface
    {
        $this->insert                   = $this->getTableName();
        $this->insertValues['columns']  = array_keys($values);
        $this->insertValues['values'][] = array_values($values);

        return $this->execute();
    }
571054
public function prepareInsert($table, array $values) {

        // Initialize the query.
        $query = [];

        $query[] = "INSERT INTO ";
        $query[] = $table;
        $query[] = " (`";
        $query[] = implode("`, `", array_keys($values));
        $query[] = "`) VALUES (";
        $query[] = implode(", ", array_values($values));
        $query[] = ")";

        // Return the query.
        return implode("", $query);
    }
297371
public function insert($values)
    {
        try {
            if (func_num_args() > 0 && !is_array($values)) {
                $this->values = array_merge($this->values, self::sanitizeAV(func_get_args()));
            } else if (is_array($values)) {
                $this->values = self::sanitize($values);
            } else {
                static::$response["status"] = "error";
                static::$response["response"] = "unrecognized parameter options in the insert values";
                static::$response["code"] = 7004;
                return static::terminate(static::$response);
            }
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response["code"] = $e->getCode();
           return static::terminate(static::$response);
        }

        return $this;
    }
213590
public function update(array $values)
	{
		$bindings = array_values(array_merge($values, $this->bindings));

		$sql = $this->grammar->compileUpdate($this, $values);

		return $this->connection->update($sql, $this->cleanBindings($bindings));
	}
273015
public function update(array $values): array
	{
		$sql  = $this->query->getPrefix();
		$sql .= 'UPDATE ';
		$sql .= $this->escapeTable($this->query->getTable());
		$sql .= ' SET ';
		$sql .= $this->updateColumns($values);
		$sql .= $this->wheres($this->query->getWheres());

		return ['sql' => $sql, 'params' => $this->params];
	}
1293599
protected function insert(array $values, array $place_holders = [], $table = ''){
        if( empty($table) ){
            extract($this->get_default_values($values, $table, $place_holders));
        }
        return $this->db->insert($table, $values, $place_holders);
    }
70858
public function insertAndGetId(array $values, string $primaryKey = 'id')
	{
		return $this->helper->insertAndGetId($this, $values, $primaryKey);
	}
33748
protected function _addValue($values)
    {
        $method = $this->getSaveMode();
        $value_array = [];
        foreach ($values as $key => $value) {
            $value_array[] = $this->$method($key, $value);
        }

        return implode(',', $value_array);
    }