world.DatabaseList

MUSHclient script function (Method) — introduced in version 4.40

Lists all databases

Prototype

VARIANT DatabaseList();

Data type meanings

Description

This returns a list of all databases created for this world. You could use this to find which databases have been created, and then use DatabaseInfo to find information about each one.

Lua example

-- show all databases
databases = DatabaseList()

if databases then
  for _, v in ipairs (databases) do 
    Note (v) 
  end
end -- if any

Lua notes

Lua returns nil if there are no databases.

Return value

If there are no databases then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the names of all the databases. Use "ubound" to find the number of databases in the list. You can then use "DatabaseInfo" to find details about each database.

Related topic

Database (SQLite)

See also

FunctionDescription
DatabaseInfoReturns information about a database