From 34b5b0fccfa39885003ea3dcb565c5af5bceb3ed Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Mon, 30 May 2022 01:28:19 +0400 Subject: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=B4=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=83?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- interface/database.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'interface/database.go') diff --git a/interface/database.go b/interface/database.go index 4ddd2eb..c911990 100644 --- a/interface/database.go +++ b/interface/database.go @@ -117,3 +117,8 @@ func (conn *SQLConnection) getOneToManyTable(manyTable string, manyColumn string return msg, nil } + +func (conn *SQLConnection) deleteWhere(table string, constraint string) error { + _, err := conn.db.Query(fmt.Sprintf("DELETE FROM %s WHERE %s", table, constraint)) + return err +} -- cgit v1.2.3