Group
Extension

Matches 20

ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2.pm ( view source; MetaCPAN )
# version
#
# GET /_api/version
#
# Returns the server name and version number. The response is a JSON object with the following attributes:
#
# server: will always contain arango
# version: the serve
 minor will be numeric, and sub may contain a number or a textual version.
# details: an optional JSON object with additional details. This is returned only if the details URL parameter is set to true
rs.  The only validation that takes place is to
insure that bool parameters have properly encoded JSON true and false values.

=head1 METHODS

=over 4

=item new

=item admin

=item database

=item da
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/HTTP/LWP.pm ( view source; MetaCPAN )
;

use base qw(
    ArangoDB2::HTTP
);

use Data::Dumper;
use JSON::XS;
use LWP::UserAgent;
use Scalar::Util qw(weaken);



my $JSON = JSON::XS->new->utf8;



sub new
{
    my($class, $arango) = @_;
 
_;

    if ($response->is_success) {
        my $res = eval { $JSON->decode($response->content) };
        # if content is not valid JSON then return entire content
        return $response->content u
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Index.pm ( view source; MetaCPAN )
 Data::Dumper;
use JSON::XS;

# parameters that can be set when creating index or
# are returned when creating/getting index
our @PARAMS = qw(
    byteSize constraint fields geoJson id ignoreNull
    
isNewlyCreated minLength size type unique
);

my $JSON = JSON::XS->new->utf8;



# byteSize
#
# get/set byteSize
sub byteSize { shift->_get_set('byteSize', @_) }

# constraint
#
# get/set constraint v
   my $res = $self->arango->http->post(
        $self->api_path('index'),
        $args,
        $JSON->encode($index),
    ) or return;
    # get name from id
    my($name) = $res->{id} =~ m{/(\d+)$}
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Transaction.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;



# action
#
# get/set action
sub action { shift->_get_set('action', 
return $self->arango->http->post(
        $self->api_path('transaction'),
        undef,
        $JSON->encode($args),
    );
}

# lockTimeout
#
# get/set lockTimeout
sub lockTimeout { shift->_get_set
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Endpoint.pm ( view source; MetaCPAN )
 warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;
use URI::Escape qw(uri_escape);

my $JSON = JSON::XS->new->utf8;



###############
# API METHODS #
###############

# 
equest
    my $res = $self->arango->http->post(
        '/_api/endpoint',
        undef,
        $JSON->encode($args),
    ) or return;
    # if request was success copy args to self
    $self->_build
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Traversal.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;

my @PARAMS = qw(
    direction edgeCollection expander filter graphNa
  return $self->arango->http->post(
        $self->api_path('traversal'),
        undef,
        $JSON->encode($args),
    );
}

# expander
#
# get/ set expander
sub expander { shift->_get_set('expand
rator function with this attribute. Note that the value here has to be a string to conform to the JSON standard, which in turn is parsed as function body on the server side. Furthermore note that this
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Query.pm ( view source; MetaCPAN )

use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

use ArangoDB2::Cursor;

my $JSON = JSON::XS->new->utf8;



# new
#
# create new instance
sub new
{
    my($class, 
  my $res = $self->arango->http->post(
        $self->api_path('cursor'),
        undef,
        $JSON->encode($args),
    ) or return;

    return ArangoDB2::Cursor->new($self->arango, $self->databas
    return $self->arango->http->post(
        $self->api_path('explain'),
        undef,
        $JSON->encode({query => $self->query}),
    );
}

# parse
#
# POST /_api/query
sub parse
{
    my($self
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Admin.pm ( view source; MetaCPAN )
ArangoDB2::Admin;

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use JSON::XS;

my $JSON = JSON::XS->new->utf8;



###############
# API METHODS #
###############

# echo
#
# GET /_a
($self, $args) = @_;
    # process args
    $args = $self->_build_args($args, ['program','returnAsJSON']);
    my $program = delete $args->{program};
    # make request
    return $self->arango->http-
roperties';
    # make request
    return $args
        ? $self->arango->http->put($path, undef, $JSON->encode($args))
        : $self->arango->http->get($path);
}

####################
# PROPERTY MET
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Database.pm ( view source; MetaCPAN )
 JSON::XS;
use Scalar::Util qw(reftype);

use ArangoDB2::Collection;
use ArangoDB2::Graph;
use ArangoDB2::Query;
use ArangoDB2::Replication;
use ArangoDB2::Transaction;
use ArangoDB2::User;

my $JSON 
= JSON::XS->new->utf8;



# collection
#
# get/create ArangoDB2::Collection object
sub collection
{
    my($self, $name) = @_;

    if (defined $name) {
        # only create one ArangoDB2::Collection
equest
    my $res = $self->arango->http->post(
        '/_api/database',
        undef,
        $JSON->encode($args),
    ) or return;

    return $self;
}

# current
#
# GET /_api/database/current
s
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Replication.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;



###############
# API METHODS #
###############

# applierConfig
#
uild our own response
    my $ret = {};
    # response is newline separated JSON log entries
    $ret->{log} = [ map { $JSON->decode($_) } split(/\n/, $res->content) ];

    # get response header valu
the collection to dump.  Accepts string or L<ArangoDB2::COllection> object.

=item configuration

JSON representation of the configuration

=item from

Lower bound tick value for results.

=item inclu
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Base.pm ( view source; MetaCPAN )
package ArangoDB2::Base;

use strict;
use warnings;

use Carp qw(croak);
use Data::Dumper;
use JSON::XS;
use Scalar::Util qw(blessed weaken);



# new
#
# Arango organizes data hierarchically: Databas
value  or set JSON bool value.
# setting value returns self.
sub _get_set_bool
{
    my($self, $param, $value, $validate) = @_;

    if (defined $value) {
        # accept "true" as JSON bool false
  
 eq "true") {
            $value = JSON::XS::true;
        }
        # accept "false" as JSON bool false
        elsif ($value eq "false") {
            $value = JSON::XS::false;
        }
        # u
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/HTTP/Curl.pm ( view source; MetaCPAN )
rangoDB2::HTTP
);

use Data::Dumper;
use HTTP::Response;
use JSON::XS;
use Scalar::Util qw(weaken);
use WWW::Curl::Easy;



my $JSON = JSON::XS->new->utf8;



sub new
{
    my($class, $arango) = @_;

;
        return;
    }
    # decode response, assuming JSON
    my $res = eval { $JSON->decode($$response) };
    # if content is not valid JSON then return entire content
    return $$response unles
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Graph/Edge.pm ( view source; MetaCPAN )
ct;
use warnings;

use base qw(
    ArangoDB2::Graph::Vertex
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;


# POST /_api/gharial/graph-name/edge/collection-name
sub create
{
  
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Graph/EdgeDefinition.pm ( view source; MetaCPAN )
se warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

use ArangoDB2::Graph::Edge;

my $JSON = JSON::XS->new->utf8;



# create
#
# POST /_api/gharial/graph-name/edge
sub 
tp->post(
        $self->api_path('gharial', $self->graph->name, 'edge'),
        undef,
        $JSON->encode($args),
    ) or return;
    # set name
    $self->name($name);
    # update parent graph
     $self->api_path('gharial', $self->graph->name, 'edge', $self->name),
        undef,
        $JSON->encode($args),
    ) or return;
    # set name
    $self->name($name);
    # update parent graph
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Graph/VertexCollection.pm ( view source; MetaCPAN )
e warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

use ArangoDB2::Graph::Vertex;

my $JSON = JSON::XS->new->utf8;



# create
#
# POST /_api/gharial/graph-name/vertex
s
->post(
        $self->api_path('gharial', $self->graph->name, 'vertex'),
        undef,
        $JSON->encode({collection => $args->{name}}),
    ) or return;
    # set name
    $self->name($args->{n
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Graph/Vertex.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;



# create
#
# POST /_api/gharial/graph-name/vertex/collection-name
s
h('gharial', $self->graph->name, $self->_class, $self->collection->name),
        $args,
        $JSON->encode($data),
    ) or return;
    # get response data
    $res = $res->{$self->_class}
       
aph->name, $self->_class, $self->collection->name, delete $args->{name}),
        $args,
        $JSON->encode($data),
    ) or return;
    # get response data
    $res = $res->{$self->_class}
       
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/User.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;

my @PARAMS = qw(
    active changePassword extra name passwd
);



##
    my $res = $self->arango->http->post(
        $self->api_path('user'),
        undef,
        $JSON->encode($args),
    ) or return;
    # if request was success copy args to self
    $self->_build
ango->http->patch(
        $self->api_path('user', delete $args->{name}),
        undef,
        $JSON->encode($args),
    ) or return;
    # if request was success copy args to self
    $self->_build
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Document.pm ( view source; MetaCPAN )

use strict;
use warnings;

use base qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

my $JSON = JSON::XS->new->utf8;



# create
#
# POST /_api/document
#
# Query Parameters
#
# collectio
$res = $self->arango->http->post(
        $self->api_path($self->_class),
        $args,
        $JSON->encode($data),
    ) or return;
    # copy response data to instance
    $self->_build_self($res
    $self->api_path($self->_class, $self->collection->name, $self->name),
        $args,
        $JSON->encode($data),
    ) or return;
    # copy response data to instance
    $self->_build_self($res
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Collection.pm ( view source; MetaCPAN )
se qw(
    ArangoDB2::Base
);

use Data::Dumper;
use JSON::XS;

use ArangoDB2::Document;
use ArangoDB2::Edge;
use ArangoDB2::Index;

my $JSON = JSON::XS->new->utf8;

# params that can be set when crea
 $res = $self->arango->http->post(
        $self->api_path('collection'),
        undef,
        $JSON->encode($args),
    ) or return;
    # copy response data to instance
    $self->_build_self($res

        # if args are passed then set with PUT
        ? $self->arango->http->put($path, undef, $JSON->encode($args))
        # otherwise get properties
        : $self->arango->http->get($path);
   
ArangoDB2 ( E/EW/EWARNCKE/ArangoDB2-0.11.tar.gz, EWARNCKE, 2014; MetaCPAN )
ArangoDB2/lib/ArangoDB2/Graph.pm ( view source; MetaCPAN )
B2::Base
);

use Data::Dumper;
use JSON::XS;

use ArangoDB2::Graph::EdgeDefinition;
use ArangoDB2::Graph::VertexCollection;
use ArangoDB2::Traversal;

my $JSON = JSON::XS->new->utf8;



# create
#
# P
 my $res = $self->arango->http->post(
        $self->api_path('gharial'),
        undef,
        $JSON->encode($args),
    ) or return;
    # copy param data from res to self
    $self->_build_self($r

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.