ramp_database.tools.database.get_extension

ramp_database.tools.database.get_extension(session, extension_name)

Get extension from the database.

Parameters
sessionsqlalchemy.orm.Session

The session to directly perform the operation on the database.

extension_namestr or None

The name of the extension to query. If None, all the extensions will be queried.

Returns
extensionramp_database.model.Extension or list of ramp_database.model.Extension

The queried extension.