Vital.sandbox
Database

self:is_type

Server

Checks whether the instance belongs to the specified type


Syntax

local result = self: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")

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

On this page