Add find functions (tests pending)
This commit is contained in:
@@ -76,7 +76,7 @@ object Exists {
|
||||
* @return True if any matching documents exist, false if not
|
||||
* @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(
|
||||
Exists.byContains(tableName),
|
||||
listOf(Parameters.json(":criteria", criteria)),
|
||||
@@ -91,7 +91,7 @@ object Exists {
|
||||
* @return True if any matching documents exist, false if not
|
||||
* @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