Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitindahiya-dev/rust-sqlite-vault
Rust-based application that interacts with an SQLite database
https://github.com/nitindahiya-dev/rust-sqlite-vault
cli cli-app rust sqlite
Last synced: 1 day ago
JSON representation
Rust-based application that interacts with an SQLite database
- Host: GitHub
- URL: https://github.com/nitindahiya-dev/rust-sqlite-vault
- Owner: nitindahiya-dev
- Created: 2024-07-14T09:59:14.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-15T08:22:04.000Z (4 months ago)
- Last Synced: 2024-07-20T18:08:12.746Z (4 months ago)
- Topics: cli, cli-app, rust, sqlite
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚀 Rust-SQLite-Vault
Welcome to **Rust-SQLite-Vault**! This repository contains a Rust-based application that interacts with an SQLite database. The project demonstrates efficient database handling, secure data storage, and seamless integration with Rust's powerful ecosystem.
![Rust Logo](https://www.rust-lang.org/static/images/rust-logo-blk.svg)
## 🌟 Introduction
**Rust-SQLite-Vault** is a project that aims to provide an example of how to use Rust with SQLite for secure and efficient data management. Whether you're a Rustacean or new to Rust, this repository offers valuable insights into using Rust's type system and performance advantages for database applications.
## ✨ Features
## 🛠️ Installation
### Prerequisites
Ensure you have the following installed:
### Steps
1. **Clone the Repository**
```sh
git clone https://github.com/your-username/rust-sqlite-vault.git
cd rust-sqlite-vault
```
2. **Install Dependencies**
```sh
cargo build
```
3. **Run the Application**
```sh
cargo run
```
## 🚀 Usage
To use this application, follow the steps below:
1. **Initialize Database**
Run the application to initialize and set up your SQLite database.
2. **Perform Operations**
Use the provided functions to perform CRUD (Create, Read, Update, Delete) operations on the database.
### Example
```rust
// Example Rust code to interact with the database
use rusqlite::{params, Connection};
fn main() -> Result<(), Box> {
let conn = Connection::open("my_database.db")?;
conn.execute(
"CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, name TEXT NOT NULL, age INTEGER NOT NULL)",
params![],
)?;
conn.execute("INSERT INTO user (name, age) VALUES (?1, ?2)", params!["Alice", 30])?;
Ok(())
}