Skip to content

Return with false, if there are no results#4

Open
anttilinno wants to merge 2 commits intohnsl:masterfrom
anttilinno:master
Open

Return with false, if there are no results#4
anttilinno wants to merge 2 commits intohnsl:masterfrom
anttilinno:master

Conversation

@anttilinno
Copy link

No description provided.

on_e := on_e || ' and ';
on_e := on_e || '(' || ali || '.' || quote_ident(col) || ' = _key.' || quote_ident(col) || ' OR (' || ali || '.' || quote_ident(col) || ' IS NULL AND _key.' || quote_ident(col) || ' IS NULL)) ';
else
on_e := on_e || ali || '.' || quote_ident(col) || ' = _key.' || quote_ident(col) || ' ';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the first column not get the null comparison check? It's probably obvious but it was so long that I wrote this code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beats me. I would have to test the function with and without checking for null. I'm also in the "fire and forget" mode 😆 But as I use it in the production, I guess it works regardless of maybe useless bloat.
I will check it out, if I have time for it.

@kobruleht
Copy link

kobruleht commented Feb 25, 2026

Method should return table result table instead of boolean result in this is possible.

Patch to return empty table insted of error: #14

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

Successfully merging this pull request may close these issues.

4 participants