The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::DB::Service::XUpdateQueryService - provides XUpdate queries

SYNOPSIS

$service = $collection->getService('XUpdateQueryService', '1.0'); $service->update($xupdate); $service->updateResource($xupdate, $documentId);

DESCRIPTION

Implements XML::DB::Service, to provide XUpdate queries of the collection it is derived from.

In principle, an xupdate should just be sent over the transport mechanism to be dealt with by the database, if it supports XUpdate. Where a database doesnt support XUpdate natively yet, it has to be done by fetching the files, applying the update, and then writing them back.

BUGS

Updates do not return a node count as per spec (what is this useful for anyway?), since that would require interfering with the guts of XML::XUpdate::LibXML, or reimplementing it.

AUTHOR

        Graham Seaman
        CPAN ID: GSEAMAN
        graham@opencollector.org

COPYRIGHT

Copyright (c) 2002 Graham Seaman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).

PUBLIC METHODS

update

    Usage : $no_modified = $service->update($xupdate);

    Purpose : Runs xupdate against whole collection and writes result back to database

    Arguments : XUpdate XML string

    Returns : Integer (count of modified nodes)

updateResource

    Usage : $no_modified = $service->update($resource_name, $xupdate);

    Purpose : Runs xupdate against one Resource and writes result back to database

    Arguments : String representing resource (id or name); XUpdate XML string

    Returns : Integer (count of modified nodes)

new

    Usage : Should only be called indirectly, from a Collection (see Synopsis)

    Purpose : Constructor