Finish support of PDO

Add support of PDO and constructor of History