scouting: Migrate database code to gorm

This patch migrates our `db.go` from raw SQL code to the gorm library.
https://gorm.io/index.html

It's not fantastic, but it's better than what we had. We might want to
investigate other ORMs later.

The functionality should be the same as before.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I986f74361fef1fac50b5499118b0af1d237f85f1
diff --git a/scouting/db/BUILD b/scouting/db/BUILD
index 7fbd2e2..154cab6 100644
--- a/scouting/db/BUILD
+++ b/scouting/db/BUILD
@@ -6,7 +6,12 @@
     importpath = "github.com/frc971/971-Robot-Code/scouting/db",
     target_compatible_with = ["@platforms//cpu:x86_64"],
     visibility = ["//visibility:public"],
-    deps = ["@com_github_jackc_pgx//stdlib"],
+    deps = [
+        "@io_gorm_driver_postgres//:postgres",
+        "@io_gorm_gorm//:gorm",
+        "@io_gorm_gorm//clause",
+        "@io_gorm_gorm//logger",
+    ],
 )
 
 go_test(
@@ -18,4 +23,5 @@
     ],
     embed = [":db"],
     target_compatible_with = ["@platforms//cpu:x86_64"],
+    deps = ["@com_github_davecgh_go_spew//spew"],
 )