Repository
ChatRepositoryImp
Bases: database.Interface.ChatRepository
Class to implement the ChatRepository interface.
Parameters:
-
ChatRepository
(database.Interface.ChatRepository
) –Parent class
Source code in src/project/database/Repository.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
State
Bases: enum.Enum
Enum to define the state keys for the session state.
Source code in src/project/database/Repository.py
9 10 11 12 13 14 15 16 17 18 19 |
|
create_or_update_session(key, init_value=None, updated_value=None)
Function to create or update a session state.
Parameters:
-
key
(any
) –description
-
init_value
(any
, default:None
) –Initial value. Defaults to None.
-
updated_value
(any
, default:None
) –Updated value. Defaults to None.
Returns:
-
any
–Value of the session state
Source code in src/project/database/Repository.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
get_value_from_state(key)
Function to get the value from the session state. Args: key (any): Key of the session state.
Returns:
-
any
–Value of the session state
Source code in src/project/database/Repository.py
41 42 43 44 45 46 47 48 49 |
|