This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [dependencies] | |
// sqlx = { version = "0.4", features = ["runtime-async-std-rustls", "postgres"] } | |
// async-std = { version = "1", features = ["attributes"] } | |
// dotenv = "0.15" | |
// anyhow = "1" | |
// In root of project '.env' file with export DATABASE_URL="postgres://postgres:{DB_PASSWORD}@{DB_HOST}/{DB_NAME}" | |
// Rough DB Schema | |
// CREATE TABLE public.giant ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
[<AutoOpen>] | |
module Shared = | |
let equalsOn f thisObj (otherObj : obj) = | |
match otherObj with | |
| :? 'T as y -> (f thisObj = f y) | |
| _ -> false |