23 lines
386 B
PHP
23 lines
386 B
PHP
|
<?php
|
||
|
|
||
|
namespace Nest\Database\PostgreSql\Columns;
|
||
|
|
||
|
use Stringable;
|
||
|
|
||
|
/**
|
||
|
* PostgreSQL fixed-length character string column type.
|
||
|
*/
|
||
|
class Char implements Stringable
|
||
|
{
|
||
|
/**
|
||
|
* @param int $size Size of the fixed-length character string column type.
|
||
|
*/
|
||
|
public function __construct(protected int $size)
|
||
|
{}
|
||
|
|
||
|
public function __toString(): string
|
||
|
{
|
||
|
return "char($this->size)";
|
||
|
}
|
||
|
}
|