method getCreateTable documentation in bbn\Db\Languages\Sqlite

function(string $table, array $model = NULL) { if (!$model) { $model = $this->modelize($table); } $st = 'CREATE TABLE ' . $this->escape($table) . ' (' . PHP_EOL; $done = false; foreach ($model['fields'] as $name => $col) { if (!$done) { $done = true; } else { $st .= ',' . PHP_EOL; } $st .= $this->getColumnDefinitionStatement($name, $col); } if (isset($model['keys']['PRIMARY'])) { $st .= ','.PHP_EOL.' PRIMARY KEY ('.X::join( array_map( function ($a) { return $this->escape($a); }, $model['keys']['PRIMARY']['columns'] ), ', ' ).')'; } $st .= PHP_EOL . ')'; return $st; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.