Fix recurring transactions query
This commit is contained in:
parent
82939020f7
commit
8969a7f2d2
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class JdbcRecurringTransactionRepository(dataSource: DataSource) :
|
|||
override val conflictFields: Collection<String> = listOf(ID)
|
||||
|
||||
override suspend fun findAll(now: Instant): List<RecurringTransaction> = dataSource.connection.use { conn ->
|
||||
conn.executeQuery("SELECT * FROM $tableName WHERE ${Fields.START.name.lowercase()} < ? AND ${Fields.FINISH.name.lowercase()} > ?", listOf(now, now))
|
||||
conn.executeQuery("SELECT * FROM $tableName WHERE ${Fields.START.name.lowercase()} < ? AND (${Fields.FINISH.name.lowercase()} IS NULL OR ${Fields.FINISH.name.lowercase()} > ?)", listOf(now, now))
|
||||
}
|
||||
|
||||
override suspend fun findAll(budgetId: String): List<RecurringTransaction> = dataSource.connection.use { conn ->
|
||||
|
|
Loading…
Reference in a new issue