Neo4j-Bolt

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

    Path             arrayref  (Neo4j::Bolt::Path)

[Nodes](/lib/Neo4j/Bolt/Node.md), [Relationships](/lib/Neo4j/Bolt/Relationship.md) and
[Paths](/lib/Neo4j/Bolt/Path.md) are represented in the following formats:

    # Node:
    bless {
      id => $node_id,  element_id => $node_eid,
      labels => [$label1, $label2, ...],
      properties => {prop1 => $value1, prop2 => $value2, ...}
    }, 'Neo4j::Bolt::Node'

    # Relationship:
    bless {
      id    => $reln_id,        element_id       => $reln_eid,
      start => $start_node_id,  start_element_id => $start_node_eid,
      end   => $end_node_id,    end_element_id   => $end_node_eid,
      type  => $reln_type,
      properties => {prop1 => $value1, prop2 => $value2, ...}
    }, 'Neo4j::Bolt::Relationship'

    # Path:
    bless [
      $node1, $reln12, $node2, $reln23, $node3, ...
    ], 'Neo4j::Bolt::Path'

For further details, see the individual modules:

- [Neo4j::Bolt::Bytes](/lib/Neo4j/Bolt/Bytes.md)
- [Neo4j::Bolt::DateTime](/lib/Neo4j/Bolt/DateTime.md)
- [Neo4j::Bolt::Duration](/lib/Neo4j/Bolt/Duration.md)
- [Neo4j::Bolt::Node](/lib/Neo4j/Bolt/Node.md)
- [Neo4j::Bolt::Path](/lib/Neo4j/Bolt/Path.md)
- [Neo4j::Bolt::Point](/lib/Neo4j/Bolt/Point.md)
- [Neo4j::Bolt::Relationship](/lib/Neo4j/Bolt/Relationship.md)

# METHODS

- connect($url), connect\_tls($url,$tls\_hash)

    Class method, connect to Neo4j server. The URL scheme must be `'bolt'`, as in

        $url = 'bolt://localhost:7687';

    Returns object of type [Neo4j::Bolt::Cxn](/lib/Neo4j/Bolt/Cxn.md), which accepts Cypher queries and
    returns a [Neo4j::Bolt::ResultStream](/lib/Neo4j/Bolt/ResultStream.md).

    To connect by SSL/TLS, use connect\_tls, with a hashref with keys as follows

        ca_dir => <path/to/dir/of/CAs
        ca_file => <path/to/file/of/CAs
        pk_file => <path/to/private/key.pm
        pk_pass => <private/key.pm passphrase>

    Example:

        $cxn = Neo4j::Bolt->connect_tls('bolt://all-the-young-dudes.us:7687', { ca_cert => '/etc/ssl/cert.pem' });

    When neither `ca_dir` nor `ca_file` are specified, an attempt will
    be made to use the default trust store instead.
    This requires [IO::Socket::SSL](https://metacpan.org/pod/IO::Socket::SSL) or [Mozilla::CA](https://metacpan.org/pod/Mozilla::CA) to be installed.

- set\_log\_level($LEVEL)

    When $LEVEL is set to one of the strings `ERROR WARN INFO DEBUG` or `TRACE`,
    libneo4j-client native logger will emit log messages at or above the given
    level, on STDERR.

    Set to `NONE` to turn off completely (the default).

# SEE ALSO

[Neo4j::Bolt::Cxn](/lib/Neo4j/Bolt/Cxn.md), [Neo4j::Bolt::ResultStream](/lib/Neo4j/Bolt/ResultStream.md), [Neo4j::Types](https://metacpan.org/pod/Neo4j::Types).

# AUTHOR

    Mark A. Jensen
    CPAN: MAJENSEN
    majensen -at- cpan -dot- org

# CONTRIBUTORS

- Arne Johannessen ([AJNN](https://metacpan.org/author/AJNN))

# LICENSE

This software is Copyright (c) 2019-2026 by Mark A. Jensen.

This is free software, licensed under:

    The Apache License, Version 2.0, January 2004



( run in 3.146 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )