feat: add support for lane_op
and lane_trans
DB sessions, models
This commit is contained in:
parent
bf6bf63e68
commit
e6921c8533
6 changed files with 158 additions and 2 deletions
|
@ -60,6 +60,24 @@ class CoreposHandler(GenericHandler):
|
|||
|
||||
return model
|
||||
|
||||
def get_model_lane_op(self):
|
||||
"""
|
||||
Returns the :term:`data model` module for CORE Lane 'op' DB,
|
||||
i.e. :mod:`pycorepos:corepos.db.lane_op.model`.
|
||||
"""
|
||||
from corepos.db.lane_op import model
|
||||
|
||||
return model
|
||||
|
||||
def get_model_lane_trans(self):
|
||||
"""
|
||||
Returns the :term:`data model` module for CORE Lane 'trans'
|
||||
DB, i.e. :mod:`pycorepos:corepos.db.lane_trans.model`.
|
||||
"""
|
||||
from corepos.db.lane_trans import model
|
||||
|
||||
return model
|
||||
|
||||
def make_session_office_op(self, dbkey='default', **kwargs):
|
||||
"""
|
||||
Make a new :term:`db session` for the CORE Office 'op' DB.
|
||||
|
@ -99,6 +117,32 @@ class CoreposHandler(GenericHandler):
|
|||
kwargs['bind'] = self.config.core_office_arch_engines[dbkey]
|
||||
return Session(**kwargs)
|
||||
|
||||
def make_session_lane_op(self, dbkey='default', **kwargs):
|
||||
"""
|
||||
Make a new :term:`db session` for the CORE Lane 'op' DB.
|
||||
|
||||
:returns: Instance of
|
||||
:class:`pycorepos:corepos.db.lane_op.Session`.
|
||||
"""
|
||||
from corepos.db.lane_op import Session
|
||||
|
||||
if 'bind' not in kwargs:
|
||||
kwargs['bind'] = self.config.core_lane_op_engines[dbkey]
|
||||
return Session(**kwargs)
|
||||
|
||||
def make_session_lane_trans(self, dbkey='default', **kwargs):
|
||||
"""
|
||||
Make a new :term:`db session` for the CORE Lane 'trans' DB.
|
||||
|
||||
:returns: Instance of
|
||||
:class:`pycorepos:corepos.db.lane_trans.Session`.
|
||||
"""
|
||||
from corepos.db.lane_trans import Session
|
||||
|
||||
if 'bind' not in kwargs:
|
||||
kwargs['bind'] = self.config.core_lane_trans_engines[dbkey]
|
||||
return Session(**kwargs)
|
||||
|
||||
def get_office_url(self, require=False):
|
||||
"""
|
||||
Returns the base URL for the CORE Office web app.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue