Skip to content

Instantly share code, notes, and snippets.

@refractalize
Last active August 29, 2015 13:57
Show Gist options
  • Save refractalize/9737058 to your computer and use it in GitHub Desktop.
Save refractalize/9737058 to your computer and use it in GitHub Desktop.
Mucking around with rethinkdb and the pogoscript REPL

Mucking around with rethinkdb and the pogoscript REPL:

> r = require 'rethinkdb'
[snip]
> connection = r.connect {}!
[snip]
> r.tableCreate 'bobo'.run (connection)!
{ created: 1 }
> r.table 'bobo'.insert {name = 'haha'}.run (connection)!
{ deleted: 0,
  errors: 0,
  generated_keys: [ '3e2d2bd0-9e6d-422f-82d5-8b3b1708b7d9' ],
  inserted: 1,
  replaced: 0,
  skipped: 0,
  unchanged: 0 }
> bobo = r.table 'bobo'.run (connection)!
[snip]
> bobo.each (console.log)
null { id: '3e2d2bd0-9e6d-422f-82d5-8b3b1708b7d9', name: 'haha' }
undefined
> _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment