1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
use unreql_macros::create_cmd;
use ql2::term::TermType;
use serde::Serialize;
use crate::{
cmd::{
args::{ManyArgs, Opt},
options::{GrantOptions, ReconfigureOptions, WaitOptions},
},
Command,
};
create_cmd!(
/// Grant or deny access permissions for a user account, globally or
/// on a per-database or per-table basis.
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/grant).
grant(username: Serialize, opts: Opt<GrantOptions>)
);
create_cmd!(
/// Query (read and/or update) the configurations for individual tables or databases.
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/config).
only_command,
config
);
create_cmd!(
/// Rebalances the shards of a table. When called on a database, all
/// the tables in that database will be rebalanced.
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/rebalance).
only_command,
rebalance
);
create_cmd!(
/// Reconfigure a table’s sharding and replication.
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/reconfigure).
only_command,
reconfigure(args: ManyArgs<ReconfigureOptions>)
);
create_cmd!(
/// Return the status of a table.
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/status).
only_command,
status
);
create_cmd!(
/// Wait for a table or all the tables in a database to be ready
///
/// See details in [javascript documentation](https://rethinkdb.com/api/javascript/wait).
only_root,
wait(table_or_database: Serialize, opts: Opt<WaitOptions>)
only_command,
wait(opts: Opt<WaitOptions>)
);