I just fell in love with #sqlx testing features. Using it with the #speculoos crate for test assertions is a pleasure.
I did develop and publish it in about 6 days in my free time. For people that say that #Rust is an overkill for backends 🤨
It is often a matter of practice to be productive in any language. Rust already offers the ecosystem.
I did write a helper library that is highly opinionated to be even more productive and share code between my #Axum + #SQLx + #Askama projects:
https://docs.rs/oxi-axum-helpers/latest/oxi_axum_helpers/
It is not documented yet 😅 I will document it and might even write a blog post about it 😃
#rust #Axum #sqlx #askama #rustlang
found about #sqlx that i forgot to use raw string literals for sql statements, client was given the super power to terminate and inject sql for free. :D
https://mo8it.com/blog/sqlx-integration-in-axum
:ferris: #Rust backends are relatively easy after learning the basics of Rust!
:postgresql: This blog post is about using SQLx to interact with a #PostgreSQL database in an Axum backend.
⭐️ It does also show how to use states and return JSON in Axum.
It has been a while since my last blog post. This is because the new semester has started. I am trying my best 😅
Would you prefer shorter posts? ✂️
Made with ❤️ for the #RustLang community.
#sqlx #Axum #rust #postgresql #rustlang
I have removed my Github stars from projects related to Web with #Python (Flask, SQLAlchemy, Guinicorn etc.) :python:
I feel guilty about me using them in the past... Poor users of my Python backend... :blobfoxmelt3:
#Axum and #SQLx, let's dominate backends with #RustLang! :ferris: 🚀
Why? Reliability, correctness, performance, resource usage, etc.
#python #Axum #sqlx #rustlang #rust
En esta sesión número 20 del Taller de Rust continuamos con el trabajo de Rust y SQLx para poder operar con nuestro lenguaje favorito y bases de datos, en especial postgres.
Ccreación de la API para hacer INSERT, es decir crear nuevos datos en las tablas.
Además revisamos la creción de test, realizando un par de pruebas sencillas, a modo de introducción.
#rust #unittest #sql #sqlx #postgres #fixtures
Building a project using #rust #postgresql #sqlx #docker all of them are new to me. Maybe I took too much at once :blobcatdunno: atleast im learning new stuff.
#rust #postgresql #sqlx #docker
Sesión 19 del *Taller de Rust* trata de trabajar con el lenguaje, creando consultas sql a la database *postgres*. Mejoramos las funciones de consulta a ciudades y temperatura, incluyendo filtros
especificos que repercuten en una consulta un poco más
compleja. Aprendemos a usar el crate *clap*.
Finalizamos con la implementación del
sistema de migraciones.
#rust #programacion #database #sqlx #postgres #migration
Sesión 17 Taller de Rust.
En esta sesión continuamos parte del tutorial de Tokio, aprendemos el uso de canales de distintos tipos para enviar y recibir mensajes.
Hacemos un repaso de variables de ambiente usando rust, los crates dotenv y env.
Además iniciamos una práctica de ejemplo para crear o administrar base de datos posgres, y con rust inicio del crate sqlx básico para realizar consultas.
#rust #db #sql #sqlx #tokio #channels #programacion #software #workshop #emacs
https://www.youtube.com/watch?v=3mFJqFO2vSI
#rust #db #sql #sqlx #tokio #channels #programacion #software #workshop #emacs
@kubikpixel @AstraKernel I made a blog post about #SQLx that reminded me of this thread 😃
🧰 SQLx - Interacting with databases in #Rust
https://mo8it.com/blog/sqlx-interacting-with-databases-in-rust
3️⃣ In my third blog post, I present #SQLx with #PostgreSQL and show the power/magic of compile-time checked queries.
💉 The blog post also shows if SQLx is safe against SQL injections.
🤓 At the end, I give my opinion about why I would not go back to ORMs after trying SQLx.
😇 I have been working on this post for about a week. If you read it, please give me some feedback for the next posts. See the first comment.
#rust #sqlx #postgresql #rustlang
2️⃣ My second blog post:
Containerized #PostgreSQL with rootless #Podman :container_linux:
https://mo8it.com/blog/containerized-postgresql-with-rootless-podman
It is a short introduction to running rootless Podman containers for development or on a server with PostgreSQL as a central example.
This is an optional preparation for the next post about using #sqlx in #RustLang 🦀
Running PostgreSQL with Podman is something that was asked at least twice on Mastodon from devs using #Fedora #Silverblue
Feedback appreciated 😇
#postgresql #podman #sqlx #rustlang #fedora #silverblue #linux
The next planed topics are:
- Containerized #PostgreSQL in #Docker and #Podman
- Databases in Rust with #sqlx
- Rust GUIs with #egui
- Rapid prototyping in Rust
- Configuration files (e.g. YAML) with #serde
- #Email client in Rust with #lettre
Any suggestions? 😀
If you are only interested in Rust, you can subscribe to the feed of the #Rust tag only: https://mo8it.com/tags
Feel free to take inspiration if you like the website. Here is the source code: https://codeberg.org/mo8it/website
#postgresql #docker #podman #sqlx #egui #serde #email #lettre #rust #tailwindcss
Is there an accepted pattern for replacing your database pool in an #actixweb application? As in, the system is rotating the database password, updates the file handle it’s passed through to the application, and then my application should reconnect using the new credentials and drop the old connection.
#rustlang #rust #sqlx #ProgrammingPatterns
#actixweb #rustlang #rust #sqlx #programmingpatterns