From 244761b1d5c7f7db17defcf748d6fb22c0db385d Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 8 Jan 2024 14:30:06 +0100 Subject: [PATCH] fix(doc): fix return types for executor methods in README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 51e48f2..6a5041e 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ use libmysqldriver\MySQL; $db = new MySQL($host, $user, $pass, $db); ``` -All executor methods [`select()`](#select), [`update()`](#update), and [`insert()`](#insert) will return a [`mysqli_result`](https://www.php.net/manual/en/class.mysqli-result.php) object. +All executor methods [`select()`](#select), [`update()`](#update), and [`insert()`](#insert) will return a [`mysqli_result`](https://www.php.net/manual/en/class.mysqli-result.php) object or boolean. # SELECT @@ -69,7 +69,7 @@ Pass an associative array of strings, CSV string, or null to this method to filt ```php $db->select( array|string|null $columns -): mysqli_result; +): mysqli_result|bool; ``` In most cases you probably want to select with a constraint. Chain the [`where()`](#where) method before `select()` to filter the query @@ -119,7 +119,7 @@ Use `MySQL->insert()` to append a new row to a database table $db->insert( // Array of values to INSERT array $values -): mysqli_result +): mysqli_result|bool // Returns true if row was inserted ``` @@ -146,7 +146,7 @@ Modify existing rows with `MySQL->update()` $db->get( // Key, value array of column names and values to update array $fields, -): mysqli_result; +): mysqli_result|bool; // Returns true if at least 1 row was changed ```