Create a new connection to the database server. Accepts the following options:
host: the host to connect to (default localhost).
port: the port to connect on (default 28015).
db: the default database (defaults to test).
user: the user name for the db (defaults to admin).
password: password for the user (default "").
Create a database. A RethinkDB database is a collection of tables, similar to relational databases.
If successful, the operation returns an object: {created: 1}. If a database with the same name already exists the operation throws RqlRuntimeError.
Note: that you can only use alphanumeric characters and underscores for the database name.
Drop a database. The database, all its tables, and corresponding data will be deleted.
If successful, the operation returns the object {dropped: 1}.
If the specified database doesn't exist a RqlRuntimeError is thrown.
Create a time object based on an iso8601 date-time string (e.g. '2013-01-01T01:01:01+00:00').
We support all valid ISO 8601 formats except for week dates.
If you pass an ISO 8601 date-time without a time zone, you must specify the time zone with the optarg default_timezone.
Return a time object representing the current time in UTC.
The command now() is computed once when the server receives the query, so multiple instances of r.now() will always return the same time inside a query.
Create a table. A RethinkDB table is a collection of JSON documents.
If successful, the operation returns an object: {created: 1}. If a table with the same name already exists, the operation throws RqlRuntimeError.
Note: that you can only use alphanumeric characters and underscores for the table name.