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 |
schema::table::exists
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) -> boolThe following example shows this function, and its output:
-- Setup
DEFINE TABLE person;
schema::table::exists('person');
//- true
schema::table::exists('missing');
//- false