src/Services/PDOs/Schemas/SQLiteSchema.php
private function extractFieldType($spec)
    {
        if (!preg_match('/(\w+)(?:\s*\(\s*([0-9]+)(?:\,\s*([0-9]+))?\s*\))?(?:\s*(\w+))?/s', strtoupper($spec), $match)) {
            return [null, null, null, null];
        }

        $dbType   = isset($match[1]) ? $match[1] : null;
        $size     = isset($match[2]) && $match[2] != '' ? (int)$match[2] : null;
        $scale    = isset($match[3]) && $match[2] != '' ? (int)$match[3] : null;
        $unsigned = isset($match[4]) && $match[4] == 'UNSIGNED';

        return [$dbType, $size, $scale, $unsigned];
    }
private function extractFieldType($spec)
    {
        if (!preg_match('/(\w+)(?:\s*\(\s*([0-9]+)(?:\,\s*([0-9]+))?\s*\))?(?:\s*(\w+))?/s', strtoupper($spec), $match)) {
            return [null, null, null, null];
        }

        $dbType   = isset($match[1]) ? $match[1] : null;
        $size     = isset($match[2]) && $match[2] != '' ? (int)$match[2] : null;
        $scale    = isset($match[3]) && $match[2] != '' ? (int)$match[3] : null;
        $unsigned = isset($match[4]) && $match[4] == 'UNSIGNED';

        return [$dbType, $size, $scale, $unsigned];
    }
private function extractFieldType ( $ spec ) { if ( ! preg_match ( '/(\w+)(?:\s*\(\s*([0-9]+)(?:\,\s*([0-9]+))?\s*\))?(?:\s*(\w+))?/s' , strtoupper ( $ spec ) , $ match ) ) { return [ null , null , null , null ] ; } $ dbType = isset ( $ match [ 1 ] ) ? $ match [ 1 ] : null ; $ size = isset ( $ match [ 2 ] ) && $ match [ 2 ] != '' ? ( int ) $ match [ 2 ] : null ; $ scale = isset ( $ match [ 3 ] ) && $ match [ 2 ] != '' ? ( int ) $ match [ 3 ] : null ; $ unsigned = isset ( $ match [ 4 ] ) && $ match [ 4 ] == 'UNSIGNED' ; return [ $ dbType , $ size , $ scale , $ unsigned ] ; }
Extract a given database field type into field type, size, scale and unsigned flag.

This function could be used by columns().

@param string $spec The database field specification; for example, "VARCHAR(255)" or "NUMERIC(10,2) UNSIGNED".
@return array
Extract a given database field type into field type size scale and unsigned flag .