method hasIdIncrement documentation in bbn\Db\Languages\Sql

Return true if in the table there are fields with auto-increment.

Working only on mysql.

Example

X::dump($db->hasIdIncrement('table_users')); // (bool) 1 function(string $table) { return ($model = $this->modelize($table)) && isset($model['keys']['PRIMARY']) && (\count($model['keys']['PRIMARY']['columns']) === 1) && ($model['fields'][$model['keys']['PRIMARY']['columns'][0]]['extra'] === 'auto_increment'); }

Return true if in the table there are fields with auto-increment. 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.