Data::Stag::StagDB(3pm)

Data::Stag::StagDB3pm

Usage

  # parsing a file into a file based index
  my $sdb = Data::Stag::StagDB->new;
  $sdb->unique_key("ss_details/social_security_no");
  $sdb->record_type("person");
  $sdb->indexfile("./person_by_ss-idx");
  Data::Stag->parse(-file=>$fn, -handler=>$sdb);
  my $obj = $sdb->index_hash;
  my $person = $obj->{'999-9999-9999'};
  print $person->xml;
  # indexing an existing stag tree into a file based index
  my $personset = Data::Stag->parse($fn);
  my $sdb = Data::Stag::StagDB->new;
  $sdb->unique_key("ss_details/social_security_no");
  $sdb->record_type("person");
  $sdb->indexfile("./person_by_ss-idx");
  $personset->sax($sdb);
  my $obj = $sdb->index_hash;
  my $person = $obj->{'999-9999-9999'};
  print $person->xml;

Overview

This module is an extension of Data::Stag::HashDB - you can use it in the same way.

It creates a simple file based database of stag nodes

This is useful if you want your data to persist; or if you want to use Data::Stag::HashDB but your data will not fit into memory

Public methods -

indexfile

  Usage   -
  Returns -
  Args    -

Releases

9 releases since Debian 5.0 (Lenny); the text changed 4 times.

  1. 5.0
  2. 6.0–7
  3. 8
  4. 9–11
  5. 12–13

From libdata-stag-perl 0.14-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.