https://github.com/retrography/OrientR
A wrapper for OrientDB REST API interface in R
https://github.com/retrography/OrientR
Last synced: 8 months ago
JSON representation
A wrapper for OrientDB REST API interface in R
- Host: GitHub
- URL: https://github.com/retrography/OrientR
- Owner: retrography
- License: apache-2.0
- Created: 2015-07-18T08:10:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T09:37:43.000Z (over 6 years ago)
- Last Synced: 2024-08-05T20:30:02.064Z (11 months ago)
- Language: R
- Size: 28.3 KB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OrientR
OrientR is a REST API wrapper for OrientDB. It allows you to run queries on OrientDB over its REST interface.
## Contents
* [Install](#install)
* [Use](#use)
* [Known Issues](#issues)```{r}
install.packages("devtools")
devtools::install_github("retrography/OrientR")
```### Load the library
```{r}
library(OrientR)
```### Generate connection string
```{r}
db <- getDB(database = "OpenBeer", host = "localhost", username = "root", password = "orientdb", port = "2480")
```### Run a query
```{r}
query <- "SELECT FROM Beer"
resultSet <- runQuery(db, 'SELECT @rid AS id, name AS beer, out_HasBrewery.in.name AS brewery FROM Beer UNWIND brewery', batch = 100)
```
Note: It has come to my attention that OrientR fails to parse the data types for queries using the * selector (or equivalent). This is a known error now, but unfortunately I don't have the time to debug it. Feel free to make a pull request.* Only Query function has been implemented in this preliminary version (see [OrientDB's REST API manual for a list of possible extensions](http://orientdb.com/docs/1.7.8/orientdb.wiki/OrientDB-REST.html)).