© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
A. LilleaasPro Kotlin Web Apps from Scratchhttps://doi.org/10.1007/978-1-4842-9057-6_6

6. Querying a SQL Database

August Lilleaas1  
(1)
Oslo, Norway
 

In Chapter 5, you set up a data source for managing connections to your database, and you configured Flyway to manage your database schema so that you have some tables in which you can execute queries. In this chapter, you’ll learn how to execute those queries.

If you’re new to Kotlin, here are some language features that you’ll see examples of in this chapter:
  • Null-safe casting and type checks of dynamic data

  • Companion objects in data classes

  • Generic types in plain Kotlin functions

Also in this chapter, you will learn ...

Get Pro Kotlin Web Apps from Scratch: Building Production-Ready Web Apps Without a Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.