diff --git a/CHANGELOG.md b/CHANGELOG.md index da4de98..00b0b00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ ### sqllin-driver * **Breaking change**: Remove the deprecated API `CommonCursor#forEachRows` -* **Breaking change**: the `getInt`, `getLong`, `getFloat` and `getDouble` will throw an exception when the value is NULl in SQLite +* **Breaking change**: the `getInt`, `getLong`, `getFloat` and `getDouble` will throw an exception when the value is NULL in SQLite * Add a new public API: `CommonCursor#isNull`, for check if the value is NULL in SQLite ## v1.3.0 / 2024-04-21 @@ -187,7 +187,6 @@ a runtime exception. Thanks for [@nbransby](https://github.com/nbransby). * Fix some bugs about unit tests - ### sqllin-dsl * Add the `ON` clause support diff --git a/README.md b/README.md index 929e207..be69053 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ 中文版请见[这里](README_CN.md) -SQLlin is a Kotlin Multiplatform SQLite library that based on DSL and KSP. You can write SQL statements with your Kotlin code and these can -be verified by Kotlin compiler. Sample just like be this: +SQLlin is an ORM library for Kotlin Multiplatform that based on DSL and KSP. It uses SQLite under the hood. You can write SQL +statements with your Kotlin code and these can be verified by Kotlin compiler. Sample just like be this: ```kotlin private val db by lazy { Database(name = "person.db", path = path, version = 1) } @@ -44,10 +44,9 @@ The architecture design of SQLlin is shown in the figure: ![sqllin-architecture](sqllin-architecture.png) -SQLlin has two major parts: _sqllin-dsl_ and _sqllin-driver_. The _sqllin-driver_ is a common multiplatform SQLite low-level -API, most of the time it is not recommended to use it directly. The _sqllin-dsl_ is the SQL statements DSL implementation and based on _sqllin-driver_. - -The _sqllin-processor_ uses KSP to process annotations and generate code for use with _sqllin-dsl_. +SQLlin has 3 major parts: _sqllin-dsl_, _sqllin-driver_ and _sqllin-processor_. The _sqllin-driver_ is a set of common multiplatform SQLite low-level +APIs, most of the time it is not recommended to use it directly. The _sqllin-dsl_ is DSL implementations for SQL statements, it based on +_sqllin-driver_. The _sqllin-processor_ uses KSP to process annotations and generate code for using with _sqllin-dsl_. You can learn how to use _sqllin-dsl_ in these documentations: @@ -58,13 +57,13 @@ You can learn how to use _sqllin-dsl_ in these documentations: - [SQL Functions](./sqllin-dsl/doc/sql-functions.md) - [Advanced Query](./sqllin-dsl/doc/advanced-query.md) -I don't recommend use _sqllin-driver_ directly, but if you want to learn more about it, you can read: +I don't recommend using _sqllin-driver_ directly, but if you want to learn more about it, you can read: - [The sqllin-driver Basic Design and Usage](./sqllin-driver/README.md) ## R8/ProGuard -Due to _sqllin-dsl_'s deserialization based on [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization), R8/ProGuard configuration please refer to +Due to _sqllin-dsl_'s deserialization based on [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization), the R8/ProGuard configuration please refer to [kotlinx.serialization#Android](https://github.com/Kotlin/kotlinx.serialization#Android). ## License diff --git a/README_CN.md b/README_CN.md index aeb564d..21434d6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,7 +1,7 @@ # SQLlin -SQLlin 是一款基于 DSL 以及 Kotlin 符号处理器(KSP)的 Kotlin Multiplatform SQLite 框架。它使你可以在你的 Kotlin 代码中编写能够被 Kotlin 编译器校验的 SQL -语句。示例如下: +SQLlin 是一款基于 DSL 及 Kotlin 符号处理器(KSP)实现的 Kotlin Multiplatform ORM 框架,其底层使用 SQLite。你可以使用它在 Kotlin +代码中编写能够被 Kotlin 编译器校验的 SQL 语句。示例如下: ```kotlin private val db by lazy { Database(name = "person.db", path = path, version = 1) } @@ -41,10 +41,8 @@ SQLlin 的架构设计如下图所示: ![sqllin-architecture](sqllin-architecture.png) -SQLlin 拥有两个主要部分:_sqllin-dsl_ 与 _sqllin-driver_。_sqllin-driver_ 是一套通用的多平台 SQLite 低阶 API,大多数情况下不推荐直接使用。 -_sqllin-dsl_ 是 SQL 语句的 DSL 实现并且它基于 _sqllin-driver_。 - -_sqllin-processor_ 使用 KSP 处理注解并生成用于和 _sqllin-dsl_ 配合使用的代码。 +SQLlin 拥有三个主要部分:_sqllin-dsl_、_sqllin-driver_ 及 _sqllin-processor_。_sqllin-driver_ 是一套通用的多平台 SQLite 低阶 API,大多数情况下不推荐直接使用。 +_sqllin-dsl_ 是 SQL 语句的 DSL 实现并且它基于 _sqllin-driver_。_sqllin-processor_ 使用 KSP 处理注解并生成用于与 _sqllin-dsl_ 配合使用的代码。 你可以在下列文档中学习如何使用 _sqllin-dsl_: