Skip to content

[yt] how to use sql and rust, feat. rusqlite and diesel #64

@nazmulidris

Description

@nazmulidris

Repo: https://github.com/nazmulidris/rust-scratch/blob/main/sql

Topics:

  • Best practices for using sqlite to embed database using rusqlite

    • Manually handle migrations and table versioning by adding the version as a suffix to the table name (much like API endpoints)
  • Diesel ORM and migrations

    • manual migration creation and raw SQL generation
    • using Rust schema.rs to generate the SQL
    • handle programmatic migration handling in production binaries using macro.embed_migrations!
  • Alternatively using sled and kv struct from r3bl_core to use an embedded KV store, rather than an embedded relational database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions