renaming a database
Wednesday, 9 March 2011 · 6 messages
GB
Godmar Back9 Mar 2011 03:52 #
Last year [1], the functionality to rename a database was requested. We need this functionality as well.
The option to rename the folder would require shutting down, and restarting, the BaseX server, which is not a good idea.
The other alternative would be to retrieve the entire XML content of the source db, then create the target db with that content; this is wasteful and inefficient for large db.
Please add a db rename functionality to the Java client binding.
- Godmar
[1] https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-May/000298.html
LK
Lukas Kircher9 Mar 2011 08:23 #
Hi Godmar,
in direct reference to your reference, you may use
the already available command
*'alter database [db] [newname]'*
for this [1].
Hope this helps,
Lukas
[1] http://docs.basex.org/wiki/Commands
Quoted text · Godmar Back · 22 lines
On Wed, Mar 9, 2011 at 2:52 AM, Godmar Back <godmar at gmail.com> wrote: > Last year [1], the functionality to rename a database was requested. > We need this functionality as well. > > The option to rename the folder would require shutting down, and > restarting, the BaseX server, which is not a good idea. > The other alternative would be to retrieve the entire XML content of > the source db, then create the target db with that content; this is > wasteful and inefficient for large db. > > Please add a db rename functionality to the Java client binding. > > - Godmar > > > [1] > https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-May/000298.html > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
AW
All commands can be send with the execute method.
Just:
execute("alter db old new");
-- Andreas
Quoted text · Godmar Back · 58 lines
Am 09.03.2011 um 14:06 schrieb Godmar Back: > On Wed, Mar 9, 2011 at 2:23 AM, Lukas Kircher > <lukaskircher1 at googlemail.com> wrote: >> Hi Godmar, >> in direct reference to your reference, you may use >> the already available command >> 'alter database [db] [newname]' >> for this [1]. > > Thanks. > > I couldn't find this in the client [2]; so could you remind me again > how to send this? > Is it 'execute', 'query', or do I need to look up the internal code > for 'alter' and write my own method? > > With the reorganized website, the documentation for the client/server > protocol is more difficult to find. > > Thanks. > > - Godmar > > [2] https://github.com/BaseXdb/basex-api/blob/master/etc/java/BaseXClient.java > >> Hope this helps, >> Lukas >> [1] http://docs.basex.org/wiki/Commands >> >> >> On Wed, Mar 9, 2011 at 2:52 AM, Godmar Back <godmar at gmail.com> wrote: >>> >>> Last year [1], the functionality to rename a database was requested. >>> We need this functionality as well. >>> >>> The option to rename the folder would require shutting down, and >>> restarting, the BaseX server, which is not a good idea. >>> The other alternative would be to retrieve the entire XML content of >>> the source db, then create the target db with that content; this is >>> wasteful and inefficient for large db. >>> >>> Please add a db rename functionality to the Java client binding. >>> >>> - Godmar >>> >>> >>> [1] >>> https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-May/000298.html >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
LW
Leonard Wörteler9 Mar 2011 14:17 #
Hi,
More information about the interface and protocol can be found at [1], that one should definitely go into the Wiki as well...
Quoted text · Andreas Weiler · 2 lines
> // Executes a command and returns the result > String execute(String command)
Cheers Leo
__________
[1] https://github.com/BaseXdb/basex-api/blob/master/etc/readme.txt
Quoted text · Andreas Weiler · 71 lines
Am 09.03.2011 14:13, schrieb Andreas Weiler: > All commands can be send with the execute method. > Just: > execute("alter db old new"); > > -- Andreas > > Am 09.03.2011 um 14:06 schrieb Godmar Back: > >> On Wed, Mar 9, 2011 at 2:23 AM, Lukas Kircher >> <lukaskircher1 at googlemail.com> wrote: >>> Hi Godmar, >>> in direct reference to your reference, you may use >>> the already available command >>> 'alter database [db] [newname]' >>> for this [1]. >> >> Thanks. >> >> I couldn't find this in the client [2]; so could you remind me again >> how to send this? >> Is it 'execute', 'query', or do I need to look up the internal code >> for 'alter' and write my own method? >> >> With the reorganized website, the documentation for the client/server >> protocol is more difficult to find. >> >> Thanks. >> >> - Godmar >> >> [2] https://github.com/BaseXdb/basex-api/blob/master/etc/java/BaseXClient.java >> >>> Hope this helps, >>> Lukas >>> [1] http://docs.basex.org/wiki/Commands >>> >>> >>> On Wed, Mar 9, 2011 at 2:52 AM, Godmar Back <godmar at gmail.com> wrote: >>>> >>>> Last year [1], the functionality to rename a database was requested. >>>> We need this functionality as well. >>>> >>>> The option to rename the folder would require shutting down, and >>>> restarting, the BaseX server, which is not a good idea. >>>> The other alternative would be to retrieve the entire XML content of >>>> the source db, then create the target db with that content; this is >>>> wasteful and inefficient for large db. >>>> >>>> Please add a db rename functionality to the Java client binding. >>>> >>>> - Godmar >>>> >>>> >>>> [1] >>>> https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-May/000298.html >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >>> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
GB
Quoted text · Lukas Kircher · 7 lines
On Wed, Mar 9, 2011 at 2:23 AM, Lukas Kircher <lukaskircher1 at googlemail.com> wrote: > Hi Godmar, > in direct reference to your reference, you may use > the already available command > 'alter database [db] [newname]' > for this [1].
Thanks.
I couldn't find this in the client [2]; so could you remind me again how to send this?
Is it 'execute', 'query', or do I need to look up the internal code for 'alter' and write my own method?
With the reorganized website, the documentation for the client/server protocol is more difficult to find.
Thanks.
- Godmar
[2] https://github.com/BaseXdb/basex-api/blob/master/etc/java/BaseXClient.java
Quoted text · Lukas Kircher · 29 lines
> Hope this helps, > Lukas > [1] http://docs.basex.org/wiki/Commands > > > On Wed, Mar 9, 2011 at 2:52 AM, Godmar Back <godmar at gmail.com> wrote: >> >> Last year [1], the functionality to rename a database was requested. >> We need this functionality as well. >> >> The option to rename the folder would require shutting down, and >> restarting, the BaseX server, which is not a good idea. >> The other alternative would be to retrieve the entire XML content of >> the source db, then create the target db with that content; this is >> wasteful and inefficient for large db. >> >> Please add a db rename functionality to the Java client binding. >> >> - Godmar >> >> >> [1] >> https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-May/000298.html >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
GB
Thanks.
Another question: BaseXClient is now, it seems, in basex-api (though misfiled under /etc/java without a package name...)
Does this mean it's finally officially part of BaseX? It's somewhat inconvenient having to track this file and merge changes into our local copy whenever there's a change in the client/server protocol.
- Godmar
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery