2024-07-22 Backend Code Review

 

parasti šo izmantojam psycopg2

 

asyncpg https://www.perplexity.ai/search/asyncpg-named-sql-query-mdyjT5JGQP2b48svzS6xfg

image-20240722153538631

 

Piemērs kā jāizskatās ControllerDatabase funkcijām

 

image-20240722154427768

Startup uztaisa pool un tad ControllerDatabase izmanto https://www.perplexity.ai/search/give-example-fastapi-psycopg2-C.04CzVHSYadcs8xowkCZQ

 

 

image-20240722153827395

 

image-20240722154446838

 

Select ar zvaigznīti

 

image-20240722154709964

image-20240722154953634

 

 

image-20240722155032666

 

image-20240722155107600