Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/database/test_data_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ def test_data_api(cluster_arn, secret_arn, region):
resourceArn=cluster_arn,
secretArn=secret_arn,
database='alex',
sql='SELECT 1 as test_connection, current_timestamp as server_time'
sql='SELECT 1 as test_connection, current_timestamp as server_time, version() as db_version'
)

if response['records']:
test_val = response['records'][0][0].get('longValue')
server_time = response['records'][0][1].get('stringValue')
db_version = response['records'][0][2].get('stringValue')
print(f" ✅ Connection successful!")
print(f" Server time: {server_time}")
print(f" Database version: {db_version}")
else:
print(" ❌ Query executed but returned no results")

Expand Down