diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-06-23 19:56:59 +0200 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-06-23 19:56:59 +0200 |
commit | 12e5c219fda89cfea42d8e1f246834178c94bec0 (patch) | |
tree | 4a8301fd5982f06b7ba8ba75ec24146174392555 | |
parent | Speed up the computation of the index page (diff) | |
download | archives-12e5c219fda89cfea42d8e1f246834178c94bec0.tar.gz archives-12e5c219fda89cfea42d8e1f246834178c94bec0.tar.bz2 archives-12e5c219fda89cfea42d8e1f246834178c94bec0.zip |
Speed up the tableExists check
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | pkg/database/connection.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |