Add exists tests
This commit is contained in:
@@ -254,7 +254,7 @@ object Query {
|
||||
* @param docId The ID of the document (optional, used for type checking)
|
||||
* @return A query to determine document existence by ID
|
||||
*/
|
||||
fun <TKey> byId(tableName: String, docId: TKey?) =
|
||||
fun <TKey> byId(tableName: String, docId: TKey? = null) =
|
||||
exists(tableName, Where.byId(docId = docId))
|
||||
|
||||
/**
|
||||
@@ -265,7 +265,7 @@ object Query {
|
||||
* @param howMatched How fields should be compared (optional, defaults to ALL)
|
||||
* @return A query to determine document existence for the given fields
|
||||
*/
|
||||
fun byFields(tableName: String, fields: Collection<Field<*>>, howMatched: FieldMatch?) =
|
||||
fun byFields(tableName: String, fields: Collection<Field<*>>, howMatched: FieldMatch? = null) =
|
||||
exists(tableName, Where.byFields(fields, howMatched))
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user