 public func ~~ <Model, Value>(lhs: KeyPath<Model, Value>, rhs: String) throws -> ModelFilter<Model>
     where Value: KeyStringDecodable, Model.Database.QueryFilter: DataPredicateComparisonConvertible
 {
-    return try _contains(lhs, .like, "%\(rhs)%")
+    return try _contains(lhs, .like, .data("%\(rhs)%"))
 }
 
 /// Subset: IN.
 public func ~~ <Model, Value>(lhs: KeyPath<Model, Value>, rhs: [Value]) throws -> ModelFilter<Model>
     where Value: KeyStringDecodable, Model.Database.QueryFilter: DataPredicateComparisonConvertible
 {
-    return try _contains(lhs, .in, rhs)
+    return try _contains(lhs, .in, .array(rhs))
 }
 
 infix operator !~

public func !~ <Model, Value>(lhs: KeyPath<Model, Value>, rhs: [Value]) throws -> ModelFilter<Model>
    where Value: KeyStringDecodable, Model.Database.QueryFilter: DataPredicateComparisonConvertible
{
    return try _contains(lhs, .in, rhs)
}

/// Operator helper func.
private func _contains<M, V, T>(_ key: KeyPath<M, V>, _ comp: DataPredicateComparison, _ value: T) throws -> ModelFilter<M>
    where V: KeyStringDecodable, M.Database.QueryFilter: DataPredicateComparisonConvertible
{
    let filter = try QueryFilter<M.Database>(

public func ~= <Model, Value>(lhs: KeyPath<Model, Value>, rhs: String) throws -> ModelFilter<Model>
    where Value: KeyStringDecodable, Model.Database.QueryFilter: DataPredicateComparisonConvertible
{
    return try _contains(lhs, .like, .data("%\(rhs)"))
}

infix operator =~
