The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::MarkLogic::XDBC - XDBC connectivity for MarkLogic CIS servers.

SYNOPSIS

  use Net::MarkLogic::XDBC
 
  $xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );
  
  $xdbc = Net::MarkLogic::XDBC->new(host     => $host,
                                    port     => $port,
                                    username => $user,
                                    password => $pass, );

  $result = $agent->query($xquery);

  print $result->content;

  @items = $result->items;
  print $item->content;

DESCRIPTION

Alpha. API will change.

Connect to a CIS XDBC server and execute xquery code.

METHODS

new()

  $xdbc = Net::MarkLogic::XDBC->new( "user:pass@localhost:9000" );

  $xdbc = Net::MarkLogic::XDBC->new( host     => $hostname,
                                     port     => $port,
                                     username => $user,
                                     password => $pass, );

Connect using a connection string or named host, port, username, and password parameters.

query()

    $result = $xdbc->query($xquery);

Execute XQUERY code on XDBC server.

query_from_template()

    $result = $xdbc->query_from_template($template, $args);

Generate XQUERY code from a template toolkit template and arguments, then execute on XDBC server.

This might be overkill, but it's definitely a feature you're not going to find in the Java API.

ATTRIBUTE METHODS

These methods function as setter/getters for the objects attributes.

$get = $xdbc->foo(); $xdbc->foo($set);

These shouldn't be important unless you need to finetune the behavior or tweak the settings.

ua()

LWP::UserAgent, just in case anyone needs to tweak settings.

header()

HTTP::Headers, sent on every request to the XDBC server.

host()

Name or IP address of the XDBC server host.

port()

Port number of XDBC server.

username()

User used for authentication.

password()

Password used for authentication.

uri()

Set a custom URI to connect to the XDBC server. Default connection go to "http://$host:$port/eval".

BUGS

Big time. Watch out for changing APIs.

AUTHOR

    Tony Stubblebine
    tonys@oreilly.com

ACKNOWLEDGEMENTS

    Code contributions from: Michael Blakeley
 
    Advice and comments from Raffaele Sena, Ryan Grimm, Andy Bruno.

COPYRIGHT

Copyright 2004 Tony Stubblebine

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SEE ALSO

MarkLogic Documentation: http://xqzone.marklogic.com/