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