FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix places where the parameterPlaceholder is hardcoded to a ? by toburger · Pull Request #616 · sqlkata/querybuilder · GitHub

Fix places where the parameterPlaceholder is hardcoded to a ? - #616

Merged
ahmad-moussawi merged 2 commits into
sqlkata:masterfrom
toburger:fix_parameter_placeholder
Sep 28, 2022
Merged

Fix places where the parameterPlaceholder is hardcoded to a ? #616
ahmad-moussawi merged 2 commits into
sqlkata:masterfrom
toburger:fix_parameter_placeholder

Conversation

Copy link
Copy Markdown
Contributor

Accidentally closed the old PR #592

Copy link
Copy Markdown
Contributor

Merged now thanks!

Copy link
Copy Markdown
Contributor Author

When do you plan to release a new NuGet package?

Copy link
Copy Markdown

Hi guys, I tested the new code and unfortunately we still have a last hardcoded question mark in SqlResult

        {
            var deepParameters = Helper.Flatten(Bindings).ToList();

            return Helper.ReplaceAll(RawSql, "?", i =>
            {
                if (i >= deepParameters.Count)
                {
                    throw new Exception(
                        $"Failed to retrieve a binding at index {i}, the total bindings count is {Bindings.Count}");
                }

                var value = deepParameters[i];
                return ChangeToSqlValue(value);
            });
        }

Apparently the compiler is not saved in any of the properties or fields of SqlResult, otherwise I would have created a PR :)

Copy link
Copy Markdown
Contributor

@kamisoft-fr thanks for reporting, oops yes this still missing, we should find a way to instruct the SqlResult to copy the placeholder from the compiler, do you have any suggestion?

Copy link
Copy Markdown

Hi @ahmad-moussawi, do you have the time to take a look at PR #592 ?
it's been months I've made the pull request in order to change the default parameter placeholder & use JSON queries in my code base :)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL