Documentation

Blueprint
in package

Класс для создания SQL-запросов определения таблиц

Table of Contents

Properties

$charset  : string|null
$collation  : string|null
$columns  : array<string|int, mixed>
$dialect  : DatabaseDialectInterface
$engine  : string|null
$table  : string
$tableComment  : string|null
$tableOptions  : array<string|int, mixed>

Methods

__construct()  : mixed
Конструктор.
after()  : self
autoIncrement()  : self
bigInteger()  : self
binary()  : self
blob()  : self
boolean()  : self
char()  : self
comment()  : self
compileCreate()  : string
Генерирует SQL-запрос для создания таблицы.
date()  : self
dateTime()  : self
decimal()  : self
default()  : self
double()  : self
enum()  : self
first()  : self
float()  : self
geometry()  : self
geometryCollection()  : self
id()  : void
Добавляет первичный ключ (id) в таблицу.
index()  : self
integer()  : self
json()  : self
lineString()  : self
longBlob()  : self
longText()  : self
mediumBlob()  : self
mediumInteger()  : self
mediumText()  : self
multiLineString()  : self
multiPoint()  : self
multiPolygon()  : self
nullable()  : self
point()  : self
polygon()  : self
primary()  : self
rememberToken()  : void
set()  : self
smallInteger()  : self
softDeletes()  : void
string()  : self
text()  : self
time()  : self
timestamp()  : self
timestamps()  : void
tinyInteger()  : self
unique()  : self
unsigned()  : self
unsignedInteger()  : self
year()  : self

Properties

$charset

private string|null $charset = null

$collation

private string|null $collation = null

$columns

private array<string|int, mixed> $columns = []

$tableComment

private string|null $tableComment = null

$tableOptions

private array<string|int, mixed> $tableOptions = []

Methods

after()

public after(string $column) : self
Parameters
$column : string
Return values
self

autoIncrement()

public autoIncrement() : self
Return values
self

bigInteger()

public bigInteger(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

binary()

public binary(string $column[, int $length = 255 ]) : self
Parameters
$column : string
$length : int = 255
Return values
self

blob()

public blob(string $column) : self
Parameters
$column : string
Return values
self

boolean()

public boolean(string $column) : self
Parameters
$column : string
Return values
self

char()

public char(string $column[, int $length = 255 ]) : self
Parameters
$column : string
$length : int = 255
Return values
self

comment()

public comment(string $comment) : self
Parameters
$comment : string
Return values
self

compileCreate()

Генерирует SQL-запрос для создания таблицы.

public compileCreate() : string
Return values
string

SQL-запрос CREATE TABLE

date()

public date(string $column) : self
Parameters
$column : string
Return values
self

dateTime()

public dateTime(string $column[, int|null $precision = null ]) : self
Parameters
$column : string
$precision : int|null = null
Return values
self

decimal()

public decimal(string $column[, int $precision = 10 ][, int $scale = 2 ]) : self
Parameters
$column : string
$precision : int = 10
$scale : int = 2
Return values
self

default()

public default(mixed $value) : self
Parameters
$value : mixed
Return values
self

double()

public double(string $column[, int|null $precision = null ][, int|null $scale = null ]) : self
Parameters
$column : string
$precision : int|null = null
$scale : int|null = null
Return values
self

enum()

public enum(string $column, array<string|int, mixed> $values) : self
Parameters
$column : string
$values : array<string|int, mixed>
Return values
self

first()

public first() : self
Return values
self

float()

public float(string $column[, int|null $precision = null ][, int|null $scale = null ]) : self
Parameters
$column : string
$precision : int|null = null
$scale : int|null = null
Return values
self

geometry()

public geometry(string $column) : self
Parameters
$column : string
Return values
self

geometryCollection()

public geometryCollection(string $column) : self
Parameters
$column : string
Return values
self

id()

Добавляет первичный ключ (id) в таблицу.

public id() : void

index()

public index() : self
Return values
self

integer()

public integer(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

json()

public json(string $column) : self
Parameters
$column : string
Return values
self

lineString()

public lineString(string $column) : self
Parameters
$column : string
Return values
self

longBlob()

public longBlob(string $column) : self
Parameters
$column : string
Return values
self

longText()

public longText(string $column) : self
Parameters
$column : string
Return values
self

mediumBlob()

public mediumBlob(string $column) : self
Parameters
$column : string
Return values
self

mediumInteger()

public mediumInteger(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

mediumText()

public mediumText(string $column) : self
Parameters
$column : string
Return values
self

multiLineString()

public multiLineString(string $column) : self
Parameters
$column : string
Return values
self

multiPoint()

public multiPoint(string $column) : self
Parameters
$column : string
Return values
self

multiPolygon()

public multiPolygon(string $column) : self
Parameters
$column : string
Return values
self

nullable()

public nullable() : self
Return values
self

point()

public point(string $column) : self
Parameters
$column : string
Return values
self

polygon()

public polygon(string $column) : self
Parameters
$column : string
Return values
self

primary()

public primary() : self
Return values
self

rememberToken()

public rememberToken() : void

set()

public set(string $column, array<string|int, mixed> $values) : self
Parameters
$column : string
$values : array<string|int, mixed>
Return values
self

smallInteger()

public smallInteger(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

string()

public string(string $column[, int $length = 255 ]) : self
Parameters
$column : string
$length : int = 255
Return values
self

text()

public text(string $column) : self
Parameters
$column : string
Return values
self

time()

public time(string $column[, int|null $precision = null ]) : self
Parameters
$column : string
$precision : int|null = null
Return values
self

timestamp()

public timestamp(string $column[, int|null $precision = null ]) : self
Parameters
$column : string
$precision : int|null = null
Return values
self

tinyInteger()

public tinyInteger(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

unique()

public unique() : self
Return values
self

unsigned()

public unsigned() : self
Return values
self

unsignedInteger()

public unsignedInteger(string $column[, int|null $length = null ]) : self
Parameters
$column : string
$length : int|null = null
Return values
self

year()

public year(string $column) : self
Parameters
$column : string
Return values
self

        
On this page

Search results