Our great sponsors
|9 days ago||14 days ago|
|Apache License 2.0||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.
Backend API recommendations
2 projects | /r/rust | 29 May 2023
for psql i feel like there's a wealth of things to choose from, like diesel perhaps https://crates.io/crates/diesel
5 projects | /r/rust | 26 May 2023
Essentially you would need to implement Backend + Connection (+ the whole bunch of helper traits) for this type. That's ~1kloc for all of that. The PR that introduced this feature has more details on the exact implementation that's generated.
New Rustacean Looking For Guidance
6 projects | /r/rust | 11 May 2023
What ORM do you use?
6 projects | /r/rust | 9 May 2023
some things are barely expressible in the type system. For example, window functions are unavailable (the issue is six years old). You can use raw SQL, but then it has the same problems sqlx has
Trait object with generic funtion: don't understand how to do it
3 projects | /r/rust | 2 May 2023
Have you considered using a library such as sqlx or Diesel? They’ll handle this for you and supports multiple backends
2 projects | /r/rust | 18 Apr 2023
This is a patch release that contains several bugfixes. Notably it contains a workaround for a name resolution bug in rust-analyzer that affected diesel's DSL. With this rust-analyzer should be able to provide type hints and completions in many more cases than before, although there are still issues with specific constructs including queries containing .filter()/.inner_join() and .left_join() expressions. These are still not recognized correctly by rust-analyzer.
How to handle unknown types?
2 projects | /r/rust | 2 Apr 2023
I can provide an example how to handle these kind of setup with diesel: https://github.com/diesel-rs/diesel/blob/master/diesel_dynamic_schema/tests/dynamic_values.rs
Why use Rust on the back end?
6 projects | news.ycombinator.com | 20 Mar 2023
Please reach out on the diesel discussion forum 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
5 projects | dev.to | 9 Mar 2023
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)!
6 projects | /r/rust | 6 Mar 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.
How to create a connection pool for MongoDB in Rust?
2 projects | /r/rust | 13 Apr 2022
When you look at r2d2 (https://crates.io/crates/r2d2), it says:
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
redis-rs - Redis library for rust
rusqlite-model - Model trait and derive implementation for rusqlite
deuterium-orm - Fully typed SQL query builder for Rust [deprecated]
rust-postgres - Native PostgreSQL driver for the Rust programming language
tikv - Distributed transactional key-value database, originally created to complement TiDB
quaint - SQL Query AST and Visitor for Rust
prisma-client-rust - Type-safe database access for Rust
rust-mysql-simple - Mysql client library implemented in rust.