/** * return primary if set, false otherwise * * @param string $table table * @param string $schema schema * * @return mixed primary index or false if no one exists */ public static function getPrimary($table, $schema) { Index::_loadIndexes($table, $schema); if (isset(Index::$_registry[$schema][$table]['PRIMARY'])) { return Index::$_registry[$schema][$table]['PRIMARY']; } else { return false; } }