aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/pgx/examples/todo/README.md
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2018-01-03 13:21:23 +0000
committerFelix Hanley <felix@userspace.com.au>2018-01-03 13:21:23 +0000
commitc428d3bbcd66b64d55297a772cb71ed5e0767614 (patch)
tree5513824ce32bb59c9e0d786959de91d73c8a7e33 /vendor/github.com/jackc/pgx/examples/todo/README.md
parent9e19584ff19a9dbdf6c024e21ff29383400fa80f (diff)
downloaddhtsearch-c428d3bbcd66b64d55297a772cb71ed5e0767614.tar.gz
dhtsearch-c428d3bbcd66b64d55297a772cb71ed5e0767614.tar.bz2
Update deps
Diffstat (limited to 'vendor/github.com/jackc/pgx/examples/todo/README.md')
-rw-r--r--vendor/github.com/jackc/pgx/examples/todo/README.md72
1 files changed, 0 insertions, 72 deletions
diff --git a/vendor/github.com/jackc/pgx/examples/todo/README.md b/vendor/github.com/jackc/pgx/examples/todo/README.md
deleted file mode 100644
index eb3d95b..0000000
--- a/vendor/github.com/jackc/pgx/examples/todo/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Description
-
-This is a sample todo list implemented using pgx as the connector to a
-PostgreSQL data store.
-
-# Usage
-
-Create a PostgreSQL database and run structure.sql into it to create the
-necessary data schema.
-
-Example:
-
- createdb todo
- psql todo < structure.sql
-
-Build todo:
-
- go build
-
-## Connection configuration
-
-The database connection is configured via enviroment variables.
-
-* TODO_DB_HOST - defaults to localhost
-* TODO_DB_USER - defaults to current OS user
-* TODO_DB_PASSWORD - defaults to empty string
-* TODO_DB_DATABASE - defaults to todo
-
-You can either export them then run todo:
-
- export TODO_DB_HOST=/private/tmp
- ./todo list
-
-Or you can prefix the todo execution with the environment variables:
-
- TODO_DB_HOST=/private/tmp ./todo list
-
-## Add a todo item
-
- ./todo add 'Learn go'
-
-## List tasks
-
- ./todo list
-
-## Update a task
-
- ./todo add 1 'Learn more go'
-
-## Delete a task
-
- ./todo remove 1
-
-# Example Setup and Execution
-
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ createdb todo
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ psql todo < structure.sql
- Expanded display is used automatically.
- Timing is on.
- CREATE TABLE
- Time: 6.363 ms
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ go build
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ export TODO_DB_HOST=/private/tmp
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo list
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo add 'Learn Go'
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo list
- 1. Learn Go
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo update 1 'Learn more Go'
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo list
- 1. Learn more Go
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo remove 1
- jack@hk-47~/dev/go/src/github.com/jackc/pgx/examples/todo$ ./todo list