Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Add a user defined regexp function when initialising sqlite connection#58

Open
andreaslang wants to merge 1 commit into
yhat:masterfrom
andreaslang:SQLiteRegexpSupport
Open

Add a user defined regexp function when initialising sqlite connection#58
andreaslang wants to merge 1 commit into
yhat:masterfrom
andreaslang:SQLiteRegexpSupport

Conversation

@andreaslang
Copy link
Copy Markdown

Hi, I realised that by default I could not use the REGEXP keyword/function of sqlite because it requires a user-defined function to work. This patch solves the problem and allows to do:

pysqldf("""
    SELECT count(*) 
    FROM tweets
        WHERE NOT date REGEXP '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
    LIMIT 10
""") 

It's a fairly simple patch, let me know what you think or if it requires any changes.

@javadba
Copy link
Copy Markdown

javadba commented May 7, 2019

Do you have a fork that includes this (and possibly other fixes)? This project is approaching abandonware status it seems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants