Get session config info
Wednesday, 19 April 2017 · 4 messages · last reply 20 Apr 2017
BV
Bram Vanroy19 Apr 2017 14:13 #
Hi List
In a .basex file we can set the destination of our database. If we then create a server, and create a database using a client, the BaseX-files will be created in that directory. Is it possible to get the path to this directory from within the client? In Perl I tried running the following command after looking through the basex client, but I got an 'undef':
my $session = Session->new($host, $port, $user, $pw);
my $t = $session->info;
$session->close; print $t;
Any ideas how to get the configuration values for a basex server from a (Perl) client?
Thank you
Bram
CG
Christian Grün20 Apr 2017 13:41 #
Hi Bram,
Users with admin permissions can request the database path via "
db:system()//dbpath".
Hope this helps,
ChristianQuoted text · Bram Vanroy · 40 lines
On Wed, Apr 19, 2017 at 2:13 PM, Bram Vanroy <bram.vanroy1 at student.kuleuven.be> wrote: > Hi List > > > > In a .basex file we can set the destination of our database. If we then > create a server, and create a database using a client, the BaseX-files will > be created in that directory. Is it possible to get the path to this > directory from within the client? In Perl I tried running the following > command after looking through the basex client, but I got an ‘undef’: > > > > my $session = Session->new($host, $port, $user, $pw); > > my $t = $session->info; > > $session->close; > > > > print $t; > > > > Any ideas how to get the configuration values for a basex server from a > (Perl) client? > > > > Thank you > > > > > > Bram > >
BV
Bram Vanroy20 Apr 2017 15:18 #
Hi Christian
Do you mean a basex admin, a sys admin, or something else?
Thanks
Quoted text · Christian Grün · 1 line
Op 20 apr. 2017 13:41 schreef Christian Grün <christian.gruen at gmail.com>:
Hi Bram,
Users with admin permissions can request the database path via "
db:system()//dbpath".
Hope this helps,
ChristianQuoted text · Bram Vanroy · 40 lines
On Wed, Apr 19, 2017 at 2:13 PM, Bram Vanroy <bram.vanroy1 at student.kuleuven.be> wrote: > Hi List > > > > In a .basex file we can set the destination of our database. If we then > create a server, and create a database using a client, the BaseX-files will > be created in that directory. Is it possible to get the path to this > directory from within the client? In Perl I tried running the following > command after looking through the basex client, but I got an ‘undef’: > > > > my $session = Session->new($host, $port, $user, $pw); > > my $t = $session->info; > > $session->close; > > > > print $t; > > > > Any ideas how to get the configuration values for a basex server from a > (Perl) client? > > > > Thank you > > > > > > Bram > >
CG
Christian Grün20 Apr 2017 16:02 #
Hi Bram,
I am talking about BaseX users. By default, you are an admin user (see [1] and related pages for more information).
Cheers,
Christian
[1] http://docs.basex.org/wiki/User_Management
Quoted text · Bram Vanroy · 62 lines
On Thu, Apr 20, 2017 at 3:18 PM, Bram Vanroy <bram.vanroy1 at student.kuleuven.be> wrote: > Hi Christian > > Do you mean a basex admin, a sys admin, or something else? > > Thanks > > Op 20 apr. 2017 13:41 schreef Christian Grün <christian.gruen at gmail.com>: > > Hi Bram, > > Users with admin permissions can request the database path via > "db:system()//dbpath". > > Hope this helps, > Christian > > > On Wed, Apr 19, 2017 at 2:13 PM, Bram Vanroy > <bram.vanroy1 at student.kuleuven.be> wrote: >> Hi List >> >> >> >> In a .basex file we can set the destination of our database. If we then >> create a server, and create a database using a client, the BaseX-files >> will >> be created in that directory. Is it possible to get the path to this >> directory from within the client? In Perl I tried running the following >> command after looking through the basex client, but I got an ‘undef’: >> >> >> >> my $session = Session->new($host, $port, $user, $pw); >> >> my $t = $session->info; >> >> $session->close; >> >> >> >> print $t; >> >> >> >> Any ideas how to get the configuration values for a basex server from a >> (Perl) client? >> >> >> >> Thank you >> >> >> >> >> >> Bram >> >> > >
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery