Skip to content

Commit

Permalink
re-added castAsChar()
Browse files Browse the repository at this point in the history
re-added castAsChar() as per comment
  • Loading branch information
alikon committed Oct 16, 2016
1 parent 6cf3c84 commit c5711ba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions libraries/joomla/database/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,25 @@ public function call($columns)
return $this;
}

/**
* Casts a value to a char.
*
* Ensure that the value is properly quoted before passing to the method.
*
* Usage:
* $query->select($query->castAsChar('a'));
*
* @param string $value The value to cast as a char.
*
* @return string Returns the cast value.
*
* @since 11.1
*/
public function castAsChar($value)
{
return $value;
}

/**
* Gets the number of characters in a string.
*
Expand Down

0 comments on commit c5711ba

Please sign in to comment.