Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pgml-dashboard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ log = "0.4"
markdown = "1.0.0-alpha.14"
num-traits = "0.2"
once_cell = "1.18"
pgml = { version = "0.10.0", path = "../pgml-sdks/pgml/" }
pgml = { path = "../pgml-sdks/pgml/" }
pgml-components = { path = "../packages/pgml-components" }
pgvector = { version = "0.2.2", features = [ "sqlx", "postgres" ] }
rand = "0.8"
Expand Down
20 changes: 20 additions & 0 deletions pgml-sdks/pgml/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ struct Javascript {
subcommand: Subcommands,
}

/// PostgresML CLI is Rust by default
#[cfg(all(not(feature = "python"), not(feature = "javascript")))]
#[derive(Parser, Debug, Clone)]
#[command(author, version, about, long_about = None, name = "pgml", bin_name = "pgml")]
struct Rust {
/// TODO comment on the necessity of this argument.
#[arg(name = "pgmlcli")]
pgmlcli: Option<String>,

#[command(subcommand)]
subcommand: Subcommands,
}

#[derive(Subcommand, Debug, Clone)]
enum Subcommands {
/// Connect your PostgresML database to another PostgreSQL database.
Expand Down Expand Up @@ -160,6 +173,13 @@ async fn cli_internal() -> anyhow::Result<()> {
args.subcommand
};

// Rust by default
#[cfg(all(not(feature = "python"), not(feature = "javascript")))]
let subcommand = {
let args = Rust::parse();
args.subcommand
};

match subcommand {
Subcommands::Connect {
name,
Expand Down