Vital.sandbox
Database

db_query:is_type

Server

Checks whether the instance belongs to the specified type


Syntax

local result = db_query:is_type(name)

Parameters

TypeNameDescription
stringnameType to check against

Returns

TypeNameDescription
boolresulttrue if the instance matches the given type, false otherwise

Examples

local db = database.create("127.0.0.1", "root", "", "vital_sandbox")
local query = db:table("players")

engine.print("info", db:is_type("db_query")) --true
engine.print("info", db:is_type("database")) --false

On this page