more json schema

This commit is contained in:
John Smith
2023-06-04 22:08:46 -04:00
parent 06081df22a
commit 0e52c1fb0a
7 changed files with 159 additions and 13 deletions

View File

@@ -797,7 +797,7 @@ class VeilidTableDBTransactionFFI extends VeilidTableDBTransaction {
}
@override
Future<bool> delete(int col, Uint8List key) {
Future<void> delete(int col, Uint8List key) {
final nativeEncodedKey = base64UrlNoPadEncode(key).toNativeUtf8();
final recvPort = ReceivePort("veilid_table_db_transaction_delete");
@@ -888,7 +888,7 @@ class VeilidTableDBFFI extends VeilidTableDB {
}
@override
Future<Uint8List?> delete(int col, Uint8List key) {
Future<Uint8List?> delete(int col, Uint8List key) async {
final nativeEncodedKey = base64UrlNoPadEncode(key).toNativeUtf8();
final recvPort = ReceivePort("veilid_table_db_delete");
@@ -899,7 +899,11 @@ class VeilidTableDBFFI extends VeilidTableDB {
col,
nativeEncodedKey,
);
return processFuturePlain(recvPort.first);
String? out = await processFuturePlain(recvPort.first);
if (out == null) {
return null;
}
return base64UrlNoPadDecode(out);
}
}

View File

@@ -368,7 +368,7 @@ class VeilidTableDBTransactionJS extends VeilidTableDBTransaction {
}
@override
Future<bool> delete(int col, Uint8List key) {
Future<void> delete(int col, Uint8List key) {
final encodedKey = base64UrlNoPadEncode(key);
return _wrapApiPromise(js_util.callMethod(

View File

@@ -8,7 +8,7 @@ abstract class VeilidTableDBTransaction {
Future<void> commit();
Future<void> rollback();
Future<void> store(int col, Uint8List key, Uint8List value);
Future<bool> delete(int col, Uint8List key);
Future<void> delete(int col, Uint8List key);
Future<void> storeJson(int col, Uint8List key, Object? object,
{Object? Function(Object? nonEncodable)? toEncodable}) async {