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

search: generic error for search with multiple arguments #265

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

patricebender
Copy link
Member

for #127

* @returns {string}
*/
search: function (ref, arg) {
if (!('val' in arg)) throw `SQLite only supports single value arguments for $search`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't you make the error here more generic? It shares the implementation for all databases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought of supporting search with multiple args for postgres as shown in #132 so separating the functions seemed like a good first step

Copy link
Member Author

Choose a reason for hiding this comment

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

... applied your suggestion :)

@patricebender patricebender changed the title search: dedicated error for postgres search: generic error for search with multiple arguments Oct 9, 2023
@patricebender patricebender merged commit 59bd9ee into main Oct 9, 2023
@patricebender patricebender deleted the search-fix branch October 9, 2023 14:50
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.

2 participants