Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to access database from typed JVM languages such as Java and Kotlin #186

Closed
FeldrinH opened this issue Feb 8, 2023 · 2 comments
Closed
Labels
documentation Improvements or additions to documentation

Comments

@FeldrinH
Copy link

FeldrinH commented Feb 8, 2023

Is there any way to communicate with a Datalevin DB from typed JVM languages such as Java, Scala or Kotlin?
I have a project that would greatly benefit from Datalevin, but the project is written in Kotlin.
Given that Clojure is also a JVM language, is there an API for Datalevin that could be called from Kotlin?

I presume #182 could provide an alternative approach for applications written outside of Clojure, but as far as I can tell it is not implemented yet.

@huahaiy
Copy link
Contributor

huahaiy commented Feb 8, 2023

You can use this library from any other JVM language just like any other Clojure library, using the official Clojure Java API:

http://clojure.github.io/clojure/javadoc/clojure/java/api/package-summary.html

This Java API for Clojure provides a way to require Clojure namespaces, call Clojure functions, and read Clojure data structures. On top this, you are free to wrap Datalevin in kotlin or other JVM languages to provide an idiomatic wrapper in the language. This would be out of the scope of this project, but I would welcome such addition and will be happy to link to these.

The JSON API pathway is intended for non-JVM languages.

@huahaiy huahaiy added the documentation Improvements or additions to documentation label Feb 8, 2023
@huahaiy
Copy link
Contributor

huahaiy commented Feb 8, 2023

Mentioned in install.md 2304343

@huahaiy huahaiy closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants