# Kwery: An SQL library for Kotlin

**URL:** <https://discuss.kotlinlang.org/t/kwery-an-sql-library-for-kotlin/330>\
**Category:** Uncategorized\
**Created:** [February 21, 2015, 7:15pm UTC](https://discuss.kotlinlang.org/t/kwery-an-sql-library-for-kotlin/330 "2015-02-21T19:15:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewoma](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrewoma](https://discuss.kotlinlang.org/u/andrewoma)\
**Post date:** [February 21, 2015, 7:15pm UTC](https://discuss.kotlinlang.org/t/kwery-an-sql-library-for-kotlin/330/1 "2015-02-21T19:15:26Z")

</div>

Hi all,

I’ve just released Kwery, an SQL library for Kotlin at [https://github.com/andrewoma/kwery](https://github.com/andrewoma/kwery)

The core is a thin wrapper over JDBC. e.g.

```kotlin

```

It also includes mapping functionality, including standard CRUD operations via DAOs. e.g.

```kotlin

```

Finally, there’s a module for efficient fetching of object graphs - see the github README ([https://github.com/andrewoma/kwery](https://github.com/andrewoma/kwery)) for more information.

The usual warnings apply - it’s under active development, unstable and probably bug ridden.

However, I’m fairly happy with the direction it’s heading. The table definition is fairly terse yet flexible. The design supports immutable objects (key for me) and partial selects.

Kwery uses a bunch of Kotlin features (reified generics, delegated properties and callable references) and it all seems to work - kudos to the Kotlin devs!

Anyway, I thought others might find it useful or interesting - any feedback is welcome.

Cheers,  
Andrew

---

<div class="post-metadata">

**Author:** ![oshai](https://avatars.discourse-cdn.com/v4/letter/o/85e7bf/32.png) [@oshai](https://discuss.kotlinlang.org/u/oshai)\
**Post date:** [December 12, 2016, 9:50pm UTC](https://discuss.kotlinlang.org/t/kwery-an-sql-library-for-kotlin/330/2 "2016-12-12T21:50:56Z")

</div>

looks like a great lib! what is the development status?  
Where can I find more info about establishing a connection? and how to “bind” it to the session?

---

<div class="post-metadata">

**Author:** ![andrewoma](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@andrewoma](https://discuss.kotlinlang.org/u/andrewoma)\
**Post date:** [December 12, 2016, 11:10pm UTC](https://discuss.kotlinlang.org/t/kwery-an-sql-library-for-kotlin/330/3 "2016-12-12T23:10:29Z")

</div>

Hi,

Development is pretty much on hold at the moment as I’ve recently had a baby and free time is scarce. 😉

I will however fix bugs and respond to queries etc.

As to establishing a connection see: [kwery/README.md at master · andrewoma/kwery · GitHub](https://github.com/andrewoma/kwery/blob/master/core/README.md)

`ThreadLocalSession` is usually the best choice for obtaining a session from a `DataSource`.

Cheers,  
Andrew
