Skip to content

classes_essentials_model_tableschema.class

Daniel Spors edited this page Dec 19, 2023 · 2 revisions

Classes in file essentials/model/tableschema.class.php

class TableSchema

Schema of a database table.

ColumnNames

Returns a list of column names.

Definition: public function ColumnNames()

Returns: array All column names

GetColumn

Returns the ColumnSchema object for the given column name.

Definition: public function GetColumn($column_name)

Returns: ColumnSchema|false The column or false if not found

Parameters:

  • string $column_name Column name

HasColumn

Checks if the given column exists.

Definition: public function HasColumn($column_name)

Returns: bool true or false

Parameters:

  • string $column_name Column to check

PrimaryColumnNames

Returns all columns that belong to the primary key.

Definition: public function PrimaryColumnNames()

Returns: array All PK columns

TypeOf

Gets the type of a column.

Definition: public function TypeOf($column_name)

Returns: string Type identifier

Parameters:

  • string $column_name Column name to get type for
Clone this wiki locally