titon / db
This package is abandoned and no longer maintained.
No replacement package was suggested.
The Titon database package provides a basic database abstraction layer and an object relational mapper.
0.15.3
2014-06-19 06:22 UTC
Requires
- php: >=5.4.0
- ext-pdo: *
- titon/common: *
- titon/event: *
- titon/type: *
Requires (Dev)
- psr/log: *
- titon/cache: *
- titon/debug: *
- titon/test: dev-master
Suggests
- psr/log: Log queries using a Logger
- titon/cache: Cache query results using a Storage engine
- titon/db-mongodb: Enable MongoDB database access
- titon/db-mysql: Enable MySQL database access
- titon/db-postgresql: Enable PostgreSQL database access
- titon/db-sqlite: Enable SQLite database access
- dev-master
- 0.15.3
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.1
- 0.14.0
- 0.13.0
- 0.12.1
- 0.12.0
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
This package is auto-updated.
Last update: 2022-02-01 12:29:51 UTC
README
The Titon Database package provides a lightweight and low-level interface for interacting with database engines (known as drivers). The DB package comes bundled with a robust database abstraction layer (DBAL), an object oriented query builder, a powerful SQL dialect formatter, a data type caster, custom finder classes, behaviors, mappers, schemas, and many more.
$db = Titon\Db\Database::registry(); $db->addDriver('default', new Titon\Db\Mysql\MysqlDriver([ 'user' => 'root', 'pass' => 'pass' ])); $users = new Titon\Db\Repository(['table' => 'users']); $entities = $users->select()->where('status', 1)->orderBy('created_at', 'desc')->all();
Supported database engines are packaged as individual driver packages, which are listed below.
Drivers
MySQL
- https://github.com/titon/db-mysqlPostgreSQL
- https://github.com/titon/db-postgresqlSQLite
- https://github.com/titon/db-sqliteMongoDB
- https://github.com/titon/db-mongodb
Features
Database
- Driver managerRepository
- Table representation, queries drivers, maps relations and returns entitiesBehavior
- Executes logic during database eventsEntity
- Single record of dataEntityCollection
- Collection of entitiesFinder
- Select query formattingDriver
- Interacts with a database or remote serviceDialect
- Driver specific SQL formattingSchema
- Repository schemaType
- Data type mappingResultSet
- Result set mapper
Query
- Object oriented query builderRawExpr
- Raw expression builderExpr
- Expression builderFunc
- Function builderJoin
- Join builderPredicate
- Clause builder
Dependencies
Common
Event
Type
Cache
(optional)Psr\Log
(optional)
Requirements
- PHP 5.4.0
- PDO