sql

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Genre

type Genre struct {
	ID        int64
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt
}

Genre is genre database model.

type SQL

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

SQL contains functions for genre sql database.

func New

func New(db *gorm.DB) *SQL

New to create new genre database.

func (*SQL) BatchUpdate

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

BatchUpdate to batch update genre.

func (*SQL) GetByIDs

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

GetByIDs to get genre by ids.

Jump to

Keyboard shortcuts

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