<@U81R2QEMU> I always use an http client and store...
# tornadofx
e
@g4sarma I always use an http client and store the data elsewhere, I find it much easier to deal with user access this way. But you can of course include a direct connection to a local postgresql server or something if your use case calls for it. There are some very nice libraries out there for working with JDBC in Kotlin.
g
I was asking for an offline storage db i mean within the app ?
e
You can always use JDBC with the DB of your choice; drivers are available for all the major DBs. I had a project that I built in TFX where I was storing in an embedded offline Sqlite database.
k
If you don't need the power of SQL and just need a simple local storage for tables, I've found the SuperCSV library to be quite useful. http://super-csv.github.io/super-csv/index.html
👍 1
And of course there's the new kotlinx-serialization library if you're looking for a more general way to persist data locally (or via a web api for that matter).
👍 1
e
Depending on what you're storing, you can even use the
config
or
preferences
built ins.
👍 1
g
yes preferences sounds more like it
Thanks @kastork @edvin for sharing the info
👍 1