-
Notifications
You must be signed in to change notification settings - Fork 276
Support Custom Table Names Configuration #455
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
base: master
Are you sure you want to change the base?
Conversation
|
Done. |
35d08b0 to
8af2ef6
Compare
|
Hi, @brandond , I have resolved the problems mentioned previously. Could you please review this pull request at your convenience? If there is anything that needs improvement on this |
brandond
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple more nits
|
Apologies, I amended a small change (adjusting CLI parameter position) onto a previous commit. This changed the subsequent commit hashes. I'm very sorry that this increased your review workload. |
|
Hi @brandond ,I've fixed the issue you mentioned previously. Could you please review the code at your convenience? |
|
This looks good but I'd like a chance to look it over a bit more closely to think if there's some simpler way to do it without adding so much string mangling and new functions. I'll try to get to that next week. It also needs a rebase, sorry! |
Signed-off-by: happy game <[email protected]>
- Modify the SQL statements in `pkg/drivers/generic` to adapt to custom table names. - Modify the SQL statements in `pkg/drivers/sqlite` to adapt to custom table names. Signed-off-by: happy game <[email protected]>
- support mysql - support pgsql Signed-off-by: happy game <[email protected]>
- Move SQL statement generation from struct methods to package-level variables - Validate table name - Quote table name - Reverts the pattern of setting fields after variable declaration Signed-off-by: happy game <[email protected]>
- Use + to concatenate SQL statements instead of fmt.Sprintf Signed-off-by: happy game <[email protected]>
- Quote table names using double quotes (").
- For MySQL, add `ANSI_QUOTES` to the `sql_mode` parameter in the DSN.
Signed-off-by: happy game <[email protected]>
|
I have rebased onto the latest master branch. |
|
Hi @brandond,it has been more than a month since this PR was submitted. May I inquire whether this PR can be merged or if there are still areas that need modification? Thanks. |
|
|
If you still feel this feature is necessary, I'm happy to implement it. However, I would prefer to start fresh on the latest commit and open a new pull request. |
--table-name, with the default value beingkine.TableNameto theconfiginpkg/endpoint.TableNametopkg/drivers/config.go.sqlite,mysql, andpgsql.I have already run

scripts/testand passed all the tests.#452