sql

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQL

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

SQL contains functions for studio sql database.

func New

func New(db *gorm.DB) *SQL

New to create new studio database.

func (*SQL) BatchUpdate

func (sql *SQL) BatchUpdate(ctx context.Context, data []entity.Studio) (int, error)

BatchUpdate to batch update studio.

func (*SQL) Get added in v0.10.0

func (sql *SQL) Get(ctx context.Context, data entity.GetRequest) ([]*entity.Studio, int, int, error)

Get to get list.

func (*SQL) GetByID added in v0.10.0

func (sql *SQL) GetByID(ctx context.Context, id int64) (*entity.Studio, int, error)

GetByID to get by id.

func (*SQL) GetByIDs

func (sql *SQL) GetByIDs(ctx context.Context, ids []int64) ([]*entity.Studio, int, error)

GetByIDs to get studio by ids.

func (*SQL) GetHistories added in v0.10.0

func (sql *SQL) GetHistories(ctx context.Context, data entity.GetHistoriesRequest) ([]entity.History, int, error)

GetHistories to get histories.

type Studio

type Studio struct {
	ID        int64 `gorm:"primaryKey"`
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt
}

Studio is studio database model.

Jump to

Keyboard shortcuts

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