class Sequence extends AbstractAsset (View source)

Sequence structure.

Properties

protected string $_name from AbstractAsset
protected string|null $_namespace Namespace of the asset. If none isset the default namespace is assumed. from AbstractAsset
protected boolean $_quoted from AbstractAsset
protected integer $allocationSize
protected integer $initialValue
protected integer|null $cache

Methods

void
_setName(string $name)

Sets the name of this asset.

boolean
isInDefaultNamespace(string $defaultNamespaceName)

Is this asset in the default namespace?

string|null
getNamespaceName()

Gets the namespace name of this asset.

string
getShortestName(string $defaultNamespaceName)

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

string
getFullQualifiedName(string $defaultNamespaceName)

The normalized name is full-qualified and lowerspaced. Lowerspacing 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.

boolean
isQuoted()

Checks if this asset's name is quoted.

boolean
isIdentifierQuoted(string $identifier)

Checks if this identifier is quoted.

string
trimQuotes(string $identifier)

Trim quotes from the identifier.

string
getName()

Returns the name of this schema asset.

string
getQuotedName(AbstractPlatform $platform)

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

string
_generateIdentifierName(array $columnNames, string $prefix = '', integer $maxSize = 30)

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

__construct(string $name, integer $allocationSize = 1, integer $initialValue = 1, integer|null $cache = null)

No description

integer
getAllocationSize()

No description

integer
getInitialValue()

No description

integer|null
getCache()

No description

setAllocationSize(integer $allocationSize)

No description

setInitialValue(integer $initialValue)

No description

setCache(integer $cache)

No description

boolean
isAutoIncrementsFor(Table $table)

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

void
visit(Visitor $visitor)

No description

Details

protected void _setName(string $name)

Sets the name of this asset.

Parameters

string $name

Return Value

void

boolean isInDefaultNamespace(string $defaultNamespaceName)

Is this asset in the default namespace?

Parameters

string $defaultNamespaceName

Return Value

boolean

string|null getNamespaceName()

Gets the namespace name of this asset.

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

Return Value

string|null

string getShortestName(string $defaultNamespaceName)

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

Parameters

string $defaultNamespaceName

Return Value

string

string getFullQualifiedName(string $defaultNamespaceName)

The normalized name is full-qualified and lowerspaced. Lowerspacing 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.

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

Parameters

string $defaultNamespaceName

Return Value

string

boolean isQuoted()

Checks if this asset's name is quoted.

Return Value

boolean

protected boolean isIdentifierQuoted(string $identifier)

Checks if this identifier is quoted.

Parameters

string $identifier

Return Value

boolean

protected string trimQuotes(string $identifier)

Trim quotes from the identifier.

Parameters

string $identifier

Return Value

string

string getName()

Returns the name of this schema asset.

Return Value

string

string getQuotedName(AbstractPlatform $platform)

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

Parameters

AbstractPlatform $platform

Return Value

string

protected string _generateIdentifierName(array $columnNames, string $prefix = '', integer $maxSize = 30)

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

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

array $columnNames
string $prefix
integer $maxSize

Return Value

string

__construct(string $name, integer $allocationSize = 1, integer $initialValue = 1, integer|null $cache = null)

Parameters

string $name
integer $allocationSize
integer $initialValue
integer|null $cache

integer getAllocationSize()

Return Value

integer

integer getInitialValue()

Return Value

integer

integer|null getCache()

Return Value

integer|null

Sequence setAllocationSize(integer $allocationSize)

Parameters

integer $allocationSize

Return Value

Sequence

Sequence setInitialValue(integer $initialValue)

Parameters

integer $initialValue

Return Value

Sequence

Sequence setCache(integer $cache)

Parameters

integer $cache

Return Value

Sequence

boolean isAutoIncrementsFor(Table $table)

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

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

Parameters

Table $table

Return Value

boolean

void visit(Visitor $visitor)

Parameters

Visitor $visitor

Return Value

void