Added backend

This commit is contained in:
2022-02-06 22:51:36 +01:00
parent 77599e26f8
commit 431cadaeea
35 changed files with 2422 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package database
import "gorm.io/gorm"
func Exists(tx *gorm.DB, query interface{}, args ...interface{}) bool {
var exists bool
tx.Where(query, args...).Select("count(*) > 0").Find(&exists)
return exists
}