Skip to content

Commit

Permalink
Update en and cn README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lake committed Feb 28, 2023
1 parent 9d81856 commit b249bce
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ English | [中文](README_CN.md)


## QuickIO
QuickIO is a Java embedded database. The underlying layer is based on the ``LevelDB`` engine and Java NIO design, and uses ``Protostaff`` to serialize/deserialize data. Support the storage of **document, Key-Value and file** type data. Directly use Java code to operate the database, which is simple and efficient.
QuickIO is a Java embedded database. The underlying layer is based on the ``LevelDB`` engine and Java NIO design, and uses ``Protostaff`` to serialize/deserialize data. Support the storage of **document, key-value and file** type data. Directly use Java code to operate the database, which is simple and efficient.


## Features
Expand All @@ -26,7 +26,7 @@ repositories {
}
dependencies {
implementation 'com.github.artbits:quickio:1.3.0-beta'
implementation 'com.github.artbits:quickio:1.3.0'
}
```
Maven:
Expand All @@ -39,7 +39,7 @@ Maven:
<dependency>
<groupId>com.github.artbits</groupId>
<artifactId>quickio</artifactId>
<version>1.3.0-beta</version>
<version>1.3.0</version>
</dependency>
```

Expand All @@ -61,7 +61,7 @@ Custom entity classes are stored according to the data of document type.
public class Book extends IOEntity {
public String name;
public String author;
public float price;
public Double price;

public static Book of(Consumer<Book> consumer) {
Book book = new Book();
Expand All @@ -77,7 +77,7 @@ try(DB db = QuickIO.usingDB("example_db")) {
collection.save(Book.of(b -> {
b.name = "On java 8";
b.author = "Bruce Eckel";
b.price = 129.8f;
b.price = 129.8;
}));

List<Book> books = collection.findAll();
Expand All @@ -87,11 +87,11 @@ try(DB db = QuickIO.usingDB("example_db")) {
Store data of Key-Value type, and support any key and value that can be serialized and deserialized.
```java
try(KV kv = QuickIO.usingKV("example_kv")) {
kv.write("Pi", 3.14d);
kv.write(3.14d, "Pi");
kv.write("Pi", 3.14);
kv.write(3.14, "Pi");

double d = kv.read("Pi", Double.class);
String s = kv.read(3.14d, String.class);
String s = kv.read(3.14, String.class);
QuickIO.println("%s = %f", s, d);
}
```
Expand All @@ -107,10 +107,10 @@ try(Tin tin = QuickIO.usingTin("example_tin")) {


## Links
+ API Docs (to be written):
+ DB - Document storage
+ KV - Key-Value storage
+ Tin - File storage
+ APIs:
+ [DB - Document storage](/src/test/java/apis/DBExample.java)
+ [KV - Key-Value storage](/src/test/java/apis/KVExample.java)
+ [Tin - File storage](/src/test/java/apis/TinExample.java)
+ Thanks:
+ [LevelDB](https://github.com/dain/leveldb)
+ [Protostuff](https://github.com/protostuff/protostuff)
Expand Down
24 changes: 12 additions & 12 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


## QuickIO
QuickIO 是一个Java嵌入式数据库。底层基于 ``LevelDB`` 引擎和 Java NIO 设计,使用 ``Protostuff`` 序列化/反序列化数据。支持存储 **文档、Key-Value、文件** 类型的数据。直接使用 Java 代码操作数据库,简单高效。
QuickIO 是一个Java嵌入式数据库。底层基于 ``LevelDB`` 引擎和 Java NIO 设计,使用 ``Protostuff`` 序列化/反序列化数据。支持存储 **文档、key-value、文件** 类型的数据。直接使用Java代码操作数据库,简单高效。


## 特性
Expand All @@ -26,7 +26,7 @@ repositories {
}
dependencies {
implementation 'com.github.artbits:quickio:1.3.0-beta'
implementation 'com.github.artbits:quickio:1.3.0'
}
```
Maven:
Expand All @@ -39,7 +39,7 @@ Maven:
<dependency>
<groupId>com.github.artbits</groupId>
<artifactId>quickio</artifactId>
<version>1.3.0-beta</version>
<version>1.3.0</version>
</dependency>
```

Expand All @@ -61,7 +61,7 @@ try(DB db = QuickIO.usingDB("example_db")) {
public class Book extends IOEntity {
public String name;
public String author;
public float price;
public Double price;

public static Book of(Consumer<Book> consumer) {
Book book = new Book();
Expand All @@ -77,7 +77,7 @@ try(DB db = QuickIO.usingDB("example_db")) {
collection.save(Book.of(b -> {
b.name = "On java 8";
b.author = "Bruce Eckel";
b.price = 129.8f;
b.price = 129.8;
}));

List<Book> books = collection.findAll();
Expand All @@ -87,11 +87,11 @@ try(DB db = QuickIO.usingDB("example_db")) {
存储 Key-Value 类型的数据,支持任意可序列化和反序列化的 key 和 value。
```java
try(KV kv = QuickIO.usingKV("example_kv")) {
kv.write("Pi", 3.14d);
kv.write(3.14d, "Pi");
kv.write("Pi", 3.14);
kv.write(3.14, "Pi");

double d = kv.read("Pi", Double.class);
String s = kv.read(3.14d, String.class);
String s = kv.read(3.14, String.class);
QuickIO.println("%s = %f", s, d);
}
```
Expand All @@ -107,10 +107,10 @@ try(Tin tin = QuickIO.usingTin("example_tin")) {


## 链接
+ API 文档 (待撰写) :
+ DB - 文档存储
+ KV - 键值存储
+ Tin - 文件存储
+ APIs:
+ [DB - Document storage](/src/test/java/apis/DBExample.java)
+ [KV - Key-Value storage](/src/test/java/apis/KVExample.java)
+ [Tin - File storage](/src/test/java/apis/TinExample.java)
+ 感谢:
+ [LevelDB](https://github.com/dain/leveldb)
+ [Protostuff](https://github.com/protostuff/protostuff)
Expand Down

0 comments on commit b249bce

Please sign in to comment.