library zend-db-schema-info
Database Schema information provider for zend framework
gevman/zend-db-schema-info
Database Schema information provider for zend framework
- Friday, March 2, 2018
- by gevorgmansuryan
- Repository
- 1 Watchers
- 6 Stars
- 19 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
Zend Db Schema Info
Installation
composer require gevman/zend-db-schema-info
Available methods
string[] Schema::getTables(void)
Returns table list, (*1)
example
$schema = new Schema($container->get(\Zend\Db\Adapter\Adapter::class));
var_dump($schema->getTables());
ColumnEntity[] Schema::getTableColumns(string $table)
Returns list of information data objects for all columns in specified table, (*2)
example
$schema = new Schema($container->get(\Zend\Db\Adapter\Adapter::class));
var_dump($schema->getTableColumns('users));
Data Object ColumnEntity definition, (*3)
-
string $name - name of this column (without quotes).
-
bool $allowNull - whether this column can be null.
-
string $type - abstract type of this column. Possible abstract types include: char, string, text, boolean, smallint, integer, bigint, float, decimal, datetime, timestamp, time, date, binary, and money.
-
string $phpType - string the PHP type of this column. Possible PHP types include: string, boolean, integer, double.
-
string $dbType - the DB type of this column. Possible DB types vary according to the type of DBMS.
-
mixed $defaultValue - default value of this column
-
array $enumValues - enumerable values. This is set only if the column is declared to be an enumerable type.
-
int $size - display size of the column.
-
int $precision - precision of the column data, if it is numeric.
-
int $scale - scale of the column data, if it is numeric.
-
bool $isPrimaryKey - whether this column is a primary key
-
bool $autoIncrement - whether this column is auto-incremental
-
bool $unsigned - bool whether this column is unsigned. This is only meaningful when [[type]] is smallint, integer or bigint.
-
string $comment - comment of this column. Not all DBMS support this.
dev-master
9999999-dev
Database Schema information provider for zend framework
Sources
Download
BSD-3-Clause
The Requires
by
Gevorg Mansuryan
0.2.1
0.2.1.0
Database Schema information provider for zend framework
Sources
Download
BSD-3-Clause
The Requires
by
Gevorg Mansuryan
0.2
0.2.0.0
Database Schema information provider for zend framework
Sources
Download
BSD-3-Clause
The Requires
by
Gevorg Mansuryan
0.1
0.1.0.0
Database Schema information provider for zend framework
Sources
Download
BSD-3-Clause
The Requires
by
Gevorg Mansuryan