From 62074accae2361b618cf01c2048c503ff39513af Mon Sep 17 00:00:00 2001 From: Montana Low Date: Mon, 4 Dec 2023 20:56:09 -0800 Subject: [PATCH] rust by default --- pgml-dashboard/Cargo.toml | 2 +- pgml-sdks/pgml/src/cli.rs | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pgml-dashboard/Cargo.toml b/pgml-dashboard/Cargo.toml index 3ffe6c194..47238f6ed 100644 --- a/pgml-dashboard/Cargo.toml +++ b/pgml-dashboard/Cargo.toml @@ -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" diff --git a/pgml-sdks/pgml/src/cli.rs b/pgml-sdks/pgml/src/cli.rs index 359006c9f..c586b86f6 100644 --- a/pgml-sdks/pgml/src/cli.rs +++ b/pgml-sdks/pgml/src/cli.rs @@ -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, + + #[command(subcommand)] + subcommand: Subcommands, +} + #[derive(Subcommand, Debug, Clone)] enum Subcommands { /// Connect your PostgresML database to another PostgreSQL database. @@ -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, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy