summaryrefslogtreecommitdiffstats
path: root/store/sql_store.go
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-10-07 10:19:02 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-10-13 09:42:26 -0400
commita6cd2a79612d6d96e0e929ab769ec5e70cd35f5f (patch)
tree0a063e8b2e4da202292e2b2fded440c1777b6e55 /store/sql_store.go
parent5832232b6d3d79023204d357b0de33eff9e00370 (diff)
downloadchat-a6cd2a79612d6d96e0e929ab769ec5e70cd35f5f.tar.gz
chat-a6cd2a79612d6d96e0e929ab769ec5e70cd35f5f.tar.bz2
chat-a6cd2a79612d6d96e0e929ab769ec5e70cd35f5f.zip
Moved saving multiple user preferences into a database transaction
Diffstat (limited to 'store/sql_store.go')
-rw-r--r--store/sql_store.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/store/sql_store.go b/store/sql_store.go
index 4b055e455..f8c585979 100644
--- a/store/sql_store.go
+++ b/store/sql_store.go
@@ -612,3 +612,9 @@ func decrypt(key []byte, cryptoText string) (string, error) {
return fmt.Sprintf("%s", ciphertext), nil
}
+
+// Interface for both gorp.DbMap and gorp.Transaction to allow code for one to be reused with the other
+type Queryable interface {
+ Insert(list ...interface{}) error
+ Update(list ...interface{}) (int64, error)
+}