From 12e5c219fda89cfea42d8e1f246834178c94bec0 Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Tue, 23 Jun 2020 19:56:59 +0200 Subject: Speed up the tableExists check Signed-off-by: Max Magorsch --- pkg/database/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/database/connection.go b/pkg/database/connection.go index 06514df..1163679 100644 --- a/pkg/database/connection.go +++ b/pkg/database/connection.go @@ -80,6 +80,6 @@ func Connect() { // utility methods func tableExists(tableName string) bool { - _, err := DBCon.Exec("select * from " + tableName + ";") + _, err := DBCon.Exec("select * from " + tableName + " limit 1;") return err == nil } -- cgit v1.2.3-65-gdbad