GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing rethinkdb.com — ReQL command reference - RethinkDB Command syntaxdb.tableCreate(tableName[, options]) → object r.tableCreate(tableName[, options]) → object Description
Create a table. A RethinkDB table is a collection of JSON documents. If successful, the command returns an object with two fields:
If a table with the same name already exists, the command throws Note: Only alphanumeric characters and underscores are valid for the table name. Invoking When creating a table you can specify the following options:
The data type of a primary key is usually a string (like a UUID) or a number, but it can also be a time, binary object, boolean or an array. Data types can be mixed in the primary key field, but all values must be unique. Using an array as a primary key causes the primary key to behave like a compound index; read the documentation on compound secondary indexes for more information, as it applies to primary keys as well. (Note that the primary index still only covers a single field, while compound secondary indexes can cover multiple fields in a single index.) Primary keys cannot be objects. Tables will be available for writing when the command returns. Example: Create a table named ‘dc_universe’ with the default settings. Example: Create a table named ‘dc_universe’ using the field ‘name’ as primary key. Example: Create a table set up for two shards and three replicas per shard. This requires three available servers. Read Sharding and replication for a complete discussion of the subject, including advanced topics. Related commandsGet more helpCouldn't find what you were looking for?
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. |