https://github.com/jingle1267/androidkeyvalue
Android上基于realm数据库的k-v工具类
https://github.com/jingle1267/androidkeyvalue
androidkeyvalue keyvalue kv
Last synced: about 1 year ago
JSON representation
Android上基于realm数据库的k-v工具类
- Host: GitHub
- URL: https://github.com/jingle1267/androidkeyvalue
- Owner: jingle1267
- License: apache-2.0
- Created: 2017-11-09T01:32:29.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-09T09:26:30.000Z (over 8 years ago)
- Last Synced: 2025-01-22T13:19:13.959Z (over 1 year ago)
- Topics: androidkeyvalue, keyvalue, kv
- Language: Java
- Homepage: http://ihongqiqu.com
- Size: 138 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AndroidKeyValue
[](https://jitpack.io/#jingle1267/AndroidKeyValue)
Android上基于realm数据库的k-v工具类
### 快速使用
#### 添加依赖
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
```
dependencies {
compile 'com.github.jingle1267:AndroidKeyValue:1.0.4'
}
```
#### 1. init
```JAVA
Realm.init(getApplicationContext());
```
#### 2. insert & update
```JAVA
KeyValueUtil.insertOrUpdate("key1", value);
```
#### 3. delete
```JAVA
KeyValueUtil.delete("key1");
```
#### 4. select
```JAVA
List list = KeyValueUtil.query("key1");
```
本组件基于Realm数据库。https://realm.io/docs/java/latest/