Skip to content

Commit

Permalink
Merge pull request #91 from qiaoyuang/main
Browse files Browse the repository at this point in the history
Fix documents
  • Loading branch information
qiaoyuang authored May 7, 2024
2 parents e9b69ca + a915fb2 commit b337337
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -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:

Expand All @@ -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
Expand Down
10 changes: 4 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -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) }
Expand Down Expand Up @@ -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_

Expand Down

0 comments on commit b337337

Please sign in to comment.