NAME

ObjStore::Table3 - RDBMS Style Tables

SYNOPSIS

cd table-test ObjStore::Table3::Database

DESCRIPTION

Unstructured perl databases are probably under-constrained for most applications. Tables standardize the interface for storing a bunch of records and their associated indices.

A table is no more than a collection of indices (as opposed to a some sort of heavy-weight object). Think of it like an event manager for indices.

API

  • $t->anyx

    Returns any non-empty index in the table.

  • $t->add($e)

    Adds $e to all table indices.

  • $t->remove($e)

    Removes $e from all table indices.

  • $t->index($index_name)

    Returns the index named $index_name.

  • $t->fetch($index_name, @keys)

    Returns the record resulting from looking up @keys in the index named $index_name.

  • $t->add_index($index)

    Adds the index.

  • $t->remove_index($index)

  • $t->map_indices($coderef)

    Calls $coderef->($index) on each index.

Representation Independent API

A database can be seen as table, and/or tables can be stored within a database. The implementation is only slightly different in either case. To smooth things over, an accessor method is provided that always returns the top-level hash of the table.

  • $t->table

    Returns the top-level hash.

MIGRATION

BUGS

Usage is a bit more cumbersome than I would like. The interface will change slightly as perl supports more overload-type features.

TODO

  • Expand migration options

AUTHOR

Copyright © 1997-1998 Joshua Nathaniel Pritikin. All rights reserved.

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 215:

Non-ASCII character seen before =encoding in '©'. Assuming CP1252