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

Add FAQ to clarify "Wrong number of statement arguments" error with "like '%?%'" #538

Merged
merged 9 commits into from
May 29, 2019

Conversation

Timac
Copy link
Contributor

@Timac Timac commented May 27, 2019

Add an FAQ about the SQLite error 21 "wrong number of statement arguments" with LIKE queries. The documentation contains an example of a LIKE query exhibiting the issue as well as explanation about the problem and a workaround.

See related issue:
#530

Alexandre Colucci added 2 commits May 14, 2019 08:59
Add "? as a parameter" in the "Good to Know" section to explain how to build like pattern like '%?%'.
- Rewrite the paragraph as an FAQ
- Explicitly mention the error "Wrong number of statement arguments" and give an example causing such issue.
- Improve the wording and add a link to the SQLite documentation
Copy link
Owner

@groue groue left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @Timac, this is much better 👍

Please change the target branch of the pull request to development, and address the few concerns below. We'll shortly merge your FAQ :-)

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Timac Timac changed the base branch from master to development May 28, 2019 20:54
@Timac
Copy link
Contributor Author

Timac commented May 28, 2019

Hey @groue ,

I did the changes as requested. I also change the FAQ to provide both solutions:

  • letting Swift build the pattern (with a mention about the query interface)
  • using the || operator

I think that having these different examples might help future readers.

Let me know if you need any other changes. Thanks again for providing such a great framework!

Copy link
Contributor Author

@Timac Timac left a comment

Choose a reason for hiding this comment

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

The requested changes have been implemented.

@groue groue added this to the GRDB 4.1.0 milestone May 29, 2019
@groue groue changed the title Add documentation to clarify #530 Wrong number of statement arguments with "like '%?%'" Add FAQ to clarify "Wrong number of statement arguments" error with "like '%?%'" May 29, 2019
@groue
Copy link
Owner

groue commented May 29, 2019

OK, @Timac, I slightly modified the copy, removed the mention of the query interface which is not the topic here, and removed the second solution because one solution is all that people are looking for here. Also, merged the development branch in, and updated the change log.

Thank you very, very much 👍

@groue groue merged commit 6c93e15 into groue:development May 29, 2019
@groue
Copy link
Owner

groue commented May 29, 2019

By the way, welcome to the GRDB contributors! 🤝

Just drop me a line if you'd like to be granted with a push access to the repository.

@Timac
Copy link
Contributor Author

Timac commented May 29, 2019

@groue Happy to have helped!

@groue groue mentioned this pull request Jun 14, 2019
10 tasks
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