-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_access_list.txt
More file actions
44 lines (40 loc) · 1.54 KB
/
database_access_list.txt
File metadata and controls
44 lines (40 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
1. analyzer/dist/database.js
- Connects to PostgreSQL using the pg library.
- Handles:
- connect() and disconnect() sessions
- fetchProfiles(limit, offset) → SELECT from crawler_data
- fetchProfileById(id) → SELECT from crawler_data
- fetchExistingRecord(profileUrl) → SELECT from unconfirmed_alumni
- insertUnconfirmedAnalyzerRecord(record) → INSERT / UPDATE unconfirmed_alumni
- Tables Accessed:
- crawler_data
- unconfirmed_alumni
- confirmed_alumni (future use)
- Action Types: READ / WRITE / UPDATE
2. analyzer/dist/main.js
- Calls functions from database.js to perform analysis storage.
- Sequence:
- Reads profiles using fetchProfiles()
- Checks duplicates with fetchExistingRecord()
- Inserts new analyzed results using insertUnconfirmedAnalyzerRecord()
- Tables Accessed:
- crawler_data
- unconfirmed_alumni
- Action Types: READ / WRITE
3. prisma/schema.prisma
- Defines structure and relationships of the database models.
- Models/Tables:
-confirmed_alumni
- unconfirmed_alumni
- crawler_data
- enricher_data
- Used by Prisma ORM for schema migrations and client generation.
- Action Type: Definition / Configuration
4. .env
- Stores database connection string.
- Example:
DATABASE_URL="file:./prisma/dev.db"
or
DATABASE_URL="postgresql://user:password@localhost:5432/naf_db"
- Used by Prisma or pg library to connect to the database.
- Action Type: Connection Setup