table of contents
| AtteanX::Store::DBI(3pm) | User Contributed Perl Documentation | AtteanX::Store::DBI(3pm) | 
NAME¶
AtteanX::Store::DBI - Database quad-store
VERSION¶
This document describes AtteanX::Store::DBI version 0.002
SYNOPSIS¶
 use Attean;
 my $store = Attean->get_store('DBI')->new( dbh => $dbh );
DESCRIPTION¶
AtteanX::Store::DBI provides a quad-store backed by a relational database.
ATTRIBUTES¶
- "dbh"
ROLES¶
This class consumes Attean::API::QuadStore,Attean::API::MutableQuadStore, and Attean::API::BulkUpdatableStore.
METHODS¶
- "new ( dbh => $dbh )"
- Returns a new quad-store object backed by the database referenced by thesupplied database handle.
- init()
- Create the tables and indexes required for using the database as a quadstore.
- temporary_store()
- Returns a temporary (in-memory, SQLite) store.
- "get_quads ( $subject, $predicate, $object, $graph )"
- Returns a stream object of all statements matching the specified subject,predicate and objects. Any of the arguments may be undef to match any value,or an ARRAY reference of terms that are allowable in the respective quadposition.
- "count_quads ( $subject, $predicate, $object, $graph )"
- Returns the count of all statements matching the specified subject,predicate and objects. Any of the arguments may be undef to match any value,or an ARRAY reference of terms that are allowable in the respective quadposition.
- "get_graphs"
- Returns an iterator over the Attean::API::Term objects comprisingthe set of graphs of the stored quads.
- "add_quad ( $quad )"
- Adds the specified $quad to the underlying model.
- "remove_quad ( $statement )"
- Removes the specified $statement from the underlying model.
- create_graph( $graph )
- This is a no-op function for the memory quad-store.
- drop_graph( $graph )
- Removes all quads with the given $graph.
- clear_graph( $graph )
- Removes all quads with the given $graph.
- "begin_transaction"
- Begin a database transaction.
- "abort_transaction"
- Rollback the current database transaction.
- "end_transaction"
- Commit the current database transaction.
- "begin_bulk_updates"
- Begin a database transaction.
- "end_bulk_updates"
- Commit the current database transaction.
- "database_type"
- Returns the database type name as a string (e.g. 'mysql', 'sqlite', or 'postgresql').
- "initialize_version"
- Insert data into the attean_version table.
- "create_schema_file"
- Returns the path to the file containing the database DDL for quadstore creationfor the current database type if available, undef otherwise.
- "drop_schema_file"
- Returns the path to the file containing the database DDL for quadstore deletionfor the current database type if available, undef otherwise.
- "available_database_types"
- Returns the names of the database types for which the system has schemasavailable to create and drop quadstore tables.
- "dbi_connect_args ( $type, %args )"
- "dbi_connect_args ( %args )"
- Returns a quad "$dsn, $user, $password,
      \%connect_args" suitable for passing to
      "DBI->connect" to obtain a database
      handle to be used in constructing a
      "AtteanX::Store::DBI" quadstore.
    %args must contain a value for the "database" key. It may also contain values for the optional keys: "user", "password", "host", and "port". If invoked as a class method, the $type parameter is required, and must be one of the database types returned by "available_database_types". If invoked as an object method, the $type parameter must not be included; this information will be obtained directly from the "AtteanX::Store::DBI" object. 
- "plans_for_algebra( $algebra, $model, $active_graphs, $default_graphs )"
- For BGP algebras, returns a DBI-specific Attean::API::Plan object, otherwisereturns undef.
- cost_for_plan( $plan )
- Returns the estimated cost for a DBI-specific query plan, undef otherwise.
BUGS¶
Please report any bugs or feature requests to through the GitHub web interfaceat <https://github.com/kasei/perlrdf2/issues>.
AUTHOR¶
Gregory Todd Williams "<gwilliams@cpan.org>"
COPYRIGHT¶
Copyright (c) 2014--2020 Gregory Todd Williams. Thisprogram is free software; you can redistribute it and/or modify it underthe same terms as Perl itself.
| 2025-03-02 | perl v5.40.1 |