infrastructure

package
v0.0.0-...-2f8af90 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func NewSqlHandler

func NewSqlHandler() database.SqlHandler

Types

type SqlHandler

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

func (*SqlHandler) Create

func (handler *SqlHandler) Create(value interface{}) *gorm.DB

データベースへの値の挿入するメソッド

func (*SqlHandler) Delete

func (handler *SqlHandler) Delete(value interface{}) *gorm.DB

指定された条件に合う値を削除する。値に主キーがある場合は、主キーを条件に含む。

func (*SqlHandler) Find

func (handler *SqlHandler) Find(value interface{}) *gorm.DB

指定された条件に一致するレコードを探すメソッド

func (*SqlHandler) FindBy

func (hander *SqlHandler) FindBy(value interface{}, id int) *gorm.DB

func (*SqlHandler) Save

func (handler *SqlHandler) Save(value interface{}) *gorm.DB

データベースの値を更新し、値に主キーがない場合は挿入するメソッド

Jump to

Keyboard shortcuts

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