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

Allow escape characters in like/ilike queries (and use them in derived ones) #48

Open
flying-sheep opened this issue Oct 19, 2020 · 0 comments

Comments

@flying-sheep
Copy link
Contributor

The like and ilike queries have an active character, %. It would be nice to be able to match that one literally if necessary.

Also queries like iendswith are implemented based on ilike. They should be implemented something like this:

def iendswith(col, value):
    escaped = value.replace('\\', r'\\').replace('%', r'\%')
	return col.ilike(f'%{escaped}', escape='\\')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant