objextbox 浏览器_ObjectBox 文件存储查看

本文介绍了如何使用自编的RViewer库来方便查看ObjectBox数据库(.mdb)中的数据。作者分享了如何在项目中集成RViewer,以及如何为Entity类添加toString方法以便于数据展示。此外,还提到了MIT许可的使用。
摘要由CSDN通过智能技术生成

方便简单的查看 ObjectBox data.mdb 数据。

Object Box 是个好东西,效率很棒,我估计迟早会取代 GreenDao,可是查看存储的内容却非常不方便,找了一下还没找到什么好用的,那只能自己写一个喽。

GitHub 原文:https://github.com/renyuzhuo/rviewer

RViewer

A library to check the data saved by ObjectBox.

Getting started

In your build.gradle:

dependencies {

debugCompile 'cn.renyuzhuo.rviewer:rviewer:1.0.2'

releaseCompile 'cn.renyuzhuo.rviewer:rviewer-no-op:1.0.2'

}

In your Application class:

public class App extends Application {

private BoxStore boxStore;

private static App app;

@Override

public void onCreate() {

super.onCreate();

boxStore = MyObjectBox.builder().androidContext(this).build();

app = this;

ArrayListclasses = new ArrayList<>();

classes.add(Note.class); // Your Entitys

ObjectViewBoxManager.getInstance().init(boxStore, classes);

}

}

Notice: You Should all Add toString() like:

@Override

public String toString() {

return "Note{" +

"id=" + id +

", text='" + text + '\'' +

", date=" + date +

'}';

}

All the things is done.

operation.gif

Thanks

ObjectBox-viewer

License

MIT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值