Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
701 stars 145 forks source link

add functions to extract clause from boolean expressions #162

Open ghost opened 8 years ago

ghost commented 8 years ago

Right now you can't filter some foreign data using the boolean column. I have added several function to src/query.c to extract data from expressions of this type. I have tested them with all boolean comparison constructions (e.g. is not false, is true, is not unknown), operators (e.g. =, <>) and possible literal values (e.g. 't', 'yes', 'off', 0, 1) and they works well for me.

kmorning commented 4 years ago

After searching a little while, without finding a solution, as to why I was getting 'WARNING: unsupported expression for extractClauseFrom' when trying to filter against a boolean column, I came across this pull request. I applied this patch to 1.4.0 and I can now apply qualifier logic for my boolean column in my python logic.
I'm wondering if there's any reason this hasn't been pulled into the main branch, as it seems to work beautifully, and I'm sure others must have run into this issue, as it took me all of one day using multicorn to hit this wall.