Add a SKIP clause

@see http://neo4j.com/docs/stable/query-skip.html#skip-skip-first-from-expression
@param string $cypher Of type string as it may contain operations

@return self
422128
public function skip(string $cypher): self
    {
        $query = new self;
        $query->clauses = $this->clauses->add(
            new Clause\SkipClause($cypher)
        );

        return $query;
    }
1038981
public ViewQuery skip(final int skip) {
        if (skip < 0) {
            throw new IllegalArgumentException("Skip must be >= 0.");
        }
        params[PARAM_SKIP_OFFSET] = "skip";
        params[PARAM_SKIP_OFFSET+1] = Integer.toString(skip);
        return this;
    }
145992
public function withParameter(string $key, $parameter): self
    {
        if (Str::of($key)->empty()) {
            throw new DomainException;
        }

        $query = new self($this->cypher);
        $query->parameters = $this->parameters->put(
            $key,
            new Parameter($key, $parameter)
        );

        return $query;
    }
104433
public function limit($limit, $skip = null)
    {
        $this->pipeline['$limit'] = $limit;
        if (!empty($skip)) {
            $this->pipeline['$skip'] = $skip;
        }

        return $this;
    }
1326615
public function addIgnore(string $pattern): self
    {
        if (substr($pattern, 0, 2)=='./') {
            $pattern = substr($pattern, 2);
        }

        if (!in_array($pattern, $this->ignores)) {
            $this->ignores[] = $pattern;
        }

        return $this;
    }
1121022
public function &detach(Node $node)
    {
        foreach ($this->links as $linked_node) {
            if ($linked_node == $node) {
                $this->links->detach($node);
            }
        }

        return $this;
    }
848302
public function addNode(&$node)
    {
        //Nodes must be an instance graph Node;
        if (!$this->isNode($node)) {
            throw new \Exception("Node must be an instance of Graph\Node", PLATFORM_ERROR);
        }
        $nodedId = $node->getId();
        if (!empty($nodedId) && !isset($this->nodeSet[$node->getId()])) {
            $this->nodeSet[$node->getId()] = &$node;
        }
        return $this;
    }
1281445
public static function fromNode($node)
    {
        $p = new self();
        $p->setNid($node->id());
        $p->setPhpVersion('7.0');
        if ($node->hasField('field_pull_request_template') && !$node->get('field_pull_request_template')->isEmpty()) {
            $p->setCustomPrMessage($node->get('field_pull_request_template')->first()->getString());
        }
        if (!$p->getCustomPrMessage()) {
            // See if we have a default one on the user.
            $owner = $node->getOwner();
            if ($owner->hasField('field_user_pr_template') && !$owner->get('field_user_pr_template')->isEmpty()) {
                $p->setCustomPrMessage($owner->get('field_user_pr_template')->first()->getString());
            }
        }
        if ($node->hasField('field_php_version') && !$node->get('field_php_version')->isEmpty()) {
            $p->setPhpVersion($node->get('field_php_version')->first()->getString());
        }
        $owner = $node->getOwner();
        if ($owner) {
            $p->setRoles($owner->getRoles());
        }
        return $p;
    }
532376
public function addNodes(array $nodes): self
    {
        foreach ($nodes as $node) {
            $this->addNode($node);
        }

        return $this;
    }
389333
public function addQueryParameter(string $key, string $value): self
    {
        if ($this->query === null) {
            $this->query = "{$key}={$value}";
        } else {
            $this->query = "{$this->query}&{$key}={$value}";
        }

        return $this;
    }
1365993
public function createInstanceByQueryString($query)
    {
        switch ($this->rdfHelpers->getQueryType($query)) {
            case 'askQuery':
                return new AskQueryImpl($query, $this->rdfHelpers);

            case 'constructQuery':
                return new ConstructQueryImpl($query, $this->rdfHelpers);

            case 'describeQuery':
                return new DescribeQueryImpl($query, $this->rdfHelpers);

            case 'graphQuery':
                return new GraphQueryImpl($query, $this->rdfHelpers);

            case 'selectQuery':
                return new SelectQueryImpl($query, $this->rdfHelpers);

            case 'updateQuery':
                return new UpdateQueryImpl($query, $this->rdfHelpers);

            default:
                throw new \Exception('Unknown query type: '.$query);
        }
    }
535369
public function slice($field, $limit, $skip = null)
    {
        $limit  = (int) $limit;
        $skip   = (int) $skip;

        if ($skip) {
            $this->projection[$field] = array('$slice' => array($skip, $limit));
        } else {
            $this->projection[$field] = array('$slice' => $limit);
        }

        $this->skipDocumentPool();

        return $this;
    }
600665
public function where(string $cypher): self
    {
        $query = new self;
        $query->clauses = $this->clauses->add(
            new Clause\WhereClause($cypher)
        );

        return $query;
    }
629885
public function startsWith($prefix)
    {
        if (\is_array($prefix)) {
            /** @noinspection ForeachSourceInspection */
            foreach ($prefix as $item) {
                $this->startsWith($item);
            }
        } else {
            $this->assertNotBlanks($prefix);
            $this->predicates[] = $this->processValue($prefix) . '*';
        }

        return $this;
    }
463086
public function skip(int $value): self
    {
        $this->offset += $value;
        $this->bytes = substr($this->bytes, $value);

        return $this;
    }
1273021
protected function prependChild(Node $node) {
    if ($this->head === NULL) {
      $this->childCount++;
      $node->parent = $this;
      $node->previous = NULL;
      $node->next = NULL;
      $this->head = $this->tail = $node;
    }
    else {
      $this->insertBeforeChild($this->head, $node);
      $this->head = $node;
    }
    return $this;
  }
40267
public function replaceWith($nodes) {
    $first = TRUE;
    foreach ($this->nodes as $node) {
      if (!$first) {
        if (is_array($nodes)) {
          $nodes = new NodeCollection($nodes, FALSE);
        }
        $nodes = clone $nodes;
      }
      $node->replaceWith($nodes);
      $first = FALSE;
    }
    return $this;
  }