summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/db.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-11-27 15:26:58 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-27 15:26:58 +0100
commit182b4eea73881c611a0f519576aa6ad2aa6799c2 (patch)
tree230fac469690fcee8797b13585e739be148d4789 /vendor/github.com/uptrace/bun/db.go
parentRequire confirmed email when checking oauth token (#332) (diff)
downloadgotosocial-182b4eea73881c611a0f519576aa6ad2aa6799c2.tar.xz
Update dependencies (#333)
Diffstat (limited to 'vendor/github.com/uptrace/bun/db.go')
-rw-r--r--vendor/github.com/uptrace/bun/db.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/db.go b/vendor/github.com/uptrace/bun/db.go
index d42669493..c32474cef 100644
--- a/vendor/github.com/uptrace/bun/db.go
+++ b/vendor/github.com/uptrace/bun/db.go
@@ -178,6 +178,8 @@ func (db *DB) Table(typ reflect.Type) *schema.Table {
return db.dialect.Tables().Get(typ)
}
+// RegisterModel registers models by name so they can be referenced in table relations
+// and fixtures.
func (db *DB) RegisterModel(models ...interface{}) {
db.dialect.Tables().Register(models...)
}
@@ -201,6 +203,11 @@ func (db *DB) Formatter() schema.Formatter {
return db.fmter
}
+// HasFeature uses feature package to report whether the underlying DBMS supports this feature.
+func (db *DB) HasFeature(feat feature.Feature) bool {
+ return db.fmter.HasFeature(feat)
+}
+
//------------------------------------------------------------------------------
func (db *DB) Exec(query string, args ...interface{}) (sql.Result, error) {