gevman / zend-db-schema-info
Database Schema information provider for zend framework
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/gevman/zend-db-schema-info
Requires
- php: >=7.1
- zendframework/zend-db: ^2.9
This package is auto-updated.
Last update: 2025-10-21 05:06:58 UTC
README
Database Schema information provider for zend framework
Installation
composer require gevman/zend-db-schema-info
Available methods
string[] Schema::getTables(void)
Returns table list
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
example
$schema = new Schema($container->get(\Zend\Db\Adapter\Adapter::class)); var_dump($schema->getTableColumns('users));
Data Object ColumnEntity definition
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 columnarray$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 keybool$autoIncrement - whether this column is auto-incrementalbool$unsigned - bool whether this column is unsigned. This is only meaningful when [[type]] issmallint,integerorbigint.string$comment - comment of this column. Not all DBMS support this.