Add ability to set a dialect on an existing builder #77

Closed
bazanov-a-ju wants to merge 2 commits from master into master
First-time contributor

Ability to change the dialect of a builder after its creation.

It is helpful when you have to support several dialects simultaneously and you can pass a builder to DB layer and choose the dialect there.

Ability to change the dialect of a builder after its creation. It is helpful when you have to support several dialects simultaneously and you can pass a builder to DB layer and choose the dialect there.
bazanov-a-ju added 1 commit 2020-07-10 22:11:47 +00:00
add ToDialect setter
ability to change the dialect of a builder after its creation
7f4671b14b
bazanov-a-ju force-pushed master from 613e1baf41 to 7f4671b14b 2020-07-11 20:58:58 +00:00 Compare
lunny reviewed 2020-07-12 02:02:27 +00:00
Dismissed
@ -103,2 +103,4 @@
}
// ToDialect sets the dialect
func (b *Builder) ToDialect(dialect string) *Builder {
Owner

Maybe we could have a better name for this function?

Maybe we could have a better name for this function?
Author
First-time contributor

Maybe SetDialect fits better according to "Effective Go" article https://golang.org/doc/effective_go.html#Getters

Or can you suggest better name?

Maybe SetDialect fits better according to "Effective Go" article https://golang.org/doc/effective_go.html#Getters Or can you suggest better name?
Owner

AsDialect(dialect string) maybe better?

`AsDialect(dialect string)` maybe better?
lunny added 1 commit 2021-01-26 09:22:03 +00:00
Merge branch 'master' into master
All checks were successful
continuous-integration/drone/pr Build is passing
ea95afa30c
lunny added the
enhancement
label 2021-01-26 09:22:10 +00:00
lunny closed this pull request 2024-03-15 14:22:26 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/builder#77
No description provided.