LibESQL (1.0.0)
LibESQL
Query ESO game data with SQL.
Source code on GitHub
LibESQL is a library for add-on authors. It turns the game’s data into tables you can query with plain SQL: every ability id, skills and morphs, champion stars, scribing, live buffs and debuffs, every set with its bonuses and pieces, every item id, your inventory, achievements, collectibles, quests, zones, POIs, wayshrines, dungeons, the game’s constants and strings, and more. That’s 49 tables in all.
local res = LibESQL.Query(“SELECT id, name, duration_ms FROM abilities WHERE name LIKE ?”, { params = { “%whip%” } })
for _, s in ipairs(LibESQL.Select(“SELECT s.name, b.description FROM sets s JOIN set_bonuses b ON b.set_id = s.id WHERE b.description LIKE ?”, { “%critical%” })) do
d(s.name .. “: ” .. s.description)
end
Features
Real SQL: SELECT, JOIN / LEFT JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, DISTINCT, subqueries, CASE, CAST, ? parameters, aggregates and over 60 functions
No hitching: QueryAsync spreads big queries over frames
Every ability and item id: found by a one-time background scan, saved until the next game update
Fast: lookups by key, hash joins, and columns read from the game only when a query uses them
Extensible: register your own tables and SQL functions; they work in every query
Optional data collection: a combat log and a list of every effect id you’ve seen
PC/Mac and console: smaller memory and per-frame budgets on console
No dependencies
For players
On its own the library does nothing visible. Install ESQL for an in-game query window (/esql on PC, Settings > Addons > ESQL on console).
For authors
Add this to your manifest:
## DependsOn: LibESQL>=10000
GitHub repository: source, issues and pull requests
API Reference.md (included, and on GitHub): every function, every table and column, and the full SQL dialect
LibESQL-Examples (on GitHub): ten ready-to-install example add-ons, including a console settings panel
Quick API
LibESQL.Query(sql, opts): a result, or nil + error text
LibESQL.QueryAsync(sql, callback, opts): runs in the background
LibESQL.Select(sql, params): rows as objects
LibESQL.Scalar(sql, params): a single value
LibESQL.RegisterTable(def) and LibESQL.RegisterFunction(name, fn)
LibESQL.Scan(“abilities” | “items”, callback)
Tips
The first query on abilities or items indexes every id. Run it with QueryAsync or Scan, not Query.
Use ? parameters for any text players type.
Run SHOW TABLES and DESCRIBE

