feat: add delete, context, and tx helpers
Add Delete/DeleteAffected, context-aware CRUD helpers, WithTx, ContainsCol, and queryReturning deduplication for returning statements. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+10
-1
@@ -1,6 +1,15 @@
|
||||
package dbx
|
||||
|
||||
import "github.com/go-jet/jet/v2/mysql"
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/go-jet/jet/v2/mysql"
|
||||
)
|
||||
|
||||
// ContainsCol reports whether cols contains col.
|
||||
func ContainsCol(cols ColumnList, col Column) bool {
|
||||
return slices.Contains(cols, col)
|
||||
}
|
||||
|
||||
// NormalCols processes a list of columns and strips out any that implement any of
|
||||
// ColumnTimestamp, ColumnTime, or ColumnDate.
|
||||
|
||||
Reference in New Issue
Block a user