(connection: aiosqlite.Connection)
| 30 | |
| 31 | |
| 32 | async def install_regexp_functions(connection: aiosqlite.Connection): |
| 33 | def regexp(expr, item): |
| 34 | if not expr or not item: |
| 35 | return False |
| 36 | return re.search(expr, item) is not None |
| 37 | |
| 38 | def iregexp(expr, item): |
| 39 | return re.search(expr, item, re.IGNORECASE) is not None |
| 40 | |
| 41 | await connection.create_function("regexp", 2, regexp) |
| 42 | await connection.create_function("match", 2, iregexp) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…