Skip to content

soupi/sqlite-easy-example-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A minimal todo list app example with sqlite-easy

This is a very simple example of the sqlite-easy package.

How to run

cabal run todo-sqlite-easy -- <command>

or copy the executable to the current directory with

cp $(cabal list-bin todo-sqlite-easy) todo-sqlite-easy

and then run

./todo-sqlite-easy <command>

What does it look like

>  ./todo-sqlite-easy
Todo list app

Set the connection string using the DB environment variable.

Commands:

	list		List all tasks
	add <task>	Add a task
	delete <id>	Delete a task by id
	clear		Delete all tasks

> ./todo-sqlite-easy add read the sqlite-easy docs
New task with id (1)
> ./todo-sqlite-easy add clone the sqlite-easy-example-todo repo
New task with id (2)
> ./todo-sqlite-easy add cabal build
New task with id (3)
> ./todo-sqlite-easy add play with the source code at src/Main.hs
New task with id (4)
> ./todo-sqlite-easy add "???"
New task with id (5)
> ./todo-sqlite-easy add "fun!"
New task with id (6)
> ./todo-sqlite-easy list
6 tasks.
	(1) read the sqlite-easy docs
	(2) clone the sqlite-easy-example-todo repo
	(3) cabal build
	(4) play with the source code at src/Main.hs
	(5) ???
	(6) fun!
> ./todo-sqlite-easy delete 5
Task deleted.
> ./todo-sqlite-easy list
5 tasks.
	(1) read the sqlite-easy docs
	(2) clone the sqlite-easy-example-todo repo
	(3) caal build
	(4) play with the source code at src/Main.hs
	(6) fun!

About

A primitive todo list app as an example of sqlite-easy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published