*Note I am using the PDO connection with a mariadb database, this may be different for other connection implementation types or database types.
The documentation states that the DBUtil::create_database function returns the number of rows affected. Yet it if you run it with if_not_exist set to true and a database that already exists, it still returns 1 instead of 0. If you run a create if not exists query in the mariadb shell on a database that already exists, it returns 0 rows affected.
Example query to test: run DBUtil::create_database('test'); twice.
Debug::dump( DBUtil::create_database('test') ); results in the dump saying that this is a boolean and not an integer.
is_bool( DBUtil::create_database('test') ); confirms it is a boolean as well.
Diving into the source code I followed it from DBUtil:create_database-> Database_Connection::schema->Schema::create_database->Database_Connection::query and then got lost in the PDO query implementation.