DBIO::PostgreSQL::Age

Apache AGE graph database extension support for DBIO::PostgreSQL.

Supports

Usage

package MyApp::Schema;
use base 'DBIO::Schema';
__PACKAGE__->load_components('PostgreSQL::Age');

my $schema = MyApp::Schema->connect(
  $dsn, $user, $pass,
  { on_connect_call => 'load_age' },
);

$schema->storage->create_graph('social');

my $rows = $schema->storage->cypher(
  'social',
  'MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name',
  [qw( person friend )],
);

DBIO core autodetects dbi:Pg: DSNs with the PostgreSQL driver, and DBIO::PostgreSQL::Age is loaded via load_components.

Apache AGE Features

Graph Operations

openCypher Support

Labels & Types

Testing

Requires a running PostgreSQL instance with Apache AGE extension:

export DBIO_TEST_PG_DSN="dbi:Pg:database=myapp"
export DBIO_TEST_PG_USER=postgres
export DBIO_TEST_PG_PASS=secret
prove -l t/

The live test (C<t/10-age-live.t>) creates an actual graph and runs openCypher queries. Skips if no AGE extension is available.

Requirements

See Also

DBIO::PostgreSQL, DBIO::PostgreSQL::Age::Storage, Apache AGE

Repository

https://codeberg.org/dbio/dbio-postgresql-age