@@ -160,6 +160,36 @@ public class PostgrestFilterBuilder: PostgrestTransformBuilder {
160
160
like ( column, pattern: value)
161
161
}
162
162
163
+ /// Match only rows where `column` matches all of `patterns` case-sensitively.
164
+ /// - Parameters:
165
+ /// - column: The column to filter on
166
+ /// - patterns: The patterns to match with
167
+ public func likeAllOf(
168
+ _ column: String ,
169
+ patterns: [ some URLQueryRepresentable ]
170
+ ) -> PostgrestFilterBuilder {
171
+ let queryValue = patterns. queryValue
172
+ mutableState. withValue {
173
+ $0. request. query. append ( URLQueryItem ( name: column, value: " like(all). \( queryValue) " ) )
174
+ }
175
+ return self
176
+ }
177
+
178
+ /// Match only rows where `column` matches any of `patterns` case-sensitively.
179
+ /// - Parameters:
180
+ /// - column: The column to filter on
181
+ /// - patterns: The patterns to match with
182
+ public func likeAnyOf(
183
+ _ column: String ,
184
+ patterns: [ some URLQueryRepresentable ]
185
+ ) -> PostgrestFilterBuilder {
186
+ let queryValue = patterns. queryValue
187
+ mutableState. withValue {
188
+ $0. request. query. append ( URLQueryItem ( name: column, value: " like(any). \( queryValue) " ) )
189
+ }
190
+ return self
191
+ }
192
+
163
193
/// Match only rows where `column` matches `pattern` case-insensitively.
164
194
///
165
195
/// - Parameters:
@@ -184,6 +214,36 @@ public class PostgrestFilterBuilder: PostgrestTransformBuilder {
184
214
ilike ( column, pattern: value)
185
215
}
186
216
217
+ /// Match only rows where `column` matches all of `patterns` case-insensitively.
218
+ /// - Parameters:
219
+ /// - column: The column to filter on
220
+ /// - patterns: The patterns to match with
221
+ public func iLikeAllOf(
222
+ _ column: String ,
223
+ patterns: [ some URLQueryRepresentable ]
224
+ ) -> PostgrestFilterBuilder {
225
+ let queryValue = patterns. queryValue
226
+ mutableState. withValue {
227
+ $0. request. query. append ( URLQueryItem ( name: column, value: " ilike(all). \( queryValue) " ) )
228
+ }
229
+ return self
230
+ }
231
+
232
+ /// Match only rows where `column` matches any of `patterns` case-insensitively.
233
+ /// - Parameters:
234
+ /// - column: The column to filter on
235
+ /// - patterns: The patterns to match with
236
+ public func iLikeAnyOf(
237
+ _ column: String ,
238
+ patterns: [ some URLQueryRepresentable ]
239
+ ) -> PostgrestFilterBuilder {
240
+ let queryValue = patterns. queryValue
241
+ mutableState. withValue {
242
+ $0. request. query. append ( URLQueryItem ( name: column, value: " ilike(any). \( queryValue) " ) )
243
+ }
244
+ return self
245
+ }
246
+
187
247
/// Match only rows where `column` IS `value`.
188
248
///
189
249
/// For non-boolean columns, this is only relevant for checking if the value of `column` is NULL by setting `value` to `null`.
@@ -250,6 +310,24 @@ public class PostgrestFilterBuilder: PostgrestTransformBuilder {
250
310
return self
251
311
}
252
312
313
+ /// Match only rows where every element appearing in `column` is contained by `value`.
314
+ ///
315
+ /// Only relevant for jsonb, array, and range columns.
316
+ ///
317
+ /// - Parameters:
318
+ /// - column: The jsonb, array, or range column to filter on
319
+ /// - value: The jsonb, array, or range value to filter with
320
+ public func containedBy(
321
+ _ column: String ,
322
+ value: some URLQueryRepresentable
323
+ ) -> PostgrestFilterBuilder {
324
+ let queryValue = value. queryValue
325
+ mutableState. withValue {
326
+ $0. request. query. append ( URLQueryItem ( name: column, value: " cd. \( queryValue) " ) )
327
+ }
328
+ return self
329
+ }
330
+
253
331
/// Match only rows where every element in `column` is less than any element in `range`.
254
332
///
255
333
/// Only relevant for range columns.
0 commit comments