Download the PHP package sebastianguzmanmorla/lili-db without Composer
On this page you can find all versions of the php package sebastianguzmanmorla/lili-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sebastianguzmanmorla/lili-db
More information about sebastianguzmanmorla/lili-db
Files in sebastianguzmanmorla/lili-db
Package lili-db
Short Description Php ORM
License MIT
Homepage https://github.com/sebastianguzmanmorla/LiliDb
Informations about the package lili-db
LiliDb
A Php ORM with extensive usage of closures, reflection and attributes, taking advantage of Php modern features
Compatible with Mysql and PostgreSQL
Model Definition
Tables
To define a table, it must have the trait class LiliDb\Model and each property use the attributes LiliDb\*\Attributes\Field or LiliDb\*\Attributes\Key to map it to the table fields
TestTable Example
TestTable2 Example
Database Schema
To define a database, it must extends the class LiliDb\Database and each property reference a table using the attributes LiliDb\*\Attributes\Table
TestDatabase Example
Database Connection
To define a connection is necessary to instance a LiliDb\*\Connection class
MySql connection:
PostgreSql connection:
Create Table
Or
MySql query execution:
PostgreSql query execution:
Truncate Table
Or
MySql query execution:
PostgreSql query execution:
Drop Table
Or
MySql query execution:
PostgreSql query execution:
Insert
MySql query execution:
PostgreSql query execution:
Update
MySql query execution:
PostgreSql query execution:
Delete
MySql query execution:
PostgreSql query execution:
Select
Select With Raw Fields
Output:
MySql query execution:
PostgreSql query execution:
Select a table
Output:
MySql query execution:
PostgreSql query execution:
Select a custom class
TestSelect
Output:
MySql query execution:
PostgreSql query execution:
Complex Select
MySql query execution:
PostgreSql query execution:
All versions of lili-db with dependencies
ext-pgsql Version *
ext-mysqli Version *