Home

Awesome

SQLite4S

SQLite4S is a port of the Java library Sqlite4java for the Scala Native platform.

The goal of this project is to provide a thin wrapper around the SQLite C library with an API similar to the Sqlite4java one. Since JNI is not needed anymore thanks to Scala Native, SQLite4S should have a lower overhead compared to the Sqlite4java wrapper. However performance comparison has not been done yet.

Supported Sqlite4java features

Please note that the Job queue feature is not yet implemented in SQLite4S due to some limitations of Threads support in the current implementation of the Scala Native platform. Regarding the Long array feature I decided it was low priority for a first implementation, but if it is an issue for your own project do not hesitate to open an issue.

Getting started

Maven Central

If you are already familiar with Scala Native you can jump right in by adding the following dependency in your sbt build file.

libraryDependencies += "com.github.david-bouyssie" %%% "sqlite4s" % "x.y.z"

To use in sbt, replace x.y.z with the version from Maven Central badge above. All available versions can be seen at the Maven Repository.

Otherwise follow the Getting Started instructions for Scala Native if you are not already setup.

Additionally, you need to install SQLite on you system as follows:

$ sudo apt-get install libsqlite3-dev
$ brew install sqlite3
nativeLinkingOptions ++= Seq("-L" ++ baseDirectory.value.getAbsolutePath() ++ "/native-lib")

Useful links: