Schema
in package
Database schema class
This class is responsible for retrieving and managing database schema information.
Tags
Table of Contents
- $db : Driver
- Database object
- $tables : array<string|int, mixed>
- List of loaded schemas
- create() : static
- Create Schema Class
- fields() : array<string|int, mixed>
- Get the field names of a table
- init() : mixed
- Initialize the schema data for a table
Properties
$db
Database object
private
Driver
$db
$tables
List of loaded schemas
private
array<string|int, mixed>
$tables
= []
Methods
create()
Create Schema Class
public
static create(Driver $db) : static
Parameters
- $db : Driver
-
The database driver object
Return values
static —fields()
Get the field names of a table
public
fields(string $table) : array<string|int, mixed>
Retrieve all field names in the specified table.
Parameters
- $table : string
-
The table name
Tags
Return values
array<string|int, mixed> —The array of field names
init()
Initialize the schema data for a table
private
init(string $table) : mixed
Parameters
- $table : string
-
The table name