Yuki Kishimoto on Nostr: Because I was using SQLite only for persistence. When it was opened, all the data was ...
Because I was using SQLite only for persistence. When it was opened, all the data was loaded into RAM, in the DatabaseHelper. It was basically an in-memory database with SQLite as persistence.
Using the NostrDatabase traits, you can implement your own database, and use it in rust-nostr. But if anyone is interested to open a PR to implement a "pure" SQLite backend, I'll merge it.
Published at
2025-03-30 08:29:36Event JSON
{
"id": "521fc0fb8ef5afc026ffc0b94b5a29201fd426f92b410e23b7cf23f8105b31fa",
"pubkey": "68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272",
"created_at": 1743323376,
"kind": 1,
"tags": [
[
"e",
"da8d5e75016db61b91c7de15ee26bb6ed2defeb137373b790ecbbf750b6f941c",
"",
"root"
],
[
"p",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
],
[
"p",
"11b9a89404dbf3034e7e1886ba9dc4c6d376f239a118271bd2ec567a889850ce"
]
],
"content": "Because I was using SQLite only for persistence. When it was opened, all the data was loaded into RAM, in the DatabaseHelper. It was basically an in-memory database with SQLite as persistence.\n\nUsing the NostrDatabase traits, you can implement your own database, and use it in rust-nostr. But if anyone is interested to open a PR to implement a \"pure\" SQLite backend, I'll merge it.",
"sig": "f6d0f72bba3bb9094f2285a2a1d799cd575d2858265238144d783b35eecf87b0dba92f330392afb9ab5eb32526523eae1cc29a3cb9c2b6831ce9f99e03b48894"
}