Created
November 22, 2016 18:41
-
-
Save wilcorrea/c2ef59376e388aedc4999b71cee45185 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Hero; | |
/** | |
* Class QueryBuilder | |
* @package Hero | |
*/ | |
class QueryBuilder | |
{ | |
/** | |
* QueryBuilder constructor. | |
*/ | |
public function __construct() | |
{ | |
// configure | |
} | |
/** | |
* | |
*/ | |
public function insert() | |
{ | |
// INSERT INTO users (nome, login, password) VALUES (?, ?, ?); | |
} | |
/** | |
* | |
*/ | |
public function select() | |
{ | |
// SELECT id, nome, login, password FROM <JOIN> users <WHERE> <GROUP> <ORDER> <HAVING> <LIMIT>; | |
} | |
/** | |
* | |
*/ | |
public function update() | |
{ | |
// UPDATE users SET nome = ?, login = ?, password = ? WHERE id = ? | |
} | |
/** | |
* | |
*/ | |
public function delete() | |
{ | |
// DELETE FROM users <JOIN> <USING> WHERE id = ? | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment