Breaking boundaries between language and database runtimes
Virtual machine
A virtual machine with BOLDR already installed and ready to use is available here.Installing BOLDR
Base of the framework
To install the framework, use the BOLDR initialization script. Use ./boldr.sh --help for the list of commands and options.
For example, to install the framework with QSL and R, use ./boldr.sh or ./boldr.sh install_all.
Installation for Eclipse
Once the base installation is complete, the command ./boldr.sh eclipse allows the use of BOLDR on Eclipse. You can then import the projects generated by the script boldr.sh with File -> Import -> Existing Projects from Workspace.
Installation of languages in databases
PL/Java for PostgreSQL
- Install PL/Java
- Use the Archive generation script for Truffle
languages to create a jar file for your language
- For example, ./tljar.sh SL creates a file sl.jar
- Install your language in the PostgreSQL database:
- select sqlj.install_jar('file:/path/to/qsl.jar', 'qsl', true)
- select sqlj.set_classpath('myschema', 'qsl')
Use the framework
Queries
You can send queries to databases supported by QIR.
To allow access to databases, modify:
- the fields host; port; user; and passwd in the files postgre.config and postgre2.config for PostgreSQL
- the fields host; port; user; and passwd in the file oracle.config for Oracle
- the fields value in the file hbase-site.xml for HBase
The tests accessing databases assume some specific data is present. The scripts postgresinit.sql and otherinit.sql must be used to initialize the PostgreSQL databases named postgres and other respectively. The script hiveinit.sql must be used to initialize the Hive database. The script hbaseinit.sh must be used to initialize a HBase database. Note: Do not forget to replace julien in these scripts by the same database username as the one in the configuration files.
QSL
On terminal
Launch the command mx sl.
On Eclipse
To run a test in a file, launch the SLMain class in the com.oracle.truffle.sl package with the name of the test file as argument. To launch the test suite, launch the SLSimpleTestSuite class in the com.oracle.truffle.sl.test package.
R
On terminal
Launch the command mx R.
On Eclipse
To run a test in a file, launch the RscriptCommand class in the com.oracle.truffle.r.engine package with the name of the test file as argument. To launch the test suite, launch the RTestSuite class in the com.oracle.truffle.r.test package.