Skip to content

Commit

Permalink
Fleshed out readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aidansteele committed Jan 17, 2019
1 parent 4c4c785 commit 5303293
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,35 @@
* Windows: `scoop bucket add dynamo https://github.com/glassechidna/dynamo.git; scoop install dynamo`
* Otherwise get the latest build from the [Releases][releases] tab.

## Usage

```
dynamo table-name [partition key value [sort key value-or-expression]]
```

* If only a table name is specified, every row will be scanned.
* If a table name and partition key are provided, either:
* That item will be returned (for single-key schemas)
* All matching items will be returned (for partition+sort key schemas)
* If a table name, partition key and sort key are provided, only the matching
item will be returned.

In place of a constant sort key, you can also type:

* `> someval` - all items with sort key value greater than `someval`
* `>= someval` - as above, but "greater than or equal to"
* `<= someval` - as above, but "less than or equal to"
* `< someval` - as above, but "less than"
* `between val1 val2` - all items with sort keys between `val1` and `val2`
* `someval*` - all items with sort keys that begin with `someval`

By default, only **10** items will be returned -- this is to avoid accidentally
downloading an entire table! This can be controlled with the `-n 30` flag.
Passing `-n 0` disables the limit.

Finally, output is pretty-printed and colourised when executed directly. If
executed as part of a script (as determined by `isatty`), output will be
one-item-per-line in [JSON Lines][jsonlines] format.

[releases]: https://github.com/glassechidna/dynamo/releases
[jsonlines]: http://jsonlines.org/

0 comments on commit 5303293

Please sign in to comment.