Why Nostr? What is Njump?
2023-11-10 18:28:11
in reply to

Dusty Pomerleau on Nostr: npub1kj80k…c0urt There are a lot of potential approaches, but you can definitely ...

There are a lot of potential approaches, but you can definitely write a single function for cases like this. SQLx will let you pass in an argument and then bind that in the query using Postgres variable syntax. Sorry I'm on mobile, but here's an example where I capture a param from a URL and then use it in the query as $1 (so you can imagine ORDER BY $2 LIMIT $3, etc.):

Author Public Key
npub1t007tscc3gj0wmhaxajgjvxc4k37gkykr5pm9cxkyktdfamwgauqjg5tp0