29 lines
		
	
	
		
			865 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			865 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace nur\m\pdo\mysql;
 | |
| 
 | |
| use nulib\db\mysql\query;
 | |
| use nur\m\IQuery;
 | |
| use nur\m\IRowIncarnation;
 | |
| use nur\m\pdo\PdoQuery;
 | |
| 
 | |
| class MysqlQuery extends PdoQuery {
 | |
|   protected function newRowIncarnation(): IRowIncarnation {
 | |
|     return new MysqlRowIncarnation();
 | |
|   }
 | |
| 
 | |
|   function select($sql=null, ?array $filter=null): IQuery {
 | |
|     if (is_array($sql)) [$sql, $filter] = query::with($sql, $filter);
 | |
|     return parent::select($sql, $filter);
 | |
|   }
 | |
| 
 | |
|   function update($sql=null, ?array $filter=null, $row=null, ?array &$results=null): IQuery {
 | |
|     if (is_array($sql)) [$sql, $filter] = query::with($sql, $filter);
 | |
|     return parent::update($sql, $filter, $row, $results);
 | |
|   }
 | |
| 
 | |
|   function insert($sql=null, $row=null, ?array &$results=null): IQuery {
 | |
|     if (is_array($sql)) [$sql, $row] = query::with($sql, $row);
 | |
|     return parent::insert($sql, $row, $results);
 | |
|   }
 | |
| }
 |