Database connectivity for the Lua programming language


LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to:

  • Connect to ODBC, ADO, Oracle, MySQL, SQLite and PostgreSQL databases;
  • Execute arbitrary SQL statements;
  • Retrieve results in a row-by-row cursor fashion.

LuaSQL is free software and uses the same license as Lua 5.1.


LuaSQL version 2.2.0 (for Lua 5.1) is now available for download. For more details on the features list please check the product history.


LuaSQL can be installed using LuaRocks. You can also download the source code for LuaSQL from Github.


LuaSQL 2.x

Version 2.1 and 2.0 were redesigned by Roberto Ierusalimschy, André Carregal and Tomás Guisasola as part of the Kepler Project. The implementation was coded by Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas and Danilo Tuler, with many contributions from Michael Broughton, Tiago Dionizio, Leonardo Godinho, Pedro Maia, Klaus Ripke, Michael Roth and others.

LuaSQL 1.0

LuaSQL was originally designed by Pedro Miller Rabinovitch and Roberto Ierusalimschy. The first implementation was compatible with Lua 4.0a. Many modifications were made but not distributed by Diego Nehab (ODBC), Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).

LuaSQL development was sponsored by Fábrica Digital, FINEP and CNPq.

Contact us

For more information please contact us. Comments are welcome!

You can also reach other Kepler developers and users on the Kepler Project mailing list.

Valid XHTML 1.0!

$Id: manual.html,v 1.24 2007/08/27 21:46:04 carregal Exp $