From e31aad3b38d5c34a809381f9a5283645ce4abb29 Mon Sep 17 00:00:00 2001 From: Gabor de Mooij Date: Sun, 28 Mar 2021 13:01:15 +0200 Subject: [PATCH] Update version no, refine src code comments. --- RedBeanPHP/Facade.php | 4 ++-- RedBeanPHP/Functions.php | 14 ++++++++++++++ RedBeanPHP/Plugin/SQN.php | 4 ++++ RedBeanPHP/QueryWriter/AQueryWriter.php | 2 ++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/RedBeanPHP/Facade.php b/RedBeanPHP/Facade.php index 7afad32b0..555ae2b96 100644 --- a/RedBeanPHP/Facade.php +++ b/RedBeanPHP/Facade.php @@ -29,7 +29,7 @@ * RedBean Facade * * Version Information - * RedBean Version @version 5.6 + * RedBean Version @version 5.7 * * This class hides the object landscape of * RedBeanPHP behind a single letter class providing @@ -49,7 +49,7 @@ class Facade /** * RedBeanPHP version constant. */ - const C_REDBEANPHP_VERSION = '5.6'; + const C_REDBEANPHP_VERSION = '5.7'; /** * @var ToolBox diff --git a/RedBeanPHP/Functions.php b/RedBeanPHP/Functions.php index 3e31b9931..b3d3f4862 100644 --- a/RedBeanPHP/Functions.php +++ b/RedBeanPHP/Functions.php @@ -79,6 +79,13 @@ function array_flatten( $array ) /** * Function pstr() generates [ $value, \PDO::PARAM_STR ] + * Ensures that your parameter is being treated as a string. + * + * Usage: + * + * + * R::find('book', 'title = ?', [ pstr('1') ]); + * */ if ( !function_exists( 'pstr' ) ) { @@ -91,6 +98,13 @@ function pstr( $value ) /** * Function pint() generates [ $value, \PDO::PARAM_INT ] + * Ensures that your parameter is being treated as an integer. + * + * Usage: + * + * + * R::find('book', ' pages > ? ', [ pint(2) ] ); + * */ if ( !function_exists( 'pint' ) ) { diff --git a/RedBeanPHP/Plugin/SQN.php b/RedBeanPHP/Plugin/SQN.php index 424483062..55dec8c99 100644 --- a/RedBeanPHP/Plugin/SQN.php +++ b/RedBeanPHP/Plugin/SQN.php @@ -12,8 +12,10 @@ * * Usage: * + * * R::sqn('shop * * SQN assumes id fields follow the following conventions: * @@ -23,7 +25,9 @@ * * SQN can also generate additional aliases: * + * * R::sqn( ..., 'area/x,y;place/x,y' ) - area_x area_y place_x place_y + * * * @author Gabor de Mooij * @license BSD/GPLv2 diff --git a/RedBeanPHP/QueryWriter/AQueryWriter.php b/RedBeanPHP/QueryWriter/AQueryWriter.php index 77b494c08..895ddec73 100644 --- a/RedBeanPHP/QueryWriter/AQueryWriter.php +++ b/RedBeanPHP/QueryWriter/AQueryWriter.php @@ -115,8 +115,10 @@ abstract class AQueryWriter * For instance to add ROW_FORMAT=DYNAMIC to all MySQL tables * upon creation: * + * * $sql = $writer->getDDLTemplate( 'createTable', '*' ); * $writer->setDDLTemplate( 'createTable', '*', $sql . ' ROW_FORMAT=DYNAMIC ' ); + * * * For property-specific templates set $beanType to: * account.username -- then the template will only be applied to SQL statements relating