public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement): ?string
    {
        switch ($this->schema) {
            case TableStructure::SCHEMA_MSSQL:
                $append = $primaryKey ? 'IDENTITY PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_OCI:
            case TableStructure::SCHEMA_PGSQL:
                $append = $primaryKey ? 'PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_SQLITE:
                $append = trim(($primaryKey ? 'PRIMARY KEY ' : '') . ($autoIncrement ? 'AUTOINCREMENT' : ''));
                break;

            case TableStructure::SCHEMA_CUBRID:
            case TableStructure::SCHEMA_MYSQL:
            default:
                $append = trim(($autoIncrement ? 'AUTO_INCREMENT ' : '') . ($primaryKey ? 'PRIMARY KEY' : ''));
        }

        return empty($append) ? null : $append;
    }
public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement): ?string
    {
        switch ($this->schema) {
            case TableStructure::SCHEMA_MSSQL:
                $append = $primaryKey ? 'IDENTITY PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_OCI:
            case TableStructure::SCHEMA_PGSQL:
                $append = $primaryKey ? 'PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_SQLITE:
                $append = trim(($primaryKey ? 'PRIMARY KEY ' : '') . ($autoIncrement ? 'AUTOINCREMENT' : ''));
                break;

            case TableStructure::SCHEMA_CUBRID:
            case TableStructure::SCHEMA_MYSQL:
            default:
                $append = trim(($autoIncrement ? 'AUTO_INCREMENT ' : '') . ($primaryKey ? 'PRIMARY KEY' : ''));
        }

        return empty($append) ? null : $append;
    }
public function prepareSchemaAppend ( bool $ primaryKey , bool $ autoIncrement ) : ? string { switch ( $ this -> schema ) { case TableStructure :: SCHEMA_MSSQL : $ append = $ primaryKey ? 'IDENTITY PRIMARY KEY' : '' ; break ; case TableStructure :: SCHEMA_OCI : case TableStructure :: SCHEMA_PGSQL : $ append = $ primaryKey ? 'PRIMARY KEY' : '' ; break ; case TableStructure :: SCHEMA_SQLITE : $ append = trim ( ( $ primaryKey ? 'PRIMARY KEY ' : '' ) . ( $ autoIncrement ? 'AUTOINCREMENT' : '' ) ) ; break ; case TableStructure :: SCHEMA_CUBRID : case TableStructure :: SCHEMA_MYSQL : default : $ append = trim ( ( $ autoIncrement ? 'AUTO_INCREMENT ' : '' ) . ( $ primaryKey ? 'PRIMARY KEY' : '' ) ) ; } return empty ( $ append ) ? null : $ append ; }
Prepares append SQL based on schema.
@param bool $primaryKey
@param bool $autoIncrement
@return string|null
Prepares append SQL based on schema .