https://github.com/edvin/tooldb
Cutting Tool Database - JDBC demo for TornadoFX
https://github.com/edvin/tooldb
Last synced: 2 months ago
JSON representation
Cutting Tool Database - JDBC demo for TornadoFX
- Host: GitHub
- URL: https://github.com/edvin/tooldb
- Owner: edvin
- Created: 2018-02-09T23:33:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T06:21:29.000Z (almost 3 years ago)
- Last Synced: 2025-04-04T22:43:40.582Z (2 months ago)
- Language: Kotlin
- Size: 28.3 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cutting Tool Database
This is a demo application showing one way to use JDBC from a TornadoFX Application.
Important: This is not supposed to show the recommended way to interact with a database from
any Kotlin application. Using plain JDBC today is probably not the best idea, but it should give
you an overview of the steps involved and how to hook into the lifecycle to initialize
a datasource and shut it down correctly before app exit.We are using HikariCP and MySQL in this example but the concepts should be the same
for any DataSource or RDBMS, in fact even for most abstractions on top of JDBC.Everything interesting is in the [DB.kt](https://github.com/edvin/tooldb/blob/master/src/main/kotlin/com/cyclestart/tooldb/controllers/DB.kt) file.
Also note that this demo project is not advocating best practices about how to use and organize SQL in any way.