# How to work with Nakama's database from module

**URL:** <https://forum.heroiclabs.com/t/how-to-work-with-nakamas-database-from-module/2224>\
**Category:** Runtime Framework\
**Tags:** golang\
**Created:** [December 31, 2021, 6:32pm UTC](https://forum.heroiclabs.com/t/how-to-work-with-nakamas-database-from-module/2224 "2021-12-31T18:32:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalmatele](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/dalmatele/32/931_2.png) [@dalmatele](https://forum.heroiclabs.com/u/dalmatele)\
**Post date:** [December 31, 2021, 6:32pm UTC](https://forum.heroiclabs.com/t/how-to-work-with-nakamas-database-from-module/2224/1 "2021-12-31T18:32:46Z")

</div>

Hi,  
I want to work with Nakama’s database from my module, for ex: delete notifications by using some conditions. How should I do with Go module.  
When I search in forum, I saw an example in Lua:  
nk.sql\_exc  
But no clue for Go.  
Thanks,

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [January 3, 2022, 2:02pm UTC](https://forum.heroiclabs.com/t/how-to-work-with-nakamas-database-from-module/2224/2 "2022-01-03T14:02:11Z")

</div>

@dalmatele The Go runtime framework we’ve provided which hooks into Nakama already exposes the `*sql.DB` type which is all you need to create SQL queries and execute them against the database. Have a look at the standard Go documentation for the `database/sql` package:

[sql package - database/sql - pkg.go.dev](https://pkg.go.dev/database/sql)

Be careful with the SQL queries you write because if they do not access an index efficiently you will affect the rest of the performance of the game server. Are you sure it wouldn’t just be simpler to have the game clients programmatically delete notifications that match the conditions you have for when you want users to not see them anymore?

Hope this helps.
