Skip to content

Commit

Permalink
fix: lookup-in returned data
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
  • Loading branch information
vados-cosmonic committed Jun 28, 2024
1 parent 5462363 commit 58d6b4d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
11 changes: 10 additions & 1 deletion wit/couchbase/subdocument.wit
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ interface subdocument-lookup {
parent-span: option<request-span>,
}

/// Documents that are returned from lookup-in operations
record lookup-in-document {
/// CAS revision of the document
cas: u64,

/// Value that was retrieved
document: document,
}

/// Documents that are returned from lookup-in operations on replicas
record lookup-in-replica-document {
/// CAS revision of the document
Expand Down Expand Up @@ -75,7 +84,7 @@ interface subdocument-lookup {
id: document-id,
operations: list<lookup-operation>,
options: lookup-options,
) -> result<list<result<document, subdocument-lookup-error>>, lookup-error>;
) -> result<list<result<lookup-in-document, subdocument-lookup-error>>, lookup-error>;

/// Perform a lookup on a particular document from any replica server
lookup-in-any-replicas: func(
Expand Down
4 changes: 2 additions & 2 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[couchbase]
path = "couchbase"
sha256 = "a8948b95226fe1294d0188e16a61e676364bfe0ea1efe3876b3c7b697bc32e62"
sha512 = "ef4aeeb2c5d8ac75e252f6040a42cc2fc9a73ff784bd5c9f0a98b66e6b633e0aabc64bd6f5547a5fdadd074eb2e2b91ae6744cec72a82809b993126382c16860"
sha256 = "3d40df73562805e07f6a2aa5f618fa7fa022717cab4aadd065bd2749275b243a"
sha512 = "2458459dd253299a3aa32594ae6bbd09aac5f740cdf4b6bef6b49bd0f99c3d42f2e5bc92d8b91ae53fe6bfd42403a87c3e683fb6aef51a840cfdb63cff74badf"

[keyvalue]
path = "keyvalue"
Expand Down
11 changes: 10 additions & 1 deletion wit/deps/couchbase/subdocument.wit
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ interface subdocument-lookup {
parent-span: option<request-span>,
}

/// Documents that are returned from lookup-in operations
record lookup-in-document {
/// CAS revision of the document
cas: u64,

/// Value that was retrieved
document: document,
}

/// Documents that are returned from lookup-in operations on replicas
record lookup-in-replica-document {
/// CAS revision of the document
Expand Down Expand Up @@ -75,7 +84,7 @@ interface subdocument-lookup {
id: document-id,
operations: list<lookup-operation>,
options: lookup-options,
) -> result<list<result<document, subdocument-lookup-error>>, lookup-error>;
) -> result<list<result<lookup-in-document, subdocument-lookup-error>>, lookup-error>;

/// Perform a lookup on a particular document from any replica server
lookup-in-any-replicas: func(
Expand Down

0 comments on commit 58d6b4d

Please sign in to comment.