ArangoDB2
view release on metacpan or search on metacpan
lib/ArangoDB2/Document.pm view on Meta::CPAN
167168169170171172173174175176177178179180181182183184185186187
# make request
return
$self
->arango->http->get(
$self
->api_path(
$self
->_class),
$args
);
}
# update
#
# PATCH /_api/document/{document-handle}
sub
update
{
my
(
$self
,
$data
,
$args
) =
@_
;
# process args
$args
=
$self
->_build_args(
$args
, [
'keepNull'
,
'policy'
,
'waitForSync'
]);
# make request
my
$res
=
$self
->arango->http->patch(
$self
->api_path(
$self
->_class,
$self
->collection->name,
$self
->name),
$args
,
$JSON
->encode(
$data
),
) or
return
;
lib/ArangoDB2/Graph/Vertex.pm view on Meta::CPAN
103104105106107108109110111112113114115116117118119120121122123}
# keepNull
#
# get/set keepNull
sub
keepNull {
shift
->_get_set_bool(
'keepNull'
,
@_
) }
# update
#
# PATCH /system/gharial/graph-name/vertex/collection-name/vertex-key
sub
update
{
my
(
$self
,
$data
,
$args
) =
@_
;
# require data
die
"Invalid args"
unless
ref
$data
eq
'HASH'
;
# process args
$args
=
$self
->_build_args(
$args
, [
'name'
,
'keepNull'
,
'waitForSync'
]);
# make request
my
$res
=
$self
->arango->http->patch(
$self
->api_path(
'gharial'
,
$self
->graph->name,
$self
->_class,
$self
->collection->name,
delete
$args
->{name}),
lib/ArangoDB2/User.pm view on Meta::CPAN
727374757677787980818283848586878889909192
) or
return
;
# copy param data from res to self
$self
->_build_self(
$res
, \
@PARAMS
);
return
$self
;
}
# update
#
# PATCH /_api/user/{user}
sub
update
{
my
(
$self
,
$args
) =
@_
;
# process request args
$args
=
$self
->_build_args(
$args
, \
@PARAMS
);
# make request
my
$res
=
$self
->arango->http->patch(
$self
->api_path(
'user'
,
delete
$args
->{name}),
undef
,
$JSON
->encode(
$args
),
) or
return
;
( run in 0.488 second using v1.01-cache-2.11-cpan-49f99fa48dc )