gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.31k stars 279 forks source link

method hasDatabase() is not documented on site #804

Closed masakik closed 4 years ago

masakik commented 4 years ago

Hi, I found just on api documentation (nowhere else) the use of hasDatabase method, usefull for multiple connection setting. Maybe it could be documented at redbeanphp.com site as a way of checking if a database is already set to a key. My example:

if (!R::hasDatabase('db2')) {
    R::addDatabase('db2', 'sqlite:/path/db2.db');
}
R::selectDatabase('db2');
gabordemooij commented 4 years ago

API is more elaborated than site manual.