Skip to content

Commit

Permalink
Add DeleteByID API
Browse files Browse the repository at this point in the history
  • Loading branch information
David Zhang committed Aug 27, 2024
1 parent 8c54485 commit 16f59d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/sql_orm/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ func Delete[T TableNameType](conds []KVPair) error {

return nil
}

func DeleteByID[T TableNameType](id any) error {
return Delete[T]([]KVPair{KV("id", id)})
}

0 comments on commit 16f59d9

Please sign in to comment.