MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / cli

Function cli

crates/cli/src/subcommands/sql.rs:19–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17use spacetimedb_lib::sats::{satn, ProductType, ProductValue, Typespace};
18
19pub fn cli() -> clap::Command {
20 clap::Command::new("sql")
21 .about(format!("Runs a SQL query on the database. {UNSTABLE_WARNING}"))
22 .arg(
23 Arg::new("sql_parts")
24 .num_args(0..)
25 .help("SQL arguments: [DATABASE] <QUERY>"),
26 )
27 .arg(
28 Arg::new("interactive")
29 .long("interactive")
30 .action(ArgAction::SetTrue)
31 .help("Instead of using a query, run an interactive command prompt for `SQL` expressions"),
32 )
33 .arg(common_args::confirmed())
34 .arg(common_args::anonymous())
35 .arg(common_args::server().help("The nickname, host name or URL of the server hosting the database"))
36 .arg(common_args::yes())
37 .arg(
38 Arg::new("no_config")
39 .long("no-config")
40 .action(ArgAction::SetTrue)
41 .help("Ignore spacetime.json configuration"),
42 )
43}
44
45pub(crate) async fn parse_req(
46 mut config: Config,

Callers

nothing calls this directly

Calls 5

confirmedFunction · 0.85
anonymousFunction · 0.85
serverFunction · 0.85
yesFunction · 0.85
newFunction · 0.50

Tested by

no test coverage detected