GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Close
  • FAQ
  • Docs
  • API
  • Community
  • Blog
  • Accessing ReQL
  • r
  • connect
  • close
  • reconnect
  • use
  • run
  • changes

This view

  • Original page
  • New address

GeezerVison is showing rethinkdb.com — ReQL command reference - RethinkDB


▲ Back to top

Command syntax

db.table(name[, {readMode: 'single', identifierFormat: 'name'}]) → table

Description

Return all documents in a table. Other commands may be chained after table to return a subset of documents (such as get and filter) or perform further processing.

Example: Return all documents in the table ‘marvel’ of the default database.

r.table('marvel').run(conn, callback)

Example: Return all documents in the table ‘marvel’ of the database ‘heroes’.

r.db('heroes').table('marvel').run(conn, callback)

There are two optional arguments.

  • readMode: One of three possible values affecting the consistency guarantee for the table read:
    • single returns values that are in memory (but not necessarily written to disk) on the primary replica. This is the default.
    • majority will only return values that are safely committed on disk on a majority of replicas. This requires sending a message to every replica on each read, so it is the slowest but most consistent.
    • outdated will return values that are in memory on an arbitrarily-selected replica. This is the fastest but least consistent.
  • identifierFormat: possible values are name and uuid, with a default of name. If set to uuid, then system tables will refer to servers, databases and tables by UUID rather than name. (This only has an effect when used with system tables.)

Example: Allow potentially out-of-date data in exchange for faster reads.

r.db('heroes').table('marvel', {readMode: 'outdated'}).run(conn, callback)

Related commands

  • filter
  • get

Get more help

Couldn't find what you were looking for?

  • Ask a question on Stack Overflow
  • Chat with us and our community on Slack
  • Talk to the team on IRC on #[email protected] — via Webchat
  • Ping @rethinkdb on Twitter
  • Post an issue on the documentation issue tracker on GitHub

Contribute: edit this page or open an issue

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.