Closed jdrab closed 8 years ago
I try to provide a similar API as the official drivers and, for whatever reason, it looks like you have to specify which database you want to list the tables on (http://rethinkdb.com/api/python/#table_list).
I believe there use to be a r->table_list
method but it got removed
from the official drivers and I removed it from this one.
On 5/17/2016 1:00 AM, Ján Dráb wrote:
Hi, I don't know if this is really a bug or I'm doing something wrong but I would like to use |table_list| method with |repl|. It looks like i have to specify database even though i did it in |connect| method.
this code does work.
!/usr/bin/perl
use warnings; use strict;
use Rethinkdb; use Data::Dumper;
r->connect('192.168.4.69', 28015)->repl;
my @tables = r->db('test')->table_list()->run(); print Dumper(\@tables);
but this doesn't work (Can't locate object method "table_list" via package "Rethinkdb")
!/usr/bin/perl
use warnings; use strict;
use Rethinkdb; use Data::Dumper;
i would like to list tables from database 'test'
r->connect('192.168.4.69', 28015,'test')->repl;
my @tables = r->table_list()->run(); print Dumper(\@tables);
what I tried is basically to copy-paste method |table_list| from |Rethinkdb::Query::Database| into |Rethinkdb.pm| and it worked.
I just wanted to know if this is desired behavior and i have to call |db| before doing table_list() or is it really a bug?
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/njlg/perl-rethinkdb/issues/26
Thank you @njlg I understand. It's not a bug. Please close this 'issue'.
Hi, I don't know if this is really a bug or I'm doing something wrong but I would like to use
table_list
method withrepl
. It looks like i have to specify database even though i did it inconnect
method.this code does work.
but this doesn't work (Can't locate object method "table_list" via package "Rethinkdb")
what I tried is basically to copy-paste method
table_list
fromRethinkdb::Query::Database
intoRethinkdb.pm
and it worked.I just wanted to know if this is desired behavior and i have to call
db
before doing table_list() or is it really a bug?