Documentation

Sequence extends AbstractAsset
in package

Sequence structure.

Table of Contents

Properties

$_name  : string
$_namespace  : string|null
Namespace of the asset. If none isset the default namespace is assumed.
$_quoted  : bool
$allocationSize  : int
$cache  : int|null
$initialValue  : int

Methods

__construct()  : mixed
getAllocationSize()  : int
getCache()  : int|null
getFullQualifiedName()  : string
The normalized name is full-qualified and lower-cased. Lower-casing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.
getInitialValue()  : int
getName()  : string
Returns the name of this schema asset.
getNamespaceName()  : string|null
Gets the namespace name of this asset.
getQuotedName()  : string
Gets the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.
getShortestName()  : string
The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.
isAutoIncrementsFor()  : bool
Checks if this sequence is an autoincrement sequence for a given table.
isInDefaultNamespace()  : bool
Is this asset in the default namespace?
isQuoted()  : bool
Checks if this asset's name is quoted.
setAllocationSize()  : Sequence
setCache()  : Sequence
setInitialValue()  : Sequence
visit()  : void
_generateIdentifierName()  : string
Generates an identifier from a list of column names obeying a certain string length.
_setName()  : void
Sets the name of this asset.
isIdentifierQuoted()  : bool
Checks if this identifier is quoted.
trimQuotes()  : string
Trim quotes from the identifier.

Properties

$_namespace

Namespace of the asset. If none isset the default namespace is assumed.

protected string|null $_namespace

$allocationSize

protected int $allocationSize = 1

$initialValue

protected int $initialValue = 1

Methods

__construct()

public __construct(string $name[, int $allocationSize = 1 ][, int $initialValue = 1 ][, int|null $cache = null ]) : mixed
Parameters
$name : string
$allocationSize : int = 1
$initialValue : int = 1
$cache : int|null = null

getAllocationSize()

public getAllocationSize() : int
Return values
int

getCache()

public getCache() : int|null
Return values
int|null

getFullQualifiedName()

The normalized name is full-qualified and lower-cased. Lower-casing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.

public getFullQualifiedName(string $defaultNamespaceName) : string

Every non-namespaced element is prefixed with the default namespace name which is passed as argument to this method.

Parameters
$defaultNamespaceName : string
Tags
deprecated

Use getNamespaceName() and getName() instead.

Return values
string

getInitialValue()

public getInitialValue() : int
Return values
int

getName()

Returns the name of this schema asset.

public getName() : string
Return values
string

getNamespaceName()

Gets the namespace name of this asset.

public getNamespaceName() : string|null

If NULL is returned this means the default namespace is used.

Return values
string|null

getQuotedName()

Gets the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.

public getQuotedName(AbstractPlatform $platform) : string
Parameters
$platform : AbstractPlatform
Return values
string

getShortestName()

The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.

public getShortestName(string|null $defaultNamespaceName) : string
Parameters
$defaultNamespaceName : string|null
Return values
string

isAutoIncrementsFor()

Checks if this sequence is an autoincrement sequence for a given table.

public isAutoIncrementsFor(Table $table) : bool

This is used inside the comparator to not report sequences as missing, when the "from" schema implicitly creates the sequences.

Parameters
$table : Table
Return values
bool

isInDefaultNamespace()

Is this asset in the default namespace?

public isInDefaultNamespace(string $defaultNamespaceName) : bool
Parameters
$defaultNamespaceName : string
Return values
bool

isQuoted()

Checks if this asset's name is quoted.

public isQuoted() : bool
Return values
bool

setAllocationSize()

public setAllocationSize(int $allocationSize) : Sequence
Parameters
$allocationSize : int
Return values
Sequence

setInitialValue()

public setInitialValue(int $initialValue) : Sequence
Parameters
$initialValue : int
Return values
Sequence

_generateIdentifierName()

Generates an identifier from a list of column names obeying a certain string length.

protected _generateIdentifierName(array<string|int, string> $columnNames[, string $prefix = '' ][, int $maxSize = 30 ]) : string

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, however building idents automatically for foreign keys, composite keys or such can easily create very long names.

Parameters
$columnNames : array<string|int, string>
$prefix : string = ''
$maxSize : int = 30
Return values
string

_setName()

Sets the name of this asset.

protected _setName(string $name) : void
Parameters
$name : string

isIdentifierQuoted()

Checks if this identifier is quoted.

protected isIdentifierQuoted(string $identifier) : bool
Parameters
$identifier : string
Return values
bool

trimQuotes()

Trim quotes from the identifier.

protected trimQuotes(string $identifier) : string
Parameters
$identifier : string
Return values
string

        
On this page

Search results