logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catmandu::Store::AlephX - A Catmandu AlephX service implemented as Catmandu::Store

Methods

get($id)
       Retrieves a record from the Aleph database. Requires a record identifier. Returns a Catmandu MARC record
       when found and undef on failure.

   add($catmandu_marc)
       Adds or updates a record to the Aleph database. Requires a Catmandu type MARC record and a _id field
       containing the Aleph record number. This method with throw an error when an add cant be executed.

       example

         #add new record. WARNING: Aleph will ignore the 001 field,
         my $new_record = eval {
           $bag->add({
           record =>  [
             [
               'FMT',
               '',
               '',
               '_',
               'SE'
             ],
             [
               'LDR',
               '',
               '',
               '_',
               '00000cas^^2200385^a^4500'
             ],
             [
               '001',
               '',
               '',
               '_',
               '000000444'
             ],
             [
               '005',
               '',
               '',
               '_',
               '20140212095615.0'
             ]
             ..
           ]
         });

         };
         if ($@) {
           die "add failed $@";
         }

         say "new record:".$record->{_id};

   delete($id)
       Deletes a record from the Aleph database. Requires a record identifier. Returns a true value when the
       record is deleted.

   each(callback)
       Loops over all records in the Aleph database executing callback for every record.

   search(query=>$query,start=>0,limit=>20);searcher()
       Not implemented

   delete_all()
       Not implemented

   delete_by_query()
       Not implemented

Name

       Catmandu::Store::AlephX - A Catmandu AlephX service implemented as Catmandu::Store

See Also

       Catmandu::Store

perl v5.36.0                                       2023-02-02                       Catmandu::Store::AlephX(3pm)

Synopsis

        use Catmandu::Store::AlephX;

        my $store = Catmandu::Store::AlephX->new(url => 'http://aleph.ugent.be/X' , username => 'XXX' , password => 'XXX');

        $store->bag('usm01')->each(sub {
        });

See Also