PUDL Documentation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
constants
exceptions
mssql
mysql
null
odbc
parameters
postgresql
pudl
pudlCollection
pudlData
pudlHelper
pudlId
pudlObject
pudlOrm
pudlValue
sqlite
LICENSE.md
README.md
_config.yml

README.md

  • NOTE: This is a "work in progress" document and will take a few weeks to be fully filled out. Most things listed in this document will become full pages of their own and linked here in the very near future.

PUDL Documentation

What is PUDL

PUDL stands for "PHP Universal Database Library" and can simply be described as "PDO on crack." PUDL provides a straightforward, simple, and standardized API for connecting to various database engines using the available PHP extensions transparently. Additionally, PUDL provides APIs for automatically generating SQL queries as well as processing the resulting data.

Getting Started

Supported Database Engines and PHP Extensions

Class Support Information
pudl Full The core shared API
pudlNull Full Think /dev/null, no connection made, calls return default value
pudlMySql Full Legacy MySQL (deprecated in PHP 5.5.0, removed in PHP 7.0.0)
pudlMySqli Full Modern MySQL, MariaDB, and Percona
pudlGalera Full MySqli interface extended with Galera multi-master clustering
pudlMsSql Partial Legacy Microsoft SQL Server (removed in PHP 7.0.0)
pudlSqlSrv Partial Modern Microsoft SQL Server
pudlPgSql Partial PostgreSQL
pudlSqlite Partial Local Sqlite3 file
pudlOdbc Partial Open Database Connectivity
pudlPdo Partial PHP's built in PDO
pudlShell Experimental JSON API accessed via piped connections on a local shell
pudlWeb Experimental JSON API accessed via HTTP(s)

Basic Queries

API Documentation

Classes

Constants

Prefix Information
PUDL_ Main PUDL constants
GALERA_ Galera cluster status

Interfaces

Interface Information
pudlData Used internally to identify specific data structures
pudlHelper Used internally to identify special PUDL related classes
pudlId Allows an object to be passed into an Id() function as a value
pudlValue Used internally to identify special PUDL values

Object-Relational Mapping (ORM)

Class Information
pudlObject A basic object that acts like a PHP Array
pudlOrm A hybrid between pudlObject and the main PUDL interface
pudlCollection A collection of pudlOrm objects

Importing / Exporting

  • pudlImport
  • pudlImportCsv
  • pudlImportExcel
  • pudlExportExcel