Documentation
¶
Index ¶
- type DB
- func (db *DB) AutoMigrate(models ...any) error
- func (db *DB) BeginDangerously(ctx context.Context) *gorm.DB
- func (db *DB) Create(ctx context.Context, value any, clauses []clause.Expression) *gorm.DB
- func (db *DB) Delete(ctx context.Context, value any, clauses []clause.Expression) *gorm.DB
- func (db *DB) Exec(ctx context.Context, sql string, clauses []clause.Expression, values ...any) *gorm.DB
- func (db *DB) First(ctx context.Context, dest any, conds ...any) *gorm.DB
- func (db *DB) Lock()
- func (db *DB) Raw(ctx context.Context, sql string, clauses []clause.Expression, values ...any) *gorm.DB
- func (db *DB) Save(ctx context.Context, value any, clauses []clause.Expression) *gorm.DB
- func (db *DB) Unlock()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AutoMigrate ¶
func (*DB) BeginDangerously ¶
TODO: this isn't actually good. we can commit even if the db is locked here. this is probably okay for the time being, but need to figure out a better solution. right now we only do this whenever we're importing a repo though so i'm mostly not worried, but it's still bad. e.g. when we do apply writes we should also be using a transcation but we don't right now
Click to show internal directories.
Click to hide internal directories.