Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements Regex on arrays #215

Closed
zigzago opened this issue Jul 15, 2020 · 2 comments
Closed

Implements Regex on arrays #215

zigzago opened this issue Jul 15, 2020 · 2 comments

Comments

@zigzago
Copy link
Member

zigzago commented Jul 15, 2020

infix fun KProperty<Iterable<String?>>.regex(regex: Regex): Bson = Filters.regex(path(), regex.toPattern())

@yuvalsapir
Copy link

Great!
I'm only using the Regex version but for completion why not add all existing versions?

infix fun KProperty<Iterable<String?>>.regex(regex: String): Bson = Filters.regex(path(), regex)
infix fun KProperty<Iterable<String?>>.regex(regex: Pattern): Bson = Filters.regex(path(), regex)
fun KProperty<Iterable<String?>>.regex(pattern: String, options: String): Bson = Filters.regex(path(), pattern, options)
infix fun KProperty<Iterable<String?>>.regex(regex: Regex): Bson = Filters.regex(path(), regex.toPattern())

@zigzago
Copy link
Member Author

zigzago commented Jul 15, 2020

fixed by 9da132c

@zigzago zigzago closed this as completed Jul 15, 2020
zigzago added a commit that referenced this issue Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants