gabordemooij / redbean

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

Sqlite connection don`t close #928

Closed rnr1721 closed 1 year ago

rnr1721 commented 1 year ago

Hi!


use RedBeanPHP\R;

        R::setup();
        var_dump(R::testConnection());
        R::close();
        var_dump(R::testConnection());

result:

bool(true)
bool(true)

Why does that connection not want to close? Or is it specific to sqlite?

Redbean 5.7 from composer

Lynesth commented 1 year ago

testConnection doesn't just tell you whether or not you're connected, but it actually does all the necessary steps in order to connect and then tells you whether you're connected or not.

rnr1721 commented 1 year ago

Yes, I did not think to look at the code of this method. Thank you!