PHP Classes

PDO One ORM: Access SQL database tables as object using PDO

Recommend this page to a friend!
  Info   View files Example   View files View files (126)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 18 All time: 11,242 This week: 206Up
Version License PHP version Categories
pdooneorm 1.0GNU Lesser Genera...5PHP 5, Databases, Code Generation
Description 

Author

This package can access SQL database tables as objects using PDO.

It can generate classes that can perform operations to manipulate table records as if they were objects, like creating and retrieving, updating, and deleting table records.

The package can also perform database table alterations using parameters to define the table fields and indexes.

Picture of Jorge Castro
  Performance   Level  
Name: Jorge Castro <contact>
Classes: 30 packages by
Country: Chile Chile
Age: 48
All time rank: 12743 in Chile Chile
Week rank: 87 Up1 in Chile Chile Up
Innovation award
Innovation award
Nominee: 14x

Winner: 2x

Example

<?php /** @noinspection ForgottenDebugOutputInspection */

use eftec\examples\example1\repo\FilmTextRepo;
use
eftec\PdoOneORM;
use
eftec\tests\sakila2021\CityRepo;

include
'../../vendor/autoload.php';

include
__DIR__.'/phpconf.php';
/** @noinspection PhpUndefinedVariableInspection */
$pdo=PdoOneORM::factoryFromArray($pdoOneConfig);
$pdo->connect();
$pdo->logLevel=3;

echo
"<h1>Dropping table</h1>";
FilmTextRepo::dropTable();
echo
"<h1>Creating table</h1>";
FilmTextRepo::createTable();
echo
"<h1>Truncating table</h1>";
FilmTextRepo::truncate(true);

echo
"<h1>Listing paged</h1>";
var_dump(CityRepo::page(2,5)->toList());

echo
"<h1>Listing join</h1>";
var_dump(CityRepo::innerjoin('country on city.country_id=country.country_id')->toList());
echo
"<h1>Listing table</h1>";
var_dump(CityRepo::recursive(['/_country_id'])->toList());
echo
"<h1>Listing cache (if available)</h1>";
var_dump(CityRepo::useCache(0)->toList());


  Files folder image Files  
File Role Description
Files folder imageexamples (2 directories)
Files folder imagelib (4 files, 1 directory)
Files folder imagetests (4 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  examples  
File Role Description
Files folder imageexample1 (5 files, 1 directory)
Files folder imageexample2 (4 files, 1 directory)

  Files folder image Files  /  examples  /  example1  
File Role Description
Files folder imagerepo (33 files)
  Accessible without login Plain text file config.config.php Aux. Auxiliary script
  Accessible without login Plain text file config2.config.php Aux. Auxiliary script
  Accessible without login Plain text file generate.bat Data Auxiliary data
  Accessible without login Plain text file phpconf.php Aux. Auxiliary script
  Accessible without login Plain text file test.php Example Example script

  Files folder image Files  /  examples  /  example1  /  repo  
File Role Description
  Plain text file AbstractActorRepo.php Class Class source
  Plain text file AbstractAddresRepo.php Class Class source
  Plain text file AbstractCategoryRepo.php Class Class source
  Plain text file AbstractCityRepo.php Class Class source
  Plain text file AbstractCountryRepo.php Class Class source
  Plain text file AbstractCustomerRepo.php Class Class source
  Plain text file AbstractFilmActorRepo.php Class Class source
  Plain text file AbstractFilmCategoryRepo.php Class Class source
  Plain text file AbstractFilmRepo.php Class Class source
  Plain text file AbstractFilmTextRepo.php Class Class source
  Plain text file AbstractInventoryRepo.php Class Class source
  Plain text file AbstractLanguageRepo.php Class Class source
  Plain text file AbstractPaymentRepo.php Class Class source
  Plain text file AbstractRentalRepo.php Class Class source
  Plain text file AbstractStaffRepo.php Class Class source
  Plain text file AbstractStoreRepo.php Class Class source
  Plain text file ActorRepo.php Class Class source
  Plain text file AddresRepo.php Class Class source
  Plain text file CategoryRepo.php Class Class source
  Plain text file CityRepo.php Class Class source
  Plain text file CountryRepo.php Class Class source
  Plain text file CustomerRepo.php Class Class source
  Plain text file FilmActorRepo.php Class Class source
  Plain text file FilmCategoryRepo.php Class Class source
  Plain text file FilmRepo.php Class Class source
  Plain text file FilmTextRepo.php Class Class source
  Plain text file InventoryRepo.php Class Class source
  Plain text file LanguageRepo.php Class Class source
  Plain text file PaymentRepo.php Class Class source
  Plain text file RentalRepo.php Class Class source
  Plain text file Sakila.php Class Class source
  Plain text file StaffRepo.php Class Class source
  Plain text file StoreRepo.php Class Class source

  Files folder image Files  /  examples  /  example2  
File Role Description
Files folder imagerepo (33 files)
  Accessible without login Plain text file config.config.php Aux. Auxiliary script
  Accessible without login Plain text file config2.config.php Aux. Auxiliary script
  Accessible without login Plain text file exercise1.php Example Example script
  Accessible without login Plain text file phpconfig.php Aux. Auxiliary script

  Files folder image Files  /  examples  /  example2  /  repo  
File Role Description
  Plain text file AbstractActorRepo.php Class Class source
  Plain text file AbstractAddresRepo.php Class Class source
  Plain text file AbstractCategoryRepo.php Class Class source
  Plain text file AbstractCityRepo.php Class Class source
  Plain text file AbstractCountryRepo.php Class Class source
  Plain text file AbstractCustomerRepo.php Class Class source
  Plain text file AbstractFilmActorRepo.php Class Class source
  Plain text file AbstractFilmCategoryRepo.php Class Class source
  Plain text file AbstractFilmRepo.php Class Class source
  Plain text file AbstractFilmTextRepo.php Class Class source
  Plain text file AbstractInventoryRepo.php Class Class source
  Plain text file AbstractLanguageRepo.php Class Class source
  Plain text file AbstractPaymentRepo.php Class Class source
  Plain text file AbstractRentalRepo.php Class Class source
  Plain text file AbstractStaffRepo.php Class Class source
  Plain text file AbstractStoreRepo.php Class Class source
  Plain text file ActorRepo.php Class Class source
  Plain text file AddresRepo.php Class Class source
  Plain text file CategoryRepo.php Class Class source
  Plain text file CityRepo.php Class Class source
  Plain text file CountryRepo.php Class Class source
  Plain text file CustomerRepo.php Class Class source
  Plain text file FilmActorRepo.php Class Class source
  Plain text file FilmCategoryRepo.php Class Class source
  Plain text file FilmRepo.php Class Class source
  Plain text file FilmTextRepo.php Class Class source
  Plain text file InventoryRepo.php Class Class source
  Plain text file LanguageRepo.php Class Class source
  Plain text file PaymentRepo.php Class Class source
  Plain text file RentalRepo.php Class Class source
  Plain text file Sakila.php Class Class source
  Plain text file StaffRepo.php Class Class source
  Plain text file StoreRepo.php Class Class source

  Files folder image Files  /  lib  
File Role Description
Files folder imagetemplate (6 files)
  Accessible without login Plain text file pdooneorm Example Example script
  Plain text file PdoOneORM.php Class Class source
  Plain text file PdoOneORMCli.php Class Class source
  Plain text file _BasePdoOneRepo.php Class Class source

  Files folder image Files  /  lib  /  template  
File Role Description
  Accessible without login Plain text file template_abstractclassrepo.php Aux. Auxiliary script
  Accessible without login Plain text file template_abstractmodel.php Aux. Auxiliary script
  Accessible without login Plain text file template_abstractrepo.php Aux. Auxiliary script
  Accessible without login Plain text file template_base.php Aux. Auxiliary script
  Accessible without login Plain text file template_classrepo.php Aux. Auxiliary script
  Accessible without login Plain text file template_model.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imagesakila2021 (34 files)
  Plain text file dBug.php Class Class source
  Plain text file PdoOne_mysql_sakila2021_Test.php Class Class source
  Accessible without login Plain text file running_sakila.md Data Auxiliary data
  Accessible without login Plain text file sakila2021.config.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  sakila2021  
File Role Description
  Plain text file AbstractActorRepo.php Class Class source
  Plain text file AbstractAddresRepo.php Class Class source
  Plain text file AbstractCategoryRepo.php Class Class source
  Plain text file AbstractCityRepo.php Class Class source
  Plain text file AbstractCountryRepo.php Class Class source
  Plain text file AbstractCustomerRepo.php Class Class source
  Plain text file AbstractFilmActorRepo.php Class Class source
  Plain text file AbstractFilmCategoryRepo.php Class Class source
  Plain text file AbstractFilmRepo.php Class Class source
  Plain text file AbstractFilmTextRepo.php Class Class source
  Plain text file AbstractInventoryRepo.php Class Class source
  Plain text file AbstractLanguageRepo.php Class Class source
  Plain text file AbstractPaymentRepo.php Class Class source
  Plain text file AbstractRentalRepo.php Class Class source
  Plain text file AbstractStaffRepo.php Class Class source
  Plain text file AbstractStoreRepo.php Class Class source
  Plain text file ActorRepo.php Class Class source
  Plain text file AddresRepo.php Class Class source
  Plain text file CategoryRepo.php Class Class source
  Plain text file CityRepo.php Class Class source
  Plain text file CountryRepo.php Class Class source
  Plain text file CustomerRepo.php Class Class source
  Plain text file FilmActorRepo.php Class Class source
  Plain text file FilmCategoryRepo.php Class Class source
  Plain text file FilmRepo.php Class Class source
  Plain text file FilmTextRepo.php Class Class source
  Plain text file InventoryRepo.php Class Class source
  Plain text file LanguageRepo.php Class Class source
  Plain text file PaymentRepo.php Class Class source
  Plain text file RentalRepo.php Class Class source
  Plain text file Sakila.php Class Class source
  Plain text file Sakila_lite.php Class Class source
  Plain text file StaffRepo.php Class Class source
  Plain text file StoreRepo.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:11,242
This week:206Up