Skip to content

Commit

Permalink
Fix tag info
Browse files Browse the repository at this point in the history
  • Loading branch information
XIELongDragon committed May 31, 2022
1 parent c1a00dc commit 8da9d8c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions delete_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type DeleteDataset struct {
func newDeleteDataset(d, tagName string, queryFactory exec.QueryFactory) *DeleteDataset {
return &DeleteDataset{
clauses: exp.NewDeleteClauses(),
dialect: GetDialect(d),
dialect: GetDialectWithTag(d, tagName),
queryFactory: queryFactory,
isPrepared: preparedNoPreference,
tagName: tagName,
Expand Down Expand Up @@ -60,7 +60,7 @@ func (dd *DeleteDataset) IsPrepared() bool {
// Sets the adapter used to serialize values and create the SQL statement
func (dd *DeleteDataset) WithDialect(dl string) *DeleteDataset {
ds := dd.copy(dd.GetClauses())
ds.dialect = GetDialect(dl)
ds.dialect = GetDialectWithTag(dl, dd.tagName)
return ds
}

Expand Down
4 changes: 2 additions & 2 deletions insert_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var ErrUnsupportedIntoType = errors.New("unsupported table type, a string or ide
func newInsertDataset(d, tagName string, queryFactory exec.QueryFactory) *InsertDataset {
return &InsertDataset{
clauses: exp.NewInsertClauses(),
dialect: GetDialect(d),
dialect: GetDialectWithTag(d, tagName),
queryFactory: queryFactory,
tagName: tagName,
}
Expand Down Expand Up @@ -52,7 +52,7 @@ func (id *InsertDataset) IsPrepared() bool {
// Sets the adapter used to serialize values and create the SQL statement
func (id *InsertDataset) WithDialect(dl string) *InsertDataset {
ds := id.copy(id.GetClauses())
ds.dialect = GetDialect(dl)
ds.dialect = GetDialectWithTag(dl, id.tagName)
return ds
}

Expand Down
4 changes: 2 additions & 2 deletions select_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var ErrQueryFactoryNotFoundError = errors.New(
func newDataset(d, tagName string, queryFactory exec.QueryFactory) *SelectDataset {
return &SelectDataset{
clauses: exp.NewSelectClauses(),
dialect: GetDialect(d),
dialect: GetDialectWithTag(d, tagName),
queryFactory: queryFactory,
tagName: tagName,
}
Expand All @@ -46,7 +46,7 @@ func Select(cols ...interface{}) *SelectDataset {
// Sets the adapter used to serialize values and create the SQL statement
func (sd *SelectDataset) WithDialect(dl string) *SelectDataset {
ds := sd.copy(sd.GetClauses())
ds.dialect = GetDialect(dl)
ds.dialect = GetDialectWithTag(dl, sd.tagName)
return ds
}

Expand Down
4 changes: 2 additions & 2 deletions truncate_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type TruncateDataset struct {
func newTruncateDataset(d, tagName string, queryFactory exec.QueryFactory) *TruncateDataset {
return &TruncateDataset{
clauses: exp.NewTruncateClauses(),
dialect: GetDialect(d),
dialect: GetDialectWithTag(d, tagName),
tagName: tagName,
queryFactory: queryFactory,
}
Expand All @@ -32,7 +32,7 @@ func Truncate(table ...interface{}) *TruncateDataset {
// Sets the adapter used to serialize values and create the SQL statement
func (td *TruncateDataset) WithDialect(dl string) *TruncateDataset {
ds := td.copy(td.GetClauses())
ds.dialect = GetDialect(dl)
ds.dialect = GetDialectWithTag(dl, td.tagName)
return ds
}

Expand Down
4 changes: 2 additions & 2 deletions update_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var ErrUnsupportedUpdateTableType = errors.New("unsupported table type, a string
func newUpdateDataset(d, tagName string, queryFactory exec.QueryFactory) *UpdateDataset {
return &UpdateDataset{
clauses: exp.NewUpdateClauses(),
dialect: GetDialect(d),
dialect: GetDialectWithTag(d, tagName),
queryFactory: queryFactory,
tagName: tagName,
}
Expand All @@ -48,7 +48,7 @@ func (ud *UpdateDataset) IsPrepared() bool {
// Sets the adapter used to serialize values and create the SQL statement
func (ud *UpdateDataset) WithDialect(dl string) *UpdateDataset {
ds := ud.copy(ud.GetClauses())
ds.dialect = GetDialect(dl)
ds.dialect = GetDialectWithTag(dl, ud.tagName)
return ds
}

Expand Down

0 comments on commit 8da9d8c

Please sign in to comment.