Skip to content

Functions

/

Database functions

Schema

Schema functions

These functions inspect the schema of the current database.

Function

Description

schema::table::exists()

Checks if a table is defined in the current database

The schema::table::exists function checks if a table is defined in the current database. It returns true for a table created with DEFINE TABLE, and false for any other name.

API DEFINITION
schema::table::exists(string) -> bool

The following example shows this function, and its output:

-- Setup
DEFINE TABLE person;

schema::table::exists('person');
//- true

schema::table::exists('missing');
//- false

Was this page helpful?

Last updated