We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d47d95 + 5054d55 commit c2d7928Copy full SHA for c2d7928
database/db.go
@@ -22,6 +22,7 @@ import (
22
"golang.org/x/sync/semaphore"
23
"net"
24
"net/url"
25
+ "slices"
26
"strconv"
27
"strings"
28
"sync"
@@ -227,6 +228,11 @@ func (db *DB) GetAddr() string {
227
228
return db.addr
229
}
230
231
+// BuildColumns returns all columns of the given struct.
232
+func (db *DB) BuildColumns(subject interface{}) []string {
233
+ return slices.Clone(db.columnMap.Columns(subject))
234
+}
235
+
236
// BuildDeleteStmt returns a DELETE statement for the given struct.
237
func (db *DB) BuildDeleteStmt(from interface{}) string {
238
return fmt.Sprintf(
0 commit comments