https://kotlinlang.org logo
#exposed
Title
# exposed
j

Jeanne De ArcRuler

02/03/2022, 2:04 AM
regarding this in the exposed sqlite
Copy code
Database.connect("jdbc:sqlite:/data/data.db", "org.sqlite.JDBC")
does the exposed automatically created the file for you?
p

Phil Richardson

02/03/2022, 4:55 PM
Exposed is not aware of the underlying implementation of the JDBC driver and/or backing RDBMS. As such, Exposed is no more responsible for the creation of the path, than Exposed would be responsible for running a "create database.." or creation of a user account in MySQL. In this case, the options you provide in the JDBC URI can govern how the JDBC driver reacts. Here it is
org.sqlite.JDBC
and the documentation for its options should be consulted there. The general rule under most SQLite implementations, is if the DB file does not exist, it will be created.
125 Views