entity::global
pub fn db() -> WeakDatabaseRc
Returns a weak reference to the global database if it is set, otherwise will return a weak reference that will resolve to None when upgrading