PHPackages                             janisbiz/light-orm - 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. janisbiz/light-orm

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

janisbiz/light-orm
==================

Light ORM for database integrations

v1.1.2(6y ago)9707MITPHPPHP &gt;=7.1

Since May 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/janisbiz/light-orm)[ Packagist](https://packagist.org/packages/janisbiz/light-orm)[ RSS](/packages/janisbiz-light-orm/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (18)Versions (21)Used By (0)

Light ORM
=========

[](#light-orm)

[![Latest Stable Version](https://camo.githubusercontent.com/2e68b1049dd2f8814fff64b59684ecca9f15405f948533babaa699c8393751cf/68747470733a2f2f706f7365722e707567782e6f72672f6a616e697362697a2f6c696768742d6f726d2f762f737461626c65)](https://packagist.org/packages/janisbiz/light-orm)[![codecov](https://camo.githubusercontent.com/65113de3070592ba8dbe38d31c7d2977215717a8355ffd307c20f2d2a7073adf/68747470733a2f2f636f6465636f762e696f2f67682f6a616e697362697a2f6c696768742d6f726d2f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d507a74306531525a4c4b)](https://codecov.io/gh/janisbiz/light-orm)[![Build Status](https://camo.githubusercontent.com/8341c5da5f52332c9a1131baeeb69791dde264cf0967be4bb2c9681ac9cd0c2f/68747470733a2f2f7472617669732d63692e636f6d2f6a616e697362697a2f6c696768742d6f726d2e7376673f746f6b656e3d46465942413174767a4e394654687a7831436137266272616e63683d6d6173746572)](https://travis-ci.com/janisbiz/light-orm)[![Total Downloads](https://camo.githubusercontent.com/3fbfe11e662d713b6a40cb9aea94644dc0b41e84974e9d95c4a212cb2865c3a0/68747470733a2f2f706f7365722e707567782e6f72672f6a616e697362697a2f6c696768742d6f726d2f646f776e6c6f616473)](https://packagist.org/packages/janisbiz/light-orm)[![Deps](https://camo.githubusercontent.com/af5f885b1dd64b141209e1c1c9c7149368cc56c5bd7922b1a17e367c89dfe197/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d7570253230746f253230646174652d627269676874677265656e2e737667)](https://camo.githubusercontent.com/af5f885b1dd64b141209e1c1c9c7149368cc56c5bd7922b1a17e367c89dfe197/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d7570253230746f253230646174652d627269676874677265656e2e737667)[![Mutation testing badge](https://camo.githubusercontent.com/a68d4e30a9ed27a69ddcb0093d3bee6de88f195f352fdafaf65d115a158fff73/68747470733a2f2f62616467652e737472796b65722d6d757461746f722e696f2f6769746875622e636f6d2f6a616e697362697a2f6c696768742d6f726d2f6d6173746572)](https://stryker-mutator.github.io)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3b85a97973731ee2e59f645bd64e82f8edfb44997b2badc8c06754eaa4b1031d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a616e697362697a2f6c696768742d6f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/janisbiz/light-orm/?branch=master)

A light ORM for php with easy to use query builder, repository generator and connection pool manager.

Installing
----------

[](#installing)

`composer require janisbiz/light-orm`

About
-----

[](#about)

light-orm has been used for a while in some of my work related projects. As it was growing, I decided to open-source it for the rest of community. It has good unit test coverage and a great support for integration testing together with desired DMS using Behat.

Currently these DMS are supported:

- MySQL

There is still a lot work to do, so it would be great to have some contributors for future improvements

Examples
--------

[](#examples)

### Connection pool

[](#connection-pool)

**Connection pool** is a singleton (yes I know...), which holds all the DMS connections used by ORM. To set-up connection pool you need to create a config for your DMS. Afterwards, you can add this config to connection pool, and it will establish connection to server only when it is required. To set-up connection pool, see example below:

```
