Delight SQL Viewer: отладка SQLDelight-базы прямо в приложении

Привет! Хочу поделиться инструментом, который значительно упростит жизнь тем, кто использует SQLDelight для работы с базами данных в Kotlin Multiplatform-проектах. Этот инструмент называется Delight SQL Viewer .

https://habr.com/ru/articles/886214/

#kotlin_multiplatform #sqldelight #compose_multiplatform #sqlite

Delight SQL Viewer: отладка SQLDelight-базы прямо в приложении

Привет! Хочу поделиться инструментом, который может существенно упростить жизнь тем, кто использует SQLDelight для работы с базами данных в Kotlin Multiplatform-проектах. Этот инструмент называется...

Хабр
Worked a bit this weekend on my side project, and was able to get a working #sqldelight setup going. I now have data wired from the db to the UI! Feels good! It would be nice to drop it into the app stores by the Oscars. #JetpackCompose #kmp #android

Migrate from ROOM Database to SQLDelight 2

In this episode, I refactor a codebase and migrate it from #Room to the #SQLDelight database.

#Kotlin #Android
https://youtu.be/A7bWCrCXijw

Migrate from ROOM Database to SQLDelight 2

YouTube

TIL #SQLDelight ships with a `LogSqliteDriver` that wraps a given driver and enhances it with the capabilities to log the queries being made against it, which is incredibly helpful when trying to debug excessive database reads.

https://github.com/cashapp/sqldelight/blob/66b036c3aa166853b5e225cafba3107fbdd387bc/runtime/src/commonMain/kotlin/app/cash/sqldelight/logs/LogSqliteDriver.kt

#AndroidDev

sqldelight/runtime/src/commonMain/kotlin/app/cash/sqldelight/logs/LogSqliteDriver.kt at 66b036c3aa166853b5e225cafba3107fbdd387bc · cashapp/sqldelight

SQLDelight - Generates typesafe Kotlin APIs from SQL - cashapp/sqldelight

GitHub

I had an awesome time with Anton Arhipov at the webinar!

I think quite some interesting content on #kotlin with #JetBrains #Ktor, #SqlDelight, #ArrowKt, etc

We build an entire feature live, and discussed context receivers!

The repo in discussing can be found here (participating #hacktoberfest): https://github.com/nomisRev/ktor-arrow-example

https://www.youtube.com/watch?v=g79A6HmbW5M

GitHub - nomisRev/ktor-arrow-example: Real World implementation - "The mother of all demo apps". Written in Kotlin, with Ktor, Arrow, SqlDelight, KotlinX Serialization, etc.

Real World implementation - "The mother of all demo apps". Written in Kotlin, with Ktor, Arrow, SqlDelight, KotlinX Serialization, etc. - GitHub - nomisRev/ktor-arrow-example: Real World ...

GitHub

My comment about a #scala #typelevel catseffect porting of some idiomatic #fsharp gist...

Being isomorphic full-stack: from #javascript transpiler to #sql provider... Hence I would prefer the type safe version with #SqlDelight for Kotlin of @vergauwen_simon

https://gist.github.com/giuliohome/2a93efd36de6176df10bce0db2a292a7?permalink_comment_id=4709580#gistcomment-4709580

Sample gist showing how to run a HTTP server with Typelevel Scala libraries, and a postgres docker container

Sample gist showing how to run a HTTP server with Typelevel Scala libraries, and a postgres docker container - scala-http-postgres-html-docker.scala

Gist

Are you ready for #Hacktoberfest!?

I've prepared my #JetBrains #Ktor #ArrowKt
example with #SqlDelight
#testcontainers and #kotest in #Kotlin with 19 issues for hacktoberfest!

I'll be giving personal guidance to everyone wanting to learn, and contribute.

https://github.com/nomisRev/ktor-arrow-example

GitHub - nomisRev/ktor-arrow-example: Real World implementation - "The mother of all demo apps". Written in Kotlin, with Ktor, Arrow, SqlDelight, KotlinX Serialization, etc.

Real World implementation - "The mother of all demo apps". Written in Kotlin, with Ktor, Arrow, SqlDelight, KotlinX Serialization, etc. - GitHub - nomisRev/ktor-arrow-example: Real World ...

GitHub
Which might raise the question "why do the fetch w/ dynamic bindings here" if it can be statically generated?
This is because Lighter currently doesn't parse SQL (to be fixed) but relies on the #SQLite database schema and hence still has to construct queries dynamically. The same static optimization can be applied for dynamic query parameters once we can parse SQL SELECTs. Similar to #SQLDelight, demoed here. https://github.com/cashapp/sqldelight
GitHub - cashapp/sqldelight: SQLDelight - Generates typesafe Kotlin APIs from SQL

SQLDelight - Generates typesafe Kotlin APIs from SQL - GitHub - cashapp/sqldelight: SQLDelight - Generates typesafe Kotlin APIs from SQL

GitHub

I'm working on a #Kotlin #KMM app that uses #SQLDelight for #multiplatform database support. Foreign key constraints aren't enabled by default in #sqlite3, and it's neither documented nor obvious how to enable them in the SQLDelight platform-specific drivers.

So, I created https://github.com/cashapp/sqldelight/discussions/3681 to document how I did it, and to help others who might need to do this as well.

Document enabling foreign keys for the SQLDelight Multiplatform drivers · Discussion #3681 · cashapp/sqldelight

SQLite3 does not enable foreign key constraints by default. There isn't a well-documented way to do this for the SQLDelight Multiplatform drivers that I could find. The issue at #1406 has a few...

GitHub

#Kotlin 1.7.21 is rolling out 🥳

It might be a small release with mostly bug fixes, but this seems significant to me 😍 MPP is moving forward 💪

"KT-54387 - Remove MPP alpha stability warning"

I've been playing with the eco-system, and got a #Ktor server running on Linux & Mac with #ArrowKt #postgresql powered by #SqlDelight.

https://github.com/nomisRev/ktor-native-server

GitHub - nomisRev/ktor-native-server: Example of Ktor server for Linux & MacOs using SqlDelight with Postgres and Arrow

Example of Ktor server for Linux & MacOs using SqlDelight with Postgres and Arrow - GitHub - nomisRev/ktor-native-server: Example of Ktor server for Linux & MacOs using SqlDelight with Post...

GitHub