Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.0] Database should support raw statements for multiple methods #7

Open
5 tasks
marktopper opened this issue Oct 3, 2016 · 0 comments
Open
5 tasks
Assignees
Milestone

Comments

@marktopper
Copy link
Member

marktopper commented Oct 3, 2016

The Database component should support raw statements for multiple methods, example the where-method.

We use the where-method like this:

$db->table('table')->where('column', 'operator', 'value')->get();

However it needs support for adding raw statements like this:

$db->table('table')->whereRaw("strftime('%Y', `created_at`) = ?", ['2016'])->get();
$db->table('table')->where($db->raw("(SELECT count(id) FROM user_groups WHERE users.id = user_groups.user_id"), '>', 1)->get();

That is my idea on how this should work.

The functions that might require usage of raw statements:

  • where
  • select
  • orderBy
  • groupBy
  • join
@marktopper marktopper added this to the v1.0 milestone Oct 3, 2016
@marktopper marktopper self-assigned this Feb 13, 2017
@marktopper marktopper changed the title [master] Database should support raw statements for multiple methods [v1.0] Database should support raw statements for multiple methods Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant