New version for RBaseX
Friday, 13 March 2020 · 1 message
BE
Ben Engbers13 Mar 2020 12:03 #
Hi,
I am glad that version 0.2.4 from my R-package 'RBaseX' has been accepted by CRAN (https://cran.r-project.org/package=RBaseX)!
Large parts of the earlier version from the R-package 'RBaseX' have been rewritten and the resulting code is much cleaner. I have added tests and thanks to those test, I found (and fixed) several bugs. To my knowledge, the full server-protocol has now been implemented.
One of the main differences concerns error-handling.
All client-requests to the basexserver end with either a \00 byte or a \01. I have used this feature to add an extra layer of error-handling. The default is still the regular tryCatch method. But after setting 'intercept' to TRUE, you can now define your reaction upon errors.
See the following example:
Session <- BasexClient$new("localhost", 1984L, username = "admin", password = "admin")
Session$set_intercept(TRUE)
Session$Execute("drop DB TestDB")
Session$Execute("Open TestDB")
if (!Session$get_success()) {
Session$Create("TestDB")
Session$Add("Test.xml", "<Line_1 line='1'>Content 1</Line_1>")
}
Session$Execute("Close")
Session$restore_intercept()I am already working on a new version in which I will implement more specific R-related topics (populating dataframes with XQuery-results.
Ben
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery