Building an Application With Go and SQLite

Today we're going to learn how to use SQLite with Go. By the time you finish this tutorial, you can easily build CRUD (Create Read Update Delete) applications with Go.

Go is one of the hottest languages in development right now, known for its simple structure and blazing performance. SQLite has been trending among developers for its ability to host small data very quickly, safely, and contained in a single file.

How We Compiled a Golang Database in the Browser Using WebAssembly

How We Compiled a Golang Database in the Browser Using WebAssembly

As Queeny Jin mentioned in her article, , we compiled TiDB into an in-browser database using WebAssembly (Wasm). We’re very proud of this pilot project because it opens a door to an entirely new world for both Golang and Wasm:

  • It is probably the first Golang database that’s been compiled to Wasm. As “Golang weekly (issue 287)” put it, “The author wonders if a database like TiDB written in Go can run in a web browser, but what about other complex Go apps? Go’s WebAssembly future is looking quite positive.”
  • Besides SQLite, Wasm has one more database example that can run inside the browser. As Database Weekly (issue 279) put it, ”If a database like TiDB written in Go can run in the browser, what about other complex Go apps or other database systems?”
You may also be interested in:  Golang Tutorial: Learn Golang by Examples

What’s most exciting is that beginning database users now have an easy way to learn to write SQL statements or test new databases. They don’t have to download an entire database and go through the complex setup and configuration process to be able to write SQL. They can simply point their browser to https://tour.tidb.io/, wait a few seconds for the TiDB database to load, and then start to write SQL statements.