We recently launched the rsfbclient-diesel adapter, which enabled the diesel to work with the Firebird database. This post works as a continuation of

Accessing Firebird With Diesel and Rust

submited by
Style Pass
2022-09-22 08:00:24

We recently launched the rsfbclient-diesel adapter, which enabled the diesel to work with the Firebird database.

This post works as a continuation of my previous post, where I showed how to use Firebird with Rust. Now let’s learn how to improve this usage with an ORM layer.

To facilitate our understanding, we will implement a CRUD CLI tool with the job table from the example database employee.fdb. This database comes with your Firebird installation, but it can also be found in the examples/empbuild folder extracted from the official site.

We need to start including the diesel and rsfbclient-diesel dependencies in our Cargo.toml file:

To manipulate some table with diesel, we need to declare the fields and the struct of this table. In a new module schema.rs we will declare our job table:

Leave a Comment