Module entity::global [−][src]
Functions
db | 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 |
destroy_db | Removes the global database reference |
has_db | Returns true if the global database has been assigned |
set_db | Sets the global database to the specific database implementation |
set_db_from_box | Sets the global database to the database trait object |
set_db_from_rc | Sets the global database to the strong reference and returns a weak reference to the same database |
with_db | Executes the given function with the provided database as the new, global
database, destroying the database once the function completes; locks
execution of this function, only allowing one call to |
with_db_from_box | Executes the given function with the provided database as the new, global
database, destroying the database once the function completes; locks
execution of this function, only allowing one call to |
with_db_from_rc | Executes the given function with the provided database as the new, global
database, destroying the database once the function completes; locks
execution of this function, only allowing one call to |