Adam Fortuna on Nostr: The last few days I've been learning Supabase for a project I'm helping out on. I'm ...
The last few days I've been learning Supabase for a project I'm helping out on. I'm very impressed with it so far.
I've always been hesitant about putting logic in a database due to how tough it is to test.
But Supabase has an answer for that!
You can create tests that are SQL transactions. These tests can even create users, login as users, test what that user should be able to access, test triggers and more.
Since these tests are just SQL, they're fast.
https://usebasejump.com/blog/testing-on-supabase-with-pgtapPublished at
2024-02-13 22:34:37Event JSON
{
"id": "02a0a586b5a50ceb56b05f86249a99bf9edf9ea7ab6fd5f8e776b00b0782c60c",
"pubkey": "5cf7f55d7d3955906288adf648774f6456ca2ef8e2248cfb05cbc86b5715bbd0",
"created_at": 1707863677,
"kind": 1,
"tags": [
[
"proxy",
"https://ruby.social/users/adam/statuses/111926553941633975",
"activitypub"
]
],
"content": "The last few days I've been learning Supabase for a project I'm helping out on. I'm very impressed with it so far.\n\nI've always been hesitant about putting logic in a database due to how tough it is to test.\n\nBut Supabase has an answer for that!\n\nYou can create tests that are SQL transactions. These tests can even create users, login as users, test what that user should be able to access, test triggers and more.\n\nSince these tests are just SQL, they're fast. \n\nhttps://usebasejump.com/blog/testing-on-supabase-with-pgtap",
"sig": "195e174a03b206a162af0523bc44949d2f9b90e6a4b02d816dc62b4d9c4cae0cf96e5b7a80efe94ee68793b5e33d1ca56b750b2b03e76e468df3449bf02de44e"
}