for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Arcanedev\LaravelMetrics\Expressions\IfNull;
use Arcanedev\LaravelMetrics\Expressions\Expression;
/**
* Class SqlServerExpression
*
* @author ARCANEDEV <[email protected]>
*/
class SqlServerExpression extends Expression
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Get the value of the expression.
* @return string
public function getValue(): string
return "CASE WHEN {$this->value} IS NULL THEN 0 ELSE 1 END";
}