Comments (1)
设计理念不同,SQLlin 中每次 database 作用域展开可以构建并执行多条 SQL 语句,而唯一需要获取结果的查询语句可自由穿插其中,无法用一个泛型 Flow 返回多种不同类型的查询结果。Room 的设计是调用一次函数就执行一条语句,因此易于使用 Flow 保存结果,并交给用户订阅获取。此外,基于中缀函数和作用域函数构建的 DSL 与链式调用本来就不是一个风格,在 DSL 块后面进行 Flow 的链式调用在代码风格上并不是一个好选择,目前你可以使用 flow {}
函数包裹 DSL 块,获取 flow 对象后再进行链式调用,这样代码风格更佳。因此现阶段 SQLlin 不是很有内置转换成 Flow 的必要。
from sqllin.
Related Issues (20)
- 下载依赖报错 HOT 2
- Implement a Kotlin/Native SQLite driver to replace the SQLiter HOT 1
- Could not find org.jetbrains.kotlinx-atomicfu-0.17.3-nativeInterop-8G5yng.klib HOT 3
- 如何配置postgresql? HOT 3
- Support for WASM target HOT 2
- Unable to link under Linux HOT 7
- Native driver does not respect isReadOnly HOT 9
- Uncaught Kotlin exception: com.ctrip.sqllin.driver.SQLiteResultCode: error rawExecSql: PRAGMA user_version = 1;, attempt to write a readonly database | error code SQLITE_READONLY HOT 8
- Long在ksp阶段有问题,生成的代码无法通过编译 HOT 2
- (Feature Request)有计划提供执行原生sql的api吗? HOT 7
- Update Kotlin version: 1.9.20 -> 1.9.21 HOT 1
- org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'kspMainMetadata' not found. HOT 1
- 自增主键ID问题 HOT 2
- 我按照说明文档一步一步进行,但无法正常使用 HOT 18
- 关于实体类里的字段数量不能比表中的列数多的问题 HOT 1
- How to nore the columns in model HOT 1
- 在桌面平台上没有找到数据库 HOT 5
- 要存入或要查询的字符串中包含 ' 符号会报错 unrecognized token,这个要怎么解决 HOT 2
- Supported Multiplatform unit tests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqllin.