-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#135: Add skeleton outline for new python-icat backend
- Loading branch information
1 parent
e4db23b
commit c2e09bf
Showing
5 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ venv/ | |
*.pyc | ||
logs.log | ||
config.json | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "/root/venvs/datagateway-api-36/bin/python" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
from common.backend import Backend | ||
from common.helpers import requires_session_id, queries_records | ||
#from common.python_icat_helpers import | ||
|
||
|
||
class PythonICATBackend(Backend): | ||
""" | ||
Class that contains functions to access and modify data in an ICAT database directly | ||
""" | ||
|
||
def login(self, credentials, mnemonic): | ||
pass | ||
|
||
@requires_session_id | ||
def get_session_details(self, session_id): | ||
pass | ||
|
||
@requires_session_id | ||
def refresh(self, session_id): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def logout(self, session_id): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def get_with_filters(self, session_id, table, filters): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def create(self, session_id, table, data): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def update(self, session_id, table, data): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def get_one_with_filters(self, session_id, table, filters): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def count_with_filters(self, session_id, table, filters): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def get_with_id(self, session_id, table, id): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def delete_with_id(self, session_id, table, id): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def update_with_id(self, session_id, table, id, data): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def get_instrument_facilitycycles_with_filters(self, session_id, instrument_id, filters): | ||
pass | ||
|
||
@requires_session_id | ||
@queries_records | ||
def count_instrument_facilitycycles_with_filters(self, session_id, instrument_id, filters): | ||
pass | ||
#return get_facility_cycles_for_instrument_count(instrument_id, filters) | ||
|
||
@requires_session_id | ||
@queries_records | ||
def get_instrument_facilitycycle_investigations_with_filters(self, session_id, instrument_id, facilitycycle_id, filters): | ||
pass | ||
#return get_investigations_for_instrument_in_facility_cycle(instrument_id, facilitycycle_id, filters) | ||
|
||
@requires_session_id | ||
@queries_records | ||
def count_instrument_facilitycycles_investigations_with_filters(self, session_id, instrument_id, facilitycycle_id, filters): | ||
pass | ||
#return get_investigations_for_instrument_in_facility_cycle_count(instrument_id, facilitycycle_id, filters) | ||
|
Empty file.