for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Helix\DB\SQL;
/**
* Represents a numeric expression. Produces various transformations.
*/
class Numeric extends Scalar {
use NumericTrait;
* Casts the expression to a string of characters.
*
* @return Text
public function toText () {
if ($this->db->getDriver() === 'sqlite') {
return new Text($this->db, "CAST({$this} AS TEXT)");
}
return new Text($this->db, "CAST({$this} AS CHAR)");