Skip to content

Database

This page documents hooks in the database category.


OnDatabaseLoaded()View Source

Purpose

Runs after core database tables finish loading, database fields are checked, `lia.db.tablesLoaded` is set, and follow-up configuration, interaction, and item synchronization timers are scheduled.

Category

Database

Realm

Server

Example Usage

  hook.Add("OnDatabaseLoaded", "liaExampleOnDatabaseLoaded", function()
      lia.db.selectOne("*", "players", nil, 1):next(function(row)
          PrintTable(row or {})
      end)
  end)

OnLoadTables()View Source

Purpose

Runs immediately after the core table creation query is submitted by `lia.db.loadTables`.

Category

Database

Realm

Server

Example Usage

  hook.Add("OnLoadTables", "liaExampleOnLoadTables", function()
      print("Database table creation query was submitted.")
  end)