usox / harm
Active record/table data gateway hybrid for hack strict mode
Installs: 544
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Language:Shell
Requires
- ext-pdo: *
- hhvm: ^4.0
- facebook/hack-codegen: ^4.2
- hhvm/hsl: ^4.0
Requires (Dev)
- hhvm/hhast: ^4.0
- usox/hackmock: ^1
README
HaRM - Hack Relation Mapper
Goal
The main purpose of HaRM is to perform simple CRUD-Operations in hack strict mode - that's it.
Usage
- Create a .harm file containing the database structure (see
tests/sample.harm
for a boilerplate). - Generate interface
./bin/harmgen interface <path_to_your_harm_file> > MyTableInterface.hh
- Generate table
./bin/harmgen table <path_to_your_harm_file> > MyTable.hh
- Use your existing PDO instance for the database connection
See the generated interface for further information.