Skip to content

1.1.0

Choose a tag to compare

@CoderJoeW CoderJoeW released this 19 Sep 06:05
· 2 commits to main since this release
  • Explicit type-hinting was added to the $connection variable: private PDO $connection;
  • Added type hints for all parameters.
  • Instead of echoing the PDOException message directly, the message is now being logged using error_log and then re-thrown: throw $e;
  • Insert now returns a string which represents the ID of the last inserted row or null if there's an issue.
  • If the select statement fails, an empty array is returned to the caller, indicating no results.
  • Update method was adjusted to return a bool to indicate the success or failure of the update operation.
  • Remove method was adjusted to return a bool to indicate the success or failure of the update operation.
  • CreateParameterString logic was streamlined for clarity, making use of a list of parts and then joining them together.
  • ExecuteStatement return type was changed to ?PDOStatement to allow for the possibility of a null return.
    Exceptions caught within the method are now re-thrown after logging: throw new PDOException("Failed executing statement: {$e->getMessage()}");