public function upsert(array $values)
    {
        if (empty($values)) {
            return true;
        }
        $values = $this->detectValues($values);
        $bindings = [];
        foreach ($values as $record) {
            foreach ($record as $key => $value) {
                $bindings[$key] = $value;
            }
        }

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

        return $this->connection->upsert($sql, $bindings);
    }
public function upsert(array $values)
    {
        if (empty($values)) {
            return true;
        }
        $values = $this->detectValues($values);
        $bindings = [];
        foreach ($values as $record) {
            foreach ($record as $key => $value) {
                $bindings[$key] = $value;
            }
        }

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

        return $this->connection->upsert($sql, $bindings);
    }
public function upsert ( array $ values ) { if ( empty ( $ values ) ) { return true ; } $ values = $ this -> detectValues ( $ values ) ; $ bindings = [ ] ; foreach ( $ values as $ record ) { foreach ( $ record as $ key => $ value ) { $ bindings [ $ key ] = $ value ; } } $ sql = $ this -> grammar -> compileUpsert ( $ this , $ values ) ; return $ this -> connection -> upsert ( $ sql , $ bindings ) ; }
supported N1QL upsert query.

@param array $values

@return bool|mixed
supported N1QL upsert query .