-
-
06 Apr 2010 17:49:25 UTC
- Distribution: Catalyst-Model-Sedna
- Module version: 0.001
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (1 / 6 / 2)
- Kwalitee
Bus factor: 0- License: unknown
- Activity
24 month- Tools
- Download (2.71KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Sedna
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Catalyst::Model::Sedna - Access the Sedna XML Database
SYNOPSIS
package MyApp::Model::Sedna; use base 'Catalyst::Model::Sedna; __PACKAGE__->config({ url => 'localhost', db_name => 'mydb', user => 'myuser', password => 'password' }); # later in your application my $s = $c->model('Sedna'); $s->execute('for $x in document("doc123") return $x'); if (my $item = $s->get_item()) { $c->res->content_type('application/xml'); $c->res->body($item); }
DESCRIPTION
This module will manage a connection to the sedna database and perform queries. The connection attributes are set in the config file. Note that the Sedna connection does not support cursors, so if you need to insert data while traversing another query, you need a second connection.
METHODS
- conn
-
Returns the Sedna connection object.
- execute/begin/rollback/getData/next/commit
-
Methods handled directly by the connection.
- get_item
-
This is a convenience method that will see if there is a next item available in the connection and already fetches the entire result to a scalar value.
- get_document($id)
-
This method will do a simple query to fetch a document by its id and return its content.
- store_document($xml, $id, $collection)
-
This method will load the xml data sent into a document of the given id. Optionally a collection can be sent.
SEE ALSO
See the Sedna documentation, and also the Sedna bindings.
AUTHOR
Daniel Ruoso, <daniel@ruoso.com>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Daniel Ruoso
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 122:
You forgot a '=back' before '=head1'
Module Install Instructions
To install Catalyst::Model::Sedna, copy and paste the appropriate command in to your terminal.
cpanm Catalyst::Model::Sedna
perl -MCPAN -e shell install Catalyst::Model::Sedna
For more information on module installation, please visit the detailed CPAN module installation guide.