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

table.config() → selection<object>

database.config() → selection<object>

Description

Query (read and/or update) the configurations for individual tables or databases.

The config command is a shorthand way to access the table_config or db_config System tables. It will return the single row from the system that corresponds to the database or table configuration, as if get had been called on the system table with the UUID of the database or table in question.

Example: Get the configuration for the users table.

> r.table('users').config().run(conn, callback);

Example return:

{
    "id": "31c92680-f70c-4a4b-a49e-b238eb12c023",
    "name": "users",
    "db": "superstuff",
    "primary_key": "id",
    "shards": [
        {
            "primary_replica": "a", 
            "replicas": ["a", "b"],
            "nonvoting_replicas": []
        },
        {
            "primary_replica": "d",
            "replicas": ["c", "d"],
            "nonvoting_replicas": []
        }
    ],
    "indexes": [],
    "write_acks": "majority",
    "durability": "hard"
}

Example: Change the write acknowledgement requirement of the users table.

> r.table('users').config().update({write_acks: 'single'}).run(conn, callback);

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.