blob: 26f1ee3048c0dfe7ca9bb8e307fb21dc10bd5cea [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
part of syncbase_client;
class SyncbaseRow extends NamedResource {
SyncbaseRow._internal(_proxy, _parentFullName, relativeName)
: super._internal(_proxy, _parentFullName, relativeName);
Future<bool> exists() async {
var v = await _proxy.ptr.rowExists(fullName);
if (isError(v.err)) throw v.err;
return v.exists;
}
Future<List<int>> get() async {
var v = await _proxy.ptr.rowGet(fullName);
if (isError(v.err)) throw v.err;
return v.value;
}
Future put(List<int> value) async {
var v = await _proxy.ptr.rowPut(fullName, value);
if (isError(v.err)) throw v.err;
}
Future delete() async {
var v = await _proxy.ptr.rowDelete(fullName);
if (isError(v.err)) throw v.err;
}
}