---
name: "AtteanX::Store::Memory"
section: "3pm"
platform: "linux"
package: "libattean-perl"
version: "0.035-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/AtteanX::Store::Memory"
---

# AtteanX::Store::Memory(3pm)

Simple in-memory RDF store

## NAME

AtteanX::Store::Memory - Simple in-memory RDF store

## VERSION

This document describes AtteanX::Store::Memory version 0.035

## SYNOPSIS

```
 use AtteanX::Store::Memory;
```

## DESCRIPTION

AtteanX::Store::Memory provides an in-memory quad-store.

## ATTRIBUTES

- "subject"

  - "predicate"

  - "object"

  - "graph"

  ## METHODS

Beyond the methods documented below, this class inherits methods from the Attean::API::QuadStore class.

- "new ()"

  Returns a new memory-backed storage object.

- "size"

  Returns the number of quads in the 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.

- "get\_graphs"

  Returns an iterator over the Attean::API::Term objects comprising the 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.

- "remove\_quads ( $subject, $predicate, $object, $graph )"

  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`.

- "count\_quads ( $subject, $predicate, $object, $graph )"

  Returns a count of all the statements matching the specified subject, predicate, object, and graph. Any of the arguments may be undef to match any value.

- "etag\_value\_for\_quads"

  If the store has the capability and knowledge to support caching, returns a persistent token that will remain consistent as long as the store's data doesn't change. This token is acceptable for use as an HTTP ETag.

- "mtime\_for\_quads"

  - "plans\_for\_algebra"

  The store implements a cost-based query planner, but this method is reimplemented to hand the overall control of the planning process to an external planner by returning `"undef"`.

- "cost\_for\_plan"

  This store provides a cost estimate only for retrieving individual quad patterns in this method. It will allow other planners to estimate the cost for any other parts of the plan by returning `"undef"` for those parts.

## BUGS

Please report any bugs or feature requests to through the GitHub web interface at \<https://github.com/kasei/perlrdf2/issues\>.

## AUTHOR

Gregory Todd Williams  `"<gwilliams@cpan.org>"`

## COPYRIGHT

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
