go-prompt/_example/sqlite3-cli
2017-07-24 00:35:50 +09:00
..
.gitignore Use context and add some refactoring 2017-07-24 00:35:50 +09:00
main.go Use context and add some refactoring 2017-07-24 00:35:50 +09:00
README.md Use context and add some refactoring 2017-07-24 00:35:50 +09:00

sqlite3-cli

Prepare database.

$ sqlite3 db.sqlite3
sqlite> .header on
sqlite> .mode column
sqlite> create table tasks (
   ...>   id integer primary key,
   ...>   name text
   ...> );
sqlite> select * from tasks;
sqlite> insert into tasks(name) values('Create go-prompt-toolkit.');
sqlite> insert into tasks(name) values('Use sqlite3 from golang');
sqlite> select * from tasks;
id          name
----------  ----------------------
1           Create go-prompt-toolkit.
2           Use sqlite3 from golang
sqlite> .quit