Column
extends AbstractFormatter
in package
Schema column formatter class
Tags
Table of Contents
Methods
- formatColumn() : string
- Format column
- formatCommonParameters() : string
- Format common column parameters
- formatMysqlColumn() : string
- Format MySQL column
- formatPgsqlColumn() : string
- Format PostgreSQL column
- formatSqliteColumn() : string
- Format SQLite column
- formatSqlsrvColumn() : string
- Format SQL Server column
- getColumnSchema() : string
- Get column schema
- getValidDataType() : string
- Get valid column data type
- getValidMysqlDataType() : string
- Get valid MySQL data type
- getValidPgsqlDataType() : string
- Get valid PostgreSQL data type
- getValidSqliteDataType() : string
- Get valid SQLite data type
- getValidSqlsrvDataType() : string
- Get valid SQL Server data type
- unquoteId() : string
- Un-quote identifier
Methods
formatColumn()
Format column
public
static formatColumn(string $dbType, string $name, string $dataType, array<string|int, mixed> $column, string $table) : string
Parameters
- $dbType : string
- $name : string
- $dataType : string
- $column : array<string|int, mixed>
- $table : string
Tags
Return values
stringformatCommonParameters()
Format common column parameters
public
static formatCommonParameters(string $columnString, array<string|int, mixed> $column) : string
Parameters
- $columnString : string
- $column : array<string|int, mixed>
Return values
stringformatMysqlColumn()
Format MySQL column
public
static formatMysqlColumn(string $name, string $dataType, array<string|int, mixed> $column) : string
Parameters
- $name : string
- $dataType : string
- $column : array<string|int, mixed>
Return values
stringformatPgsqlColumn()
Format PostgreSQL column
public
static formatPgsqlColumn(string $name, string $dataType, array<string|int, mixed> $column, string $table) : string
Parameters
- $name : string
- $dataType : string
- $column : array<string|int, mixed>
- $table : string
Return values
stringformatSqliteColumn()
Format SQLite column
public
static formatSqliteColumn(string $name, string $dataType, array<string|int, mixed> $column) : string
Parameters
- $name : string
- $dataType : string
- $column : array<string|int, mixed>
Return values
stringformatSqlsrvColumn()
Format SQL Server column
public
static formatSqlsrvColumn(string $name, string $dataType, array<string|int, mixed> $column) : string
Parameters
- $name : string
- $dataType : string
- $column : array<string|int, mixed>
Return values
stringgetColumnSchema()
Get column schema
public
static getColumnSchema(string $dbType, string $name, array<string|int, mixed> $column, string $table) : string
Parameters
- $dbType : string
- $name : string
- $column : array<string|int, mixed>
- $table : string
Tags
Return values
stringgetValidDataType()
Get valid column data type
public
static getValidDataType(string $dbType, string $type) : string
Parameters
- $dbType : string
- $type : string
Return values
stringgetValidMysqlDataType()
Get valid MySQL data type
public
static getValidMysqlDataType(string $type) : string
Parameters
- $type : string
Return values
stringgetValidPgsqlDataType()
Get valid PostgreSQL data type
public
static getValidPgsqlDataType(string $type) : string
Parameters
- $type : string
Return values
stringgetValidSqliteDataType()
Get valid SQLite data type
public
static getValidSqliteDataType(string $type) : string
Parameters
- $type : string
Return values
stringgetValidSqlsrvDataType()
Get valid SQL Server data type
public
static getValidSqlsrvDataType(string $type) : string
Parameters
- $type : string
Return values
stringunquoteId()
Un-quote identifier
public
static unquoteId(string $identifier) : string
Parameters
- $identifier : string