databaseModule

fun databaseModule(config: DatabaseConfig, initialize: Boolean = true): Module(source)

Creates a Koin module for database configuration and dependency injection.

This module provides:

  • KeelDatabase as a singleton

  • DatabaseFactory for creating database instances

Return

A Koin Module for database dependencies

Parameters

config

The database configuration

initialize

Whether to immediately initialize the database (default: true)


fun databaseModule(database: KeelDatabase): Module(source)

Creates a Koin module for an already initialized KeelDatabase. Use this when the database is initialized externally.

Return

A Koin Module for database dependencies

Parameters

database

The already initialized KeelDatabase instance