Database/src/PostgreSql/Columns/Varchar.php

23 lines
398 B
PHP
Raw Normal View History

2024-11-08 16:33:44 +01:00
<?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)";
}
}