NAME
DBIO::PostgreSQL::Age - Apache AGE graph database support for DBIO::PostgreSQL
VERSION
version 0.900001
SYNOPSIS
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 )],
);
DESCRIPTION
DBIO::PostgreSQL::Age integrates Apache AGE graph database support into DBIO::PostgreSQL. Apache AGE is a PostgreSQL extension that adds openCypher graph query capabilities via the cypher() SQL function.
Loading this component registers DBIO::PostgreSQL::Age::Storage as a storage layer (via "register_storage_layer" in DBIO::Schema), so it is composed over the resolved PostgreSQL driver storage at connection time -- see DBIO::Storage::Composed. The composed storage carries graph lifecycle management and Cypher query execution alongside the standard PostgreSQL storage, and stacks with other storage-layer extensions (e.g. DBIO::PostgreSQL::PostGIS) on the same schema.
METHODS
connection
Overrides "connection" in DBIO to register DBIO::PostgreSQL::Age::Storage as a storage layer ("register_storage_layer" in DBIO::Schema) before connecting, so it is composed over the resolved driver storage rather than replacing it. This is what lets AGE stack with other PostgreSQL storage-layer extensions and ride every async transport its layer is composed onto.
CONNECTION SETUP
Apache AGE requires LOAD 'age' and SET search_path = ag_catalog, ... on each database connection before any graph operations. Use the load_age connection callback:
MyApp::Schema->connect(
$dsn, $user, $pass,
{ on_connect_call => 'load_age' },
);
DBIO::PostgreSQL - Base PostgreSQL driver component
DBIO::PostgreSQL::Age::Storage - Storage class with graph methods
AUTHOR
DBIO Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 87:
Unknown directive: =seealso