Add find functions (tests pending)
This commit is contained in:
@@ -70,7 +70,7 @@ object Count {
|
||||
* @return A count of the matching documents in the table
|
||||
* @throws DocumentException If called on a SQLite connection
|
||||
*/
|
||||
inline fun <reified T> byContains(tableName: String, criteria: T, conn: Connection) =
|
||||
inline fun <reified TContains> byContains(tableName: String, criteria: TContains, conn: Connection) =
|
||||
conn.customScalar(Count.byContains(tableName), listOf(Parameters.json(":criteria", criteria)), Results::toCount)
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ object Count {
|
||||
* @return A count of the matching documents in the table
|
||||
* @throws DocumentException If called on a SQLite connection
|
||||
*/
|
||||
inline fun <reified T> byContains(tableName: String, criteria: T) =
|
||||
inline fun <reified TContains> byContains(tableName: String, criteria: TContains) =
|
||||
Configuration.dbConn().use { byContains(tableName, criteria, it) }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user