<https://www.youtube.com/watch?v=6DgCLeu8In8> :ro...
# feed
a

https://www.youtube.com/watch?v=6DgCLeu8In8▾

🚀 Say Hello to ExoQuery! 🚀 The first Kotlin Multiplatform Language-Integrated SQL Querying System. ExoQuery lets you use regular Kotlin syntax to build SQL queries. Why should querying databases be any harder than traversing an array!? ✨ Why ExoQuery? • SQL at Compile Time: Forget runtime surprises—your queries are generated at compile time! • Language Integrated: No more clunky table aliases,
eq
or
Case().when
. • Use Regular Kotlin:
==
,
if
,
when
, Elvis operators—write SQL like you write Kotlin. • Cross-Platform Power: JVM, Native iOS, Android, Linux, Windows, MacOS, and more! • Composable & Functional: Build complex queries with ease. 💡 Example Query:
Copy code
capture.select {
  val p = from(people)
  val a = join(addresses) { a -> a.owner == p.id }
  p.name to a.street
}

//> SELECT p.name, a.street FROM Person p 
//  JOIN addresses a ON a.owner == p.id
🔥*Why Wait?* Write less boilerplate, get more done, and have fun doing it. Try ExoQuery today! 👉 GitHub
🔥 14
❤️ 1
K 13
p
The power of compiler plugins, awesome 😊
👍 1
r
This is very interesting. Do you see this as an alternative to something like Exposed, or is it meant to be used in conjunction?
a
Alternative in many cases, conjunction in some. Also, I have plans to integrate with Spring.
Also, ExoQuery fully supports Kotlin Multiplatform which Exposed does not.
👍 3
s
@Alexander Ioffe This looks really nice. I’m trying to convert some exposed queries to exoquery. Does it support upsert?
a
You mean Postgres OnConflict? I don’t have that done yet but I’m working on it. I’ll have it in 2-3 weeks.
thank you color 1
a
My syntax is going to be closer to the SQL. Something like:
Copy code
capture {
  insert {
    set(name to …).onConflictUpdate(id, …) { excluded -> set(name to excluded.name, …) }
  }
}