An OrientDB library for Clojure using the latest official Java API exclusively using the SQL API, extending whoneedszzz/orientdb-client
There are a few libraries that already add support for connecting to OrientDB in Clojure. So you may be wondering why create another library. The main goal of this library is to remain as simple as possible (Simple, Made Easy). In that light, this library only implements functionality for communicating via the Java API using the SQL API exclusively. Other APIs will be in separate projects (namespaces) if implemented in the future.
There is no extra functionality, such as creating an interface to the Java API object methods via vanilla Clojure forms; the library passes OrientDB SQL statements with parameters to the API. If a consumer of the library desires this functionality they are welcome to implement that on their end before passing to the client.
A secondary goal is to always use the latest Java API to maintain support of current OrientDB databases. A consumer of such a library should not need to seek a new library, fork the library, nor wait unreasonably long for the library's maintainers to update the driver simply to continue using the library with a current database and latest API. Changes to the API libraries will be monitored, but as we are not infallible, should a maintainer miss an update, please don't hesitate to politely create an issue that notifies of the update, and it will be quickly updated.
Deps
whoneedszzz/orientdb-client-sql {:mvn/version "202011271332"}
Leiningen
[whoneedszzz/orientdb-client-sql "202011271332"]
(ns oclientsql.test
(:require [whoneedszzz.orientdb-client.core :as oclient]
[whoneedszzz.orientdb-client-sql.client :as sql]))
(def conn (oclient/connect {:url "url"
:root-user "root"
:root-password "password"
:config {}
:db-name "test"
:db-user "admin"
:db-password "admin"
:pool? true}))
(def query (sql/query {:session (:session conn)
:query "select from Person where firstName = :firstName and lastName = :lastName"
:params {:firstName "John" :lastName "Snow"}
:sort? true}))
:sort?
to false
(def command (sql/command {:session (:session conn)
:command "create vertex Person set firstName = :firstName, lastName = :lastName"
:params {"firstName" "John" "lastName" "Snow"}
:sort? true}))
:sort?
to false
See documentation at whoneedszzz/orientdb-client
See documentation at whoneedszzz/orientdb-client
See documentation at whoneedszzz/orientdb-client
See documentation at whoneedszzz/orientdb-client
See documentation at whoneedszzz/orientdb-client
See documentation at whoneedszzz/orientdb-client
Testing consists of using test data with a real OrientDB database in the REPL during development. Previous REPL executions were ran again to ensure regressions did not result after new functionality implementations. The possibility of subtle timing related issues arising caused automated tests to not be utilized. Desiring to discourage over-confidence in tests contributed as well. Be confident by verifying each function with your own test data! 😊
If you discover any issues or if you believe there are any features missing please create an Issue and please be reasonably detailed to best address your input. 😊
Can you improve this documentation?Edit on GitLab
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close