- get_person - list_persons - delete_payment - delete_person (TODO: Add removal of returnsLog to TX)
22 lines
316 B
Go
22 lines
316 B
Go
package db
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
func (store *SQLStore) DeletePersonTx(ctx context.Context, id int64) error {
|
|
err := store.execTx(ctx, func(q *Queries) error {
|
|
|
|
// TODO: Add removal of db.returnsLog entries.
|
|
|
|
err := q.DeletePerson(ctx, id)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return err
|
|
})
|
|
|
|
return err
|
|
}
|