PHPackages                             aura/sqlschema - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. aura/sqlschema

ActiveLibrary[Database &amp; ORM](/categories/database)

aura/sqlschema
==============

Provides facilities to read table names and table columns from a database using PDO.

2.0.3(10y ago)41234.1k↑63.6%14[4 issues](https://github.com/auraphp/Aura.SqlSchema/issues)[1 PRs](https://github.com/auraphp/Aura.SqlSchema/pulls)4BSD-2-ClausePHPPHP &gt;=5.3.0

Since Jan 10Pushed 10y ago12 watchersCompare

[ Source](https://github.com/auraphp/Aura.SqlSchema)[ Packagist](https://packagist.org/packages/aura/sqlschema)[ Docs](https://github.com/auraphp/Aura.SqlSchema)[ RSS](/packages/aura-sqlschema/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (5)DependenciesVersions (7)Used By (4)

Aura.SqlSchema
==============

[](#aurasqlschema)

Provides facilities to read table names and table columns from a database using a [PDO](http://php.net/PDO) connection.

Foreword
--------

[](#foreword)

### Installation

[](#installation)

This library requires PHP 5.3 or later; we recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies.

It is installable and autoloadable via Composer as [aura/sqlschema](https://packagist.org/packages/aura/sqlschema).

Alternatively, [download a release](https://github.com/auraphp/Aura.SqlSchema/releases) or clone this repository, then require or include its *autoload.php* file.

### Quality

[](#quality)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b5a67867df09173151b395b2edfd81a4dfb1435287afc9fe9ced520ff200dacb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617572617068702f417572612e53716c536368656d612f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f702d32)](https://scrutinizer-ci.com/g/auraphp/Aura.SqlSchema/)[![Code Coverage](https://camo.githubusercontent.com/166b394e64ec754520c2b50f26506373e1bffa7c75be752e7e318f1e6faf2b11/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617572617068702f417572612e53716c536368656d612f6261646765732f636f7665726167652e706e673f623d646576656c6f702d32)](https://scrutinizer-ci.com/g/auraphp/Aura.SqlSchema/)[![Build Status](https://camo.githubusercontent.com/d1728aeb276b281e2d5d89392a601b08c1daa6c67f82e4d54548d5b4d1bee99a/68747470733a2f2f7472617669732d63692e6f72672f617572617068702f417572612e53716c536368656d612e706e673f6272616e63683d646576656c6f702d32)](https://travis-ci.org/auraphp/Aura.SqlSchema)

To run the unit tests at the command line, issue `phpunit` at the package root. (This requires [PHPUnit](http://phpunit.de/manual/) to be available as `phpunit`.)

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

### Community

[](#community)

To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our [Google Group](http://groups.google.com/group/auraphp), follow [@auraphp on Twitter](http://twitter.com/auraphp), or chat with us on #auraphp on Freenode.

Getting Started
---------------

[](#getting-started)

### Instantiation

[](#instantiation)

Instantiate a driver-specific schema object with a matching [PDO](http://php.net/PDO) instance:

```

```

### Fetching Table Lists

[](#fetching-table-lists)

To get a list of tables in the database, issue `fetchTableList()`:

```

```

### Fetching Column Information

[](#fetching-column-information)

To get information about the columns in a table, issue `fetchTableCols()`:

```
