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 documentation to clarify #530 Wrong number of statement arguments with "like '%?%'" #531

Closed
wants to merge 1 commit into from

Conversation

Timac
Copy link
Contributor

@Timac Timac commented May 14, 2019

Add a paragraph "? as a parameter" in the "Good to Know" section of the README to explain how to build like pattern like '%?%'.

See related issue:
#530

Add "? as a parameter" in the "Good to Know" section to explain how to build like pattern like '%?%'.
@groue
Copy link
Owner

groue commented May 20, 2019

Hello @Timac,

Thank you for your contribution.

I'm not sure we can publish it right away, considering how things are presented:

  1. The new documentation section is all clear given the context of Wrong number of statement arguments with "like '%?%'" #530. But we can't expect readers to know about this issue before they meet it. I'm afraid most people will miss your goal because they don't know what your goal is and why they should be concerned.
  2. User who face the "Wrong number of statement arguments" error will Google for it. They won't be able to find your new documentation section because it does not mention the verbatim error.
  3. You provide one workaround for a particular case, without exposing other valid workarounds (such as building the whole parameter in Swift, instead of building it with SQL)

May I suggest you rewrite it as a FAQ entry instead, focused on the "Wrong number of statement arguments" error, which is the only thing in the head of people who face the problem. Introduce the error with a typical erroneous LIKE query. Then explain what this error means and what ? is. As I did in Nike-Inc/SQift#9, link to relevant SQLite documentation. Make your readers able to learn when they read your documentation, not only find a quick fix. Quick fixes are for Stack Overflow, not for GRDB documentation.

@groue
Copy link
Owner

groue commented May 27, 2019

@Timac, I close this PR due to lack of activity. Don't hesitate reopening when you are ready!

@groue groue closed this May 27, 2019
@Timac
Copy link
Contributor Author

Timac commented May 27, 2019

Hey @groue,

Sorry for the delay. I definitively agree with all the points you wrote.
I made a new pull request to the master branch which should follow your suggestions.

See: #538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants