Module telegram-bot-lua.adapters.db

database adapter supporting SQLite and PostgreSQL.

[[

Functions

api.db.connect(opts) create a database connection.


Functions

api.db.connect(opts)
create a database connection.

Parameters:

  • opts table connection options
    • driver string database driver: 'sqlite' or 'postgres'
    • path string SQLite database file path (sqlite only)
    • host string PostgreSQL host (postgres only)
    • port number PostgreSQL port (postgres only)
    • database string PostgreSQL database name (postgres only)
    • user string PostgreSQL username (postgres only)
    • password string PostgreSQL password (postgres only)

Returns:

    table connection object with execute, query, close methods
generated by LDoc 1.5.0 Last updated 2026-04-07 21:37:15