-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmermaid_diagram.txt
23 lines (20 loc) · 1.17 KB
/
mermaid_diagram.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sequenceDiagram
participant t as terminal
participant app as Main program (in app.py)
participant ar as #artist_repo class <br /> (in lib/#artist_repoistory.py)
participant db_conn as #database connection class in (in lib/#database_connection.py)
participant db as Postgres database
Note left of t: Flow of time <br />⬇ <br /> ⬇ <br /> ⬇
t->>app: Runs `#python app.py`
app->>db_conn: Opens connection to database by calling #connect method on #database connection class
db_conn->>db_conn: Opens database connection using PG and stores the connection
app->>ar: Calls #all method on #artist repository
ar->>db_conn: Sends SQL query by calling #execute method on #database connection
db_conn->>db: Sends query to database via the open database connection
db->>db_conn: Returns a #list of #dictionaries, one for each row of the #artists table
db_conn->>ar: Returns a #list of #dictionaries, one for each row of the #artists table
loop
ar->>ar: Loops through the #list and creates an #artist object for every row
end
ar->>app: Returns a #list of #artist objects
app->>t: Prints list of #artists to terminal