Hi Christian,
Best wishes and thanks for your answer.
Ben
Op 03-01-2020 om 16:27 schreef Christian GrĂ¼n:
Hi Ben,
I read in the documentation that a client should not only be able to execute commands but should also be able to execute command scripts.
Could you give me a link to the part of the documentation you refer to?
I could not find it anymore, I guess that somewhere I mixed up information the API client bindings and the commandline interface.
My question is if a command script (a file with extension '.bxs') is passed as a 'path' to the execute-command or is the client supposed to read the file, line by line, and then executing each line separately?
If you refer to the execute function in the API client bindings [1], the argument must be a BaseX command string.
That is the way I have implemented it already.
I used my client to load a csv-file into a db-file. In order to get the same result as with the GUI, I had to set some options. And at that moment, I thought that it might be handy to save all the commands in a script so that at a later moment, the script could be reused again.
A condition for the usability of this option is that there is a possibility to pass arguments to the script. Is that already possible in BaseX?