aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-03-27 04:57:42 +0200
committerTeddy Wing2022-03-27 04:57:42 +0200
commita0d2ffa2d41cc5291d0e3740b4c94671112869d6 (patch)
treeb25250bd9f1a99e6c09d42dd2871e50f0fe95ec1
parentfaae7b629a2e5139a8e912855b1f137cfe955510 (diff)
downloadyaqlite-a0d2ffa2d41cc5291d0e3740b4c94671112869d6.tar.bz2
README: Add usage example
-rw-r--r--README.md29
1 files changed, 28 insertions, 1 deletions
diff --git a/README.md b/README.md
index bb7940c..3535115 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,34 @@ database and selecting records as YAML.
## Usage
-TODO
+ $ sqlite3 test.db <<EOF
+ CREATE TABLE "restaurants" (
+ id INTEGER PRIMARY KEY,
+
+ name TEXT,
+ description TEXT,
+ rating INTEGER
+ );
+ EOF
+
+ $ yaqlite insert --database test.db restaurants <<EOF
+ name: Western Restaurant Nekoya
+ description: >-
+ Located in the business district, this restaurant serves a wide variety of
+ cuisine for all tastes and appetites.
+
+ Enjoy hearty dishes like the beef stew, and conclude with a chocolate parfait
+ so light and airy you'll think you're eating a cloud.
+ rating: 5
+ EOF
+
+ $ yaqlite select --database test.db restaurants 1
+ ---
+ name: Western Restaurant Nekoya
+ description: |
+ Located in the business district, this restaurant serves a wide variety of cuisine for all tastes and appetites.
+ Enjoy hearty dishes like the beef stew, and conclude with a chocolate parfait so light and airy you'll think you're eating a cloud.
+ rating: 5
## Install