PlatformInformation

class \TYPO3\CMS\Core\Database\Platform\PlatformInformation

Helper to handle platform specific details

Table of Contents

Properties

$bindParameterLimits  : array
$charSetMap  : string[]
$databaseCreateWithCharsetMap  : string[]
$identifierLimits  : array

Methods

getCharset()  : string
Return the encoding of the given platform
getDatabaseCreateStatementWithCharset()  : string
Return the statement to create a database with the desired encoding for the given platform
getMaxBindParameters()  : int
Return information about the maximum number of bound parameters supported on this platform
getMaxIdentifierLength()  : int
Return information about the maximum supported length for a SQL identifier.
getPlatformIdentifier()  : string
Return the platform shortname to use as a lookup key

Properties

$bindParameterLimits

protected static array $bindParameterLimits = ['mysql' => 65535, 'postgresql' => 34464, 'sqlite' => 999]

$charSetMap

protected static string[] $charSetMap = ['mysql' => 'utf8mb4', 'postgresql' => 'UTF8', 'sqlite' => 'utf8']

$databaseCreateWithCharsetMap

protected static string[] $databaseCreateWithCharsetMap = ['mysql' => 'CHARACTER SET %s', 'postgresql' => "ENCODING '%s'"]

$identifierLimits

protected static array $identifierLimits = ['mysql' => 63, 'postgresql' => 63, 'sqlite' => 1024]

Methods

getCharset()

Return the encoding of the given platform

public static getCharset(AbstractPlatform $platform) : string

Parameters

$platform : AbstractPlatform

Return values

string

getDatabaseCreateStatementWithCharset()

Return the statement to create a database with the desired encoding for the given platform

public static getDatabaseCreateStatementWithCharset(AbstractPlatform $platform, string $databaseName) : string

Parameters

$platform : AbstractPlatform
$databaseName : string

Return values

string

getMaxBindParameters()

Return information about the maximum number of bound parameters supported on this platform

public static getMaxBindParameters(AbstractPlatform $platform) : int

Parameters

$platform : AbstractPlatform

Return values

int

getMaxIdentifierLength()

Return information about the maximum supported length for a SQL identifier.

public static getMaxIdentifierLength(AbstractPlatform $platform) : int

Parameters

$platform : AbstractPlatform

Return values

int

getPlatformIdentifier()

Return the platform shortname to use as a lookup key

protected static getPlatformIdentifier(AbstractPlatform $platform) : string

Parameters

$platform : AbstractPlatform

Tags

throws
RuntimeException

Return values

string
On this page