You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice, if I can start query with FROM part and then define columns to select.
When I call $dibi->command()->from('foo')->select('bar') Dibi will produce query FROM foo SELECT bar which is obviously syntax error. If there is a requirement to know the type of query before call of from(), it would work like $dibi->select()->from('foo')->select('bar') with no column definition at first select() call (but now it reproduces query SELECT , bar FROM foo - again error).
This change let make more comfortable APIs in some cases.
(the only way to do this now is to call something like $dibi->select('*')->removeClause('SELECT'))
The text was updated successfully, but these errors were encountered:
VladaHejda
changed the title
Allow $query->from()->select()
Allow $query->from()->select()
Jan 12, 2016
Do you want it?
I expect api must support table()->insert(), table()->update() and table()->delete() this is little more complex, because class Connection has logic how works with arguments. This update change api update('table', $data) vs ->table('table')->update($data) etc.
It would be nice, if I can start query with
FROM
part and then define columns to select.When I call
$dibi->command()->from('foo')->select('bar')
Dibi will produce queryFROM foo SELECT bar
which is obviously syntax error. If there is a requirement to know the type of query before call offrom()
, it would work like$dibi->select()->from('foo')->select('bar')
with no column definition at firstselect()
call (but now it reproduces querySELECT , bar FROM foo
- again error).This change let make more comfortable APIs in some cases.
(the only way to do this now is to call something like
$dibi->select('*')->removeClause('SELECT')
)The text was updated successfully, but these errors were encountered: