public function initialize(PDO $pdo, ReflectionMethod $method, HermitAnnote $annote)
 {
     $meta = HermitDatabaseMetaFactory::get($pdo);
     $table = $annote->getTable();
     $info = $meta->getTableInfo($table);
     $primaryKeys = $info->getPrimaryKeys();
     $sql = 'DELETE';
     $sql .= ' ';
     $sql .= 'FROM';
     $sql .= ' ';
     $sql .= $table;
     $sql .= ' ';
     $sql .= 'WHERE';
     $sql .= ' ';
     $begin = false;
     foreach ($primaryKeys as $pk) {
         $begin = true;
         $sql .= ' ';
         $sql .= $pk . '=';
         $sql .= ' ';
         $sql .= '/*' . $pk . '*/';
         $sql .= '"' . $pk . '"';
         $sql .= ' ';
         $sql .= 'AND';
     }
     if ($begin) {
         $sql = substr($sql, 0, -3);
     }
     $this->sql = $sql;
 }
 public function initialize(PDO $pdo, ReflectionMethod $method, HermitAnnote $annote)
 {
     $meta = HermitDatabaseMetaFactory::get($pdo);
     $table = $annote->getTable();
     $info = $meta->getTableInfo($table);
     $columns = $info->getColumns();
     $insert = 'INSERT INTO';
     $insert .= ' ';
     $insert .= $table;
     $insert .= ' (';
     $insert .= join(', ', $columns);
     $insert .= ') VALUES (';
     $begin = false;
     foreach ($columns as $column) {
         $begin = true;
         $insert .= '/*' . $column . '*/';
         $insert .= '"' . $column . '"';
         $insert .= ',';
     }
     if ($begin) {
         $insert = substr($insert, 0, -1);
     }
     $insert .= ')';
     $this->insert = $insert;
 }
 public function initialize(PDO $pdo, ReflectionMethod $method, HermitAnnote $annote)
 {
     $meta = HermitDatabaseMetaFactory::get($pdo);
     $table = $annote->getTable();
     $info = $meta->getTableInfo($table);
     $columns = $info->getColumns();
     $select = 'SELECT';
     $select .= ' ';
     $select .= join(', ', $columns);
     $select .= ' ';
     $select .= 'FROM';
     $select .= ' ';
     $select .= $table;
     $this->select = $select;
 }