Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ func (m *DbMap) dynamicTableMap() map[string]*TableMap {
return m.tablesDynamic
}

// WithDbMapContext is like WithContext, but returns the DbMap instead of a generic SqlExecutor
func (m *DbMap) WithDbMapContext(ctx context.Context) DbMap {
copy := &DbMap{}
*copy = *m
copy.ctx = ctx
return *copy
}

func (m *DbMap) WithContext(ctx context.Context) SqlExecutor {
copy := &DbMap{}
*copy = *m
Expand Down