diesel
rusqlite-model
Our great sponsors
diesel | rusqlite-model | |
---|---|---|
64 | 1 | |
10,152 | 3 | |
2.1% | - | |
9.5 | 0.0 | |
4 days ago | 3 months ago | |
Rust | Rust | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
diesel
-
Why use Rust on the back end?
Please reach out on the diesel discussion forum[1] about the lacking dev experience. I'm happy to discuss these issues and potential solutions there.
-
How to create a web app in Rust with Rocket and Diesel
As is customary for most web frameworks, Rocket allows you to use object-relational mappers (ORMs) as a data access layer for your application. Rocket is ORM agnostic, which means you can use any Rust ORM of your choice to access your database in your Rocket application. In this article, we’ll use Diesel ORM as our ORM of choice as it’s one of the most popular Rust ORMs. At the time of writing, Diesel ORM supports PostgreSQL, MySQL, and SQLite databases.
-
Hey Rustaceans! Got a question? Ask here (10/2023)!
The Diesel getting started guide is explicitly written for using PostgreSQL as your database system. It is using some parts of SQL that are not supported by SQLite. You can follow the equivalent SQLite code by looking at this diesel example. In the concrete case that error is caused by the fact that only quite new SQLite versions support returning clauses. These support is behind an off-by-default feature flag and requires using an up to date SQLite version.
-
I wanna be a crab.
“watched prime yell about VIM for hours” lmao well done, this got me. A lot of the resources people have already suggested are great! One thing I like to do after going through the documentation for a language is trying to build something like a simple rest api to get a better feel. Rocket (https://rocket.rs) and actix web (https://actix.rs) are popular web frameworks and then for ORM diesel (https://diesel.rs).
-
Looking for Rust Project Ideas for Semester Project - Any Suggestions?
You should minimise the non-Rust parts though, don't get tied up in anything else or your scope will quickly outgrow a two month deadline. Use something like https://dummyjson.com/ as a foundation to skip the need to find/generate/build database + content, or use a combination of postgres/postgrest to get a quick API + database and use faker to fill it up quickly. That'd allow you to use something like SQLx or https://diesel.rs/ in the application.
-
Rust and its friendly crates: Don't miss out on them!
diesel
-
Ormlite: An ORM in Rust for developers that love SQL
Congratulations to the release. I know all of this is hard work. I would like to invite you to submit a ormlite implementation to the diesel benchmark collection. As soon as that's merged you will get regular reports here. The relevant code is here in the diesel repository.
-
Destructive move in C++2
Doing arbitrary syntax transformations in procedural macros is not powerful enough? Does C++ have something like serde or diesel?
-
State of Rust for web backends
I've been building a relatively small project with axum and diesel, and I'm pretty happy with it.
-
Using Rust at a startup: A cautionary tale
There's also Diesel and SeaORM for higher level interfaces.
rusqlite-model
-
Show HN: Write universally accessible SQL, not library-specific ORM wrapper APIs
I'm quite anti-ORM, though I've never not used one professionally (just because it's already been there / not my decision), so that might be different if I did for a while. I do think something's necessary though, and it maybe is a bit arbitrary where we draw the line for what's an 'ORM'?
For example, I really enjoyed using rusqlite for a little side project/personal thing, but found apart from anything else just the repetition of `(?,?,?,?,?,?)` any time I wanted to insert something was annoying, for example. I started working a bit on [0] .. I don't know if I'd call it an ORM, just so I didn't have to do that, and could write `Model { ... }.insert(&conn)` instead. But still write plain SQL queries, I just want easy mapping between db table and language 'model' struct/class; column and field/attr.
What are some alternatives?
sea-orm - 🐚 An async & dynamic ORM for Rust
sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
rustorm - an orm for rust
rbatis - Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL
r2d2 - A generic connection pool for Rust
tikv - Distributed transactional key-value database, originally created to complement TiDB
deuterium-orm - Fully typed SQL query builder for Rust [deprecated]
quaint - SQL Query AST and Visitor for Rust
prisma-client-rust - Type-safe database access for Rust
treasure - ORM for rust (journey begins)
SQLx - Portable SQL script editor/executor based on SQLClient and SQLite
juniper-from-schema - Schema first GraphQL in Rust with Juniper