From 757e34642b6b462805bff8e2fd1283c675fcf9bd Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Mon, 1 Jul 2024 21:09:29 +0900 Subject: [PATCH] fix: add tx-document-get-result for use insid transactions Signed-off-by: Victor Adossi --- wit/couchbase/transactions.wit | 38 +++++++++++++++++++++++------ wit/deps.lock | 4 +-- wit/deps/couchbase/transactions.wit | 38 +++++++++++++++++++++++------ 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/wit/couchbase/transactions.wit b/wit/couchbase/transactions.wit index 9db564a..0fa1dc1 100644 --- a/wit/couchbase/transactions.wit +++ b/wit/couchbase/transactions.wit @@ -8,9 +8,8 @@ package wasmcloud:couchbase@0.1.0-draft; interface transactions { use types.{ document-id, request-span, document, subdocument-path, document-error, retry-strategy, mutation-metadata, - query-scan-consistency, query-profile-mode, collection + query-scan-consistency, query-profile-mode, collection, time }; - use document.{document-get-result}; use sqlpp.{sqlpp-value, sqlpp-query-status, sqlpp-query-metrics, sqlpp-query-warning}; /// A token representing a transaction (pseudo resource) @@ -42,31 +41,56 @@ interface transactions { unexpected(string), } + /// Result of a successfully executed document get + record tx-document-get-result { + /// Document that was retrieved + document: document, + + /// CAS revision of the document + cas: u64, + + /// When the document should expire (nanoseconds) + /// + /// Deprecated: use expires-at instead + expires-in-ns: option, + + /// Time when the document expires + /// + /// This field may not be present if `document-get-options.with-expiry` is not set + expires-at: option