Key Class

Aurora\Database\Schema Namespace


Constants

  • TYPE_INDEXindex
  • TYPE_PRIMARYprimary
  • TYPE_UNIQUEunique
  • TYPE_FOREIGNforeign
  • OPERATION_ADDadd
  • OPERATION_DROPdrop

Properties

name

Key name

protected $name: string

type

Key type

protected $type: string

operation

Key operation

protected $operation: string

columns

Key columns

protected $columns = []: array

Constructor

__construct

Constructor

Parameters

  • string $name — Key name

Signature

public function __construct(string $name)

Methods

__construct

Constructor

Parameters

  • string $name — Key name

Signature

public function __construct(string $name)

name

Set key name

Parameters

  • string $name — Key name

Return Value

  • $this

Signature

public function name(string $name)

type

Set key type

Parameters

  • string $type — Key type

Return Value

  • $this

Signature

public function type(string $type)

columns

Set key columns

Parameters

  • mixed $columns — Key columns

Return Value

  • $this

Signature

public function columns(mixed $columns)

drop

Set key operation flag to drop

Return Value

  • $this

Signature

public function drop()

getName

Get key name

Return Value

  • string

Signature

public function getName(): string

getType

Get key type

Return Value

  • string

Signature

public function getType(): string

getColumns

Get key columns

Return Value

  • array

Signature

public function getColumns(): array

getOperation

Get key operation flag

Return Value

  • string

Signature

public function getOperation(): string

Go to top