-
Notifications
You must be signed in to change notification settings - Fork 366
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
INSERT SQL is MySQL specific #145
Comments
Thanks for the info, didn't know about the backticks and placeholders. You're welcome to attempt to change it to a more cross platform query, then post it here, so it can be tested with MySQL. Also would welcome to suggest any other solutions, eg. recommend an ORM or something similar that's more cross platform. |
Another idea would be to refactor |
So I have something working in my backend which takes the SQL from the config. I'm marking it as I'll look to get a pull request done asap. |
Thanks for the update, sounds good. |
The SQL insert statement can now be changed in the config thanks to #157, so I'll close this. |
In wiki page: https://github.com/flashmob/go-guerrilla/wiki/Configuration-example:-save-to-Redis-&-MySQL There are incorrect variables for config. Need |
Thanks. Corrected!
…On Fri, 2 Aug 2019 at 23:01, Lord Alfred ***@***.***> wrote:
In wiki page:
https://github.com/flashmob/go-guerrilla/wiki/Configuration-example:-save-to-Redis-&-MySQL
There are incorrect variables for config. Need sql_insert and sql_values,
not SQLInsert and SQLValues
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#145?email_source=notifications&email_token=AAE6MP3C5X7QNPMCSTNP6C3QCQV33A5CNFSM4HDUGCB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3NVRII#issuecomment-517691553>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAE6MP4GRLS2IEONATURCMDQCQV33ANCNFSM4HDUGCBQ>
.
|
You can now define your own SQL statement in the config. Have a look at the wiki page or pull request linked above |
The
INSERT
statement in the SQL backend is specific. In particular, changing the backend to postgres results in SQL error.The two main changes to make are:
?
placeholders need to be replaced with$x
, wherex
increments.I'm not sure whether it's possible to replace the SQL with something more cross-platform or whether there is the need for DB specific backends.
The text was updated successfully, but these errors were encountered: