We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c61c8a commit 3235c59Copy full SHA for 3235c59
src/extensions/ocsipersist-pgsql/ocsipersist.ml
@@ -1,3 +1,5 @@
1
+(** PostgreSQL (>= 9.5) backend for Ocsipersist. *)
2
+
3
let section = Lwt_log.Section.make "ocsipersist:sql"
4
5
module Lwt_thread = struct
@@ -95,7 +97,8 @@ let get p = use_pool @@ fun db ->
95
97
Lwt.map (unmarshal @. one) (exec db query [p.name])
96
98
99
let set p v = use_pool @@ fun db ->
- insert db p.store p.name v
100
+ let query = sprintf "UPDATE %s SET value = $2 WHERE key = $1 " p.store
101
+ in exec db query [p.name; marshal v] >> Lwt.return ()
102
103
type 'value table = string
104
0 commit comments