In this repo a module in rust was created to interact with sqlite3 database. The module is called lib.rs
and it is located in the src
folder. The module is used in the main.rs
file to create a database and insert some data into it. The database is called happiness.db
and it is located in the project
folder. The happiness.db
file is created if it does not exist. Three functions in the lib create the database and table; populate the table and; the third function connect with the database to do CRUD operations, this is a sample where you can query to insert, modify, delete or consult the database:
Promt engineering was used to create the functions in the lib.rs file.