Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

db名を修正 #29

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions back/domain/moneyprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

func (d *dbImpl) NewMoneyProvider(moneyProvider MoneyProvider) (MoneyProvider, error) {
// クエリ文字列で位置パラメータを使用します。
query := `INSERT INTO money_providers (name, creator_id, balance)
query := `INSERT INTO money_provider (name, creator_id, balance)
VALUES ($1, $2, $3)
RETURNING id`
// QueryRowを使用してSQLクエリを実行し、戻り値のIDを取得します。
Expand Down Expand Up @@ -41,7 +41,7 @@ func (d *dbImpl) UpdateMoneyProvider(moneyProvider MoneyProvider) error {
}

func (d *dbImpl) DeleteMoneyProvider(id string) error {
query := `DELETE FROM money_providers WHERE id = $1`
query := `DELETE FROM money_provider WHERE id = $1`
result, err := d.db.Exec(query, id)
if err != nil {
return fmt.Errorf("could not delete money provider: %v", err)
Expand Down
Loading