Skip to content

Commit 99496a9

Browse files
committed
CA-403344: Add db_get_by_uuid_opt to db_cache*
Signed-off-by: Vincent Liu <[email protected]>
1 parent c264219 commit 99496a9

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

ocaml/database/db_remote_cache_access_v1.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ module DBCacheRemoteListener = struct
102102
let s, e = unmarshall_db_get_by_uuid_args args in
103103
success
104104
(marshall_db_get_by_uuid_response (DBCache.db_get_by_uuid t s e))
105+
| "db_get_by_uuid_opt" ->
106+
let s, e = unmarshall_db_get_by_uuid_args args in
107+
success
108+
(marshall_db_get_by_uuid_opt_response
109+
(DBCache.db_get_by_uuid_opt t s e)
110+
)
105111
| "db_get_by_name_label" ->
106112
let s, e = unmarshall_db_get_by_name_label_args args in
107113
success

ocaml/database/db_remote_cache_access_v2.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ let process_rpc (req : Rpc.t) =
3636
Response.Read_field_where (DB.read_field_where t w)
3737
| Request.Db_get_by_uuid (a, b) ->
3838
Response.Db_get_by_uuid (DB.db_get_by_uuid t a b)
39+
| Request.Db_get_by_uuid_opt (a, b) ->
40+
Response.Db_get_by_uuid_opt (DB.db_get_by_uuid_opt t a b)
3941
| Request.Db_get_by_name_label (a, b) ->
4042
Response.Db_get_by_name_label (DB.db_get_by_name_label t a b)
4143
| Request.Create_row (a, b, c) ->

ocaml/database/db_rpc_client_v2.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ functor
7878
raise Remote_db_server_returned_bad_message
7979

8080
let db_get_by_uuid_opt _ t u =
81-
match process (Request.Db_get_by_uuid (t, u)) with
81+
match process (Request.Db_get_by_uuid_opt (t, u)) with
8282
| Response.Db_get_by_uuid_opt y ->
8383
y
8484
| _ ->

ocaml/database/db_rpc_common_v1.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ let unmarshall_db_get_by_uuid_args xml = unmarshall_2strings xml
192192

193193
let marshall_db_get_by_uuid_response s = XMLRPC.To.string s
194194

195+
let marshall_db_get_by_uuid_opt_response = marshall_stringopt
196+
195197
let unmarshall_db_get_by_uuid_response xml = XMLRPC.From.string xml
196198

197199
let unmarshall_db_get_by_uuid_opt_response xml = unmarshall_stringopt xml

ocaml/database/db_rpc_common_v2.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module Request = struct
2323
| Find_refs_with_filter of string * Db_filter_types.expr
2424
| Read_field_where of Db_cache_types.where_record
2525
| Db_get_by_uuid of string * string
26+
| Db_get_by_uuid_opt of string * string
2627
| Db_get_by_name_label of string * string
2728
| Create_row of string * (string * string) list * string
2829
| Delete_row of string * string

0 commit comments

Comments
 (0)