Event JSON
{
"id": "66f8b2eaae5cb59471fb16c0a4ed1f33490cb9afcc4f5e13f4a45f8888478f9f",
"pubkey": "5bdfe5c3188a24f76efd37648930d8ada3e458961d03b2e0d62596d4f76e4778",
"created_at": 1699640891,
"kind": 1,
"tags": [
[
"p",
"b48efb662f8a90daebd8747f3ad60acb9c83a7f7c95b33d0f640d898ee5bf53e",
"wss://relay.mostr.pub"
],
[
"p",
"79c16d9c318f770b262a163ddc7d2c8c449ff553f4bec786d8479ebf207dfd4d",
"wss://relay.mostr.pub"
],
[
"e",
"5158662af9983405e1d67423eae1443590372c010438640100dfc42387107834",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://fosstodon.org/users/dpom/statuses/111387665434817602",
"activitypub"
]
],
"content": "nostr:npub1kj80ke3032gd467cw3ln44s2ewwg8flhe9dn858kgrvf3mjm75lqfc0urt 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.):\n\nhttps://cdn.fosstodon.org/media_attachments/files/111/387/665/341/217/693/original/f4dd59ec2c26b66d.png",
"sig": "44ecb56ee6150f74cb54ddbd7166ae8d87a7fc5ca0fa417849b33e2fcc961608e2414d1f426e231a04ac96ffed1a34df0a82823b90de6f5479be9f1936d7a627"
}