| Total Complexity | 5 | 
| Total Lines | 62 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 14 | class SQLiteTableCreator  | 
            ||
| 15 | { | 
            ||
| 16 | /**  | 
            ||
| 17 | * 连接  | 
            ||
| 18 | *  | 
            ||
| 19 | * @var Connection  | 
            ||
| 20 | */  | 
            ||
| 21 | protected $connection;  | 
            ||
| 22 | |||
| 23 | /**  | 
            ||
| 24 | * 字段  | 
            ||
| 25 | *  | 
            ||
| 26 | * @var Fields  | 
            ||
| 27 | */  | 
            ||
| 28 | protected $fields;  | 
            ||
| 29 | |||
| 30 | const ENGINE_MyISAM = 'MyISAM';  | 
            ||
| 31 | const ENGINE_InnoDB = 'InnoDB';  | 
            ||
| 32 | |||
| 33 | protected $name;  | 
            ||
| 34 | protected $engine = self::ENGINE_InnoDB;  | 
            ||
| 35 | protected $comment;  | 
            ||
| 36 | |||
| 37 | protected $collate;  | 
            ||
| 38 | protected $charset = 'utf8mb4';  | 
            ||
| 39 | |||
| 40 | protected $auto;  | 
            ||
| 41 | protected $foreignKeys;  | 
            ||
| 42 | |||
| 43 | public function __construct(Connection $connection, Fields $fields)  | 
            ||
| 48 | }  | 
            ||
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * @return bool  | 
            ||
| 52 | * @throws SQLException  | 
            ||
| 53 | */  | 
            ||
| 54 | public function create()  | 
            ||
| 59 | }  | 
            ||
| 60 | |||
| 61 | protected function seekField(Field $field)  | 
            ||
| 62 |     { | 
            ||
| 63 | $name = $field->getName();  | 
            ||
| 64 | $this->fields[$name] = $field;  | 
            ||
| 65 |         if ($foreign = $field->getForeignKey()) { | 
            ||
| 66 | $this->foreignKeys[$name] = $foreign;  | 
            ||
| 67 | }  | 
            ||
| 68 | return $this;  | 
            ||
| 69 | }  | 
            ||
| 70 | |||
| 71 | |||
| 72 | protected function toSQL()  | 
            ||
| 76 | }  | 
            ||
| 77 | }  | 
            ||
| 78 |