MCPcopy
hub / github.com/go-gorm/gorm / Raw

Method Raw

generics.go:185–193  ·  view source on GitHub ↗
(sql string, values ...interface{})

Source from the content-addressed store, hash-verified

183}
184
185func (c *g[T]) Raw(sql string, values ...interface{}) ExecInterface[T] {
186 return execG[T]{g: &g[T]{
187 db: c.db,
188 ops: append(c.ops, func(db *DB) *DB {
189 var r T
190 return db.Model(r).Raw(sql, values...)
191 }),
192 }}
193}
194
195func (c *g[T]) Exec(ctx context.Context, sql string, values ...interface{}) error {
196 var r T

Callers

nothing calls this directly

Calls 2

ModelMethod · 0.80
RawMethod · 0.65

Tested by

no test coverage detected