Announcing SQLDelight 1.0

Alec Strong
Jan 8, 2019 · 2 min read
Image for post
Image for post
-- src/main/sqldelight/com/sample/TennisPlayer.sqCREATE TABLE TennisPlayer(
name TEXT,
points INTEGER,
plays TEXT AS Handedness
);
insert:
INSERT INTO TennisPlayer
VALUES (?, ?, ?);
top10:
SELECT *
FROM TennisPlayer
ORDER BY points DESC
LIMIT 10;
val tennisPlayers: TennisPlayerQueriestennisPlayers.insert("Naomi Osaka", 5270, Handedness.RIGHT)
tennisPlayers.insert("Aryna Sabalenka", 3365, Handedness.RIGHT)
tennisPlayers.insert("Simona Halep", 6641, Handedness.RIGHT)
val top10: List<TennisPlayer> = tennisPlayers.top10()
.executeAsList()
println(top10[0].name) // prints "Simona Halep"

Square Corner Blog

Buying and selling sound like simple things - and they…

Thanks to Egor Andreevich, Jake Wharton, and Jesse Wilson

Alec Strong

Written by

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Alec Strong

Written by

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store