{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type Row = { [string]: number | string | buffer | boolean | nil }",
          "name": "Row",
          "tags": [],
          "source": {
            "path": "",
            "line": 37
          },
          "fields": [],
          "desc": "A row returned from a query. Keys are column names, values are the\ncorresponding column values (number, string, buffer, or nil)."
        }
      ],
      "name": "@eryx/sqlite3",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 138
          },
          "is_method": false,
          "signature": "sqlite3.open(path: string) → Database",
          "owner": "sqlite3",
          "desc": "Opens (or creates) a SQLite database at the given path.\nUse `\":memory:\"` for an in-memory database.",
          "tags": [],
          "name": "open",
          "return_str": "Database",
          "function_type": "Function",
          "errors": [
            {
              "desc": "Throws if the database cannot be opened. "
            }
          ],
          "returns": [
            {
              "lua_type": "Database",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 143
          },
          "is_method": false,
          "signature": "sqlite3.version() → string",
          "owner": "sqlite3",
          "desc": "Returns the SQLite library version string (e.g. `\"3.52.0\"`).",
          "tags": [],
          "name": "version",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "SQLite3 module – embedded relational database.\n\nWraps the SQLite3 C library to provide full SQL database access from Luau.\n\n## Quick start\n```luau\nlocal sqlite3 = require(\"@eryx/sqlite3\")\nlocal db = sqlite3.open(\":memory:\")\ndb:exec(\"CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)\")\ndb:exec(\"INSERT INTO users VALUES (1, 'Alice', 30)\")\n\nlocal rows = db:query(\"SELECT * FROM users WHERE age > ?\", 25)\nfor _, row in rows do\n    print(row.name, row.age)\nend\n\n Prepared statements for repeated queries\nlocal stmt = db:prepare(\"INSERT INTO users VALUES (?, ?, ?)\")\nstmt:run(2, \"Bob\", 25)\nstmt:run(3, \"Charlie\", 35)\n\n Transactions: all-or-nothing batch operations\ndb:transaction(function(db)\n    db:exec(\"INSERT INTO users VALUES (?, ?, ?)\", 4, \"Diana\", 28)\n    db:exec(\"INSERT INTO users VALUES (?, ?, ?)\", 5, \"Eve\", 32)\nend)\n\ndb:close()\n```\n"
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 46
      },
      "tags": [],
      "properties": [],
      "desc": "A prepared SQL statement.\n\nStatements are compiled once and can be executed multiple times with\ndifferent parameters. They are automatically finalized by the garbage\ncollector.\n",
      "name": "Statement",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 50
          },
          "is_method": true,
          "signature": "Statement:bind() → Statement",
          "desc": "Resets the statement and binds new parameters (positional).\nReturns the statement for chaining.",
          "tags": [],
          "name": "bind",
          "return_str": "Statement",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "Statement",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 53
          },
          "is_method": true,
          "signature": "Statement:step() → Row?",
          "desc": "Fetches the next result row, or `nil` when no more rows remain.",
          "tags": [],
          "name": "step",
          "return_str": "Row?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "Row?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 57
          },
          "is_method": true,
          "signature": "Statement:reset() → Statement",
          "desc": "Resets the statement so it can be stepped again from the\nbeginning (without changing bindings).",
          "tags": [],
          "name": "reset",
          "return_str": "Statement",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "Statement",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 61
          },
          "is_method": true,
          "signature": "Statement:all() → { Row }",
          "desc": "Convenience: resets, binds parameters, and returns all result\nrows as an array of [[Row]] tables.",
          "tags": [],
          "name": "all",
          "return_str": "{ Row }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ Row }",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 65
          },
          "is_method": true,
          "signature": "Statement:run() → ()",
          "desc": "Convenience: resets, binds parameters, and executes the\nstatement discarding any results.  Use for INSERT/UPDATE/DELETE.",
          "tags": [],
          "name": "run",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [
        {
          "signature": "Statement:__tostring() → string",
          "name": "__tostring",
          "desc": ""
        }
      ],
      "types": []
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 80
      },
      "tags": [],
      "properties": [],
      "desc": "An open SQLite database connection.\n\nThe connection holds a file lock (or memory) and should be closed when\nno longer needed. It is also closed automatically by the garbage\ncollector, but explicit `Close()` is recommended to release the file\nlock promptly.\n",
      "name": "Database",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 87
          },
          "is_method": true,
          "signature": "Database:exec(sql: string) → ()",
          "desc": "Executes one or more SQL statements that return no results\n(DDL, INSERT, UPDATE, DELETE, etc.).  Multiple statements\nseparated by `;` are supported.\n",
          "tags": [],
          "name": "exec",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "sql",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 93
          },
          "is_method": true,
          "signature": "Database:query(sql: string) → { Row }",
          "desc": "Executes a SQL query with optional positional parameters and\nreturns all result rows as an array of [[Row]] tables.\n",
          "tags": [],
          "name": "query",
          "return_str": "{ Row }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ Row }",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "sql",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 96
          },
          "is_method": true,
          "signature": "Database:prepare(sql: string) → Statement",
          "desc": "Compiles a SQL string into a reusable prepared [[Statement]].",
          "tags": [],
          "name": "prepare",
          "return_str": "Statement",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "Statement",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "sql",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 99
          },
          "is_method": true,
          "signature": "Database:close() → ()",
          "desc": "Explicitly closes the database connection.  Safe to call multiple times.",
          "tags": [],
          "name": "close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 102
          },
          "is_method": true,
          "signature": "Database:isOpen() → boolean",
          "desc": "Returns `true` if the database connection is still open.",
          "tags": [],
          "name": "isOpen",
          "return_str": "boolean",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "boolean",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 105
          },
          "is_method": true,
          "signature": "Database:lastInsertId() → number",
          "desc": "Returns the rowid of the last successful INSERT.",
          "tags": [],
          "name": "lastInsertId",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 108
          },
          "is_method": true,
          "signature": "Database:changes() → number",
          "desc": "Returns the number of rows changed by the last INSERT, UPDATE, or DELETE statement.",
          "tags": [],
          "name": "changes",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 124
          },
          "is_method": true,
          "signature": "Database:transaction(fn: ((db: Database) → T...)) → T...",
          "desc": "Wraps a function in a SQL transaction (BEGIN/COMMIT).\n\nIf `fn` succeeds, the transaction is committed and its return\nvalues are forwarded.  If `fn` throws, the transaction is rolled\nback and the error is re-raised.\n\n```luau\ndb:transaction(function(db)\n    db:exec(\"INSERT INTO users VALUES (?, ?)\", 1, \"Alice\")\n    db:exec(\"INSERT INTO users VALUES (?, ?)\", 2, \"Bob\")\nend)\n```\n",
          "tags": [],
          "name": "transaction",
          "return_str": "T...",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "T...",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "((db: Database) → T...)",
              "name": "fn",
              "desc": ""
            }
          ]
        }
      ],
      "metamethods": [
        {
          "signature": "Database:__tostring() → string",
          "name": "__tostring",
          "desc": ""
        }
      ],
      "types": []
    }
  ]
}