PHPackages                             falgunphp/typo - 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. falgunphp/typo

ActiveLibrary

falgunphp/typo
==============

00PHP

Since Apr 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/falgun/typo)[ Packagist](https://packagist.org/packages/falgunphp/typo)[ RSS](/packages/falgunphp-typo/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Typo
====

[](#typo)

Type safe Query builder that tries to reduce typo.

Install
-------

[](#install)

*Please note that PHP 8.0 or higher is required.*

Via Composer

```
$ composer require falgunphp/typo
```

Limitations
-----------

[](#limitations)

- Only supports MySQL/MariaDB.
- Currently has very tiny subset of SQL features available.
- Not stable for real usage.

Usage
-----

[](#usage)

Before starting using this library, please note that:

- Typo tries to be a **Database First** ORM/Query Builder. You can't design DB schema with it. Schema related meta datas will be generated from existing database.
- It tries to stay as close as possible to SQL syntax structure. As a result, code will look too verbose.

To generate Metadatas for your DB, run (after installation):

```
vendor/bin/generate-typo-meta
```

Above script will ask for db credentials and metadata directory (where it will store files). Currently, Metadata classes have default namespace defined as `App\DB`. You can change it to suit your need but keep in mind re-running the generator script will **overwrite** your changes.

Once metadatas are generated, we can start using Typo to build queries.

```
