Rethinkdb::Response - RethinkDB Response
package MyApp; use Rethinkdb; my $res = r->table('marvel')->run; say $res->type; say $res->type_description; say $res->response; say $res->token; say $res->error_type; say $res->profile; say $res->backtrace;
All responses from the driver come as an instance of this class.
Rethinkdb::Response implements the following attributes.
my $res = r->table('marvel')->run; say $res->type;
The response type code. The current response types are:
'success_atom' => 1 'success_sequence' => 2 'success_partial' => 3 'success_feed' => 5 'wait_complete' => 4 'client_error' => 16 'compile_error' => 17 'runtime_error' => 18
my $res = r->table('marvel')->run; say $res->type_description;
The response type description (e.g. success_atom, runtime_error).
success_atom
runtime_error
use Data::Dumper; my $res = r->table('marvel')->run; say Dumper $res->response;
The actual response value from the database.
my $res = r->table('marvel')->run; say Dumper $res->token;
Each request made to the database must have a unique token. The response from the database includes that token incase further actions are required.
my $res = r->table('marvel')->run; say $res->error_type;
If the request cause an error, this attribute will contain the error message from the database.
my $res = r->table('marvel')->run; say $res->backtrace;
If the request cause an error, this attribute will contain a backtrace for the error.
my $res = r->table('marvel')->run; say $res->profile;
If profiling information was requested as a global argument for a query, then this attribute will contain that profiling data.
Rethinkdb, http://rethinkdb.com
To install Rethinkdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rethinkdb
CPAN shell
perl -MCPAN -e shell install Rethinkdb
For more information on module installation, please visit the detailed CPAN module installation guide.