[REQ] SQL queries generation
Created by: ybelenko
Is your feature request related to a problem? Please describe.
Right now we have several PHP server generators and MySQL schema generator. In most cases user will have to write basic SQL queries like
SELECT * FROM `pets` WHERE `id` = :id LIMIT 1
We can produce these queries. If they'll be not 100% accurate it's easier to edit few variables than write the whole query over and over again. The only question is where we should add them? To MySQL generator or to PHP generator? Or we need to create mix of 2 generators?
Describe the solution you'd like
Add folder to MySQL generator called php/pdo
and put PHP helper functions for pdo
database controller. I think each model requires at least 4 functions: insert
, select
, update
, delete
.
Describe alternatives you've considered
It's possible to add storageEngine: mysqlPdo
option to PHP server generator, but MySQL schema generator produces table and column names differently, so it can cause column name mismatch errors and broken SQL queries as result.
cc @jebentier, @dkarlovi, @mandrean, @jfastnacht, @ackintosh, @renepardon