dbgorm

package
v0.0.0-...-44acadb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

generated code - do not edit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBWrapper

type DBWrapper struct {
	// contains filtered or unexported fields
}

DBWrapper wraps *gorm.DB and implements the *DBWrapper

func NewDBWrapper

func NewDBWrapper(filename, table_prefix string, dst ...interface{}) *DBWrapper

func (*DBWrapper) Create

func (dbw *DBWrapper) Create(instanceDB any) (db.DBInterface, error)

Create inserts the value into the database and returns a new *DBWrapper and an error if any.

func (*DBWrapper) Delete

func (dbw *DBWrapper) Delete(instanceDB any) (db.DBInterface, error)

Delete deletes value from the database.

func (*DBWrapper) Find

func (dbw *DBWrapper) Find(instanceDBs any) (db.DBInterface, error)

Find finds records that match given conditions.

func (*DBWrapper) First

func (dbw *DBWrapper) First(instanceDB any, conds ...any) (db.DBInterface, error)

First returns the first record that matches the conditions.

func (*DBWrapper) Model

func (dbw *DBWrapper) Model(instanceDB any) (db.DBInterface, error)

Model specifies the model you would like to run db operations against.

func (*DBWrapper) Save

func (dbw *DBWrapper) Save(instanceDB any) (db.DBInterface, error)

Save updates value in the database.

func (*DBWrapper) Unscoped

func (dbw *DBWrapper) Unscoped() (db.DBInterface, error)

Unscoped returns a new *DBWrapper that includes soft-deleted records.

func (*DBWrapper) Updates

func (dbw *DBWrapper) Updates(instanceDB any) (db.DBInterface, error)

Updates updates multiple columns.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL