-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
A typical user table will have the following queries:
src/query/user/create.sql
src/query/user/delete.sql
src/query/user/getById.sql
src/query/user/update.sql
Allowing the ResultSet to be build programatically would replace the above files with one file:
src/query/User.php
Which would contain the following methods:
User::create
User::delete
User::getById
User::update
If there is a class and method present, use that. If not, fall back to SQL. This allows PHP to produce some ResultSet
s that are not easy to produce in SQL, and allows the developer to skip using SQL at all.
This will make it really easy to get a prototype going, without the need of a database. A mechanism needs to be created that defines where the data is stored. By default, this can simply be in the data directory, as files/directories in the filesystem. Really simple way to make a prototype, and uses a set template for upgrading when speed and scalability is required.