SqliteManager

abstract class SqliteManager : AutoCloseable

Utility base class for things that have to interface with sqlite.

Constructors

Link copied to clipboard
fun SqliteManager()

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun enableWAL()

Util function for enabling WAL mode. Make sure to create the database first by executing some SQL statement before this.

Link copied to clipboard
fun query(block: Connection.() -> Unit)

Get a hold of a Connection to execute queries. If you're going to do any write operations then you should use tx instead.

Link copied to clipboard
fun tx(block: Connection.() -> Unit)

Get a Connection within a transaction. This will just commit for you and rollback in a catch block.

Link copied to clipboard
fun vacuum()

Properties

Link copied to clipboard
abstract val databaseUrl: String

JDBC string to pass into DriverManager.getConnection.

Inheritors

Link copied to clipboard
Link copied to clipboard