ungana / sqlx-sqlite-database-connection

An example project showing how to use SQLx and SQLite together in a Rust project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLx with SQLite Example

This is an example of using SQLx with SQLite. It doesn't do too much, but it you can see a simple example of how to setup your project to use the two together.

Getting Started

You will need Rust, SQLite(if your operating system does not already have it) and the SQLx CLI. Once installed, navigate to this cloned project in the terminal and run:

cargo run

This project simply adds "John Doe" to an example.db file. You can see the additions using the SQLite app of your choice and checking the Users table.

SELECT * FROM Users;

About

An example project showing how to use SQLx and SQLite together in a Rust project.


Languages

Language:Rust 100.0%