Skip to content
Open
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
4 changes: 2 additions & 2 deletions crates/cornucopia/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::PathBuf;

use clap::{Parser, Subcommand};

use crate::{conn, container, error::Error, generate_live, generate_managed, CodegenSettings};
use crate::{conn, container, error::Error, generate_live, generate_against, CodegenSettings};

/// Command line interface to interact with Cornucopia SQL.
#[derive(Parser, Debug)]
Expand Down Expand Up @@ -69,7 +69,7 @@ pub fn run() -> Result<(), Error> {
}
Action::Schema { schema_files } => {
// Run the generate command. If the command is unsuccessful, cleanup Cornucopia's container
if let Err(e) = generate_managed(
if let Err(e) = generate_against(
queries_path,
&schema_files,
Some(destination),
Expand Down
2 changes: 1 addition & 1 deletion crates/cornucopia/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub fn generate_live<P: AsRef<Path>>(
///
/// By default, the container manager is Docker, but Podman can be used by setting the
/// `podman` parameter to `true`.
pub fn generate_managed<P: AsRef<Path>>(
pub fn generate_against<P: AsRef<Path>>(
queries_path: P,
schema_files: &[P],
destination: Option<P>,
Expand Down
2 changes: 1 addition & 1 deletion examples/auto_build/_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() -> Result<(), Error> {

println!("cargo:rerun-if-changed={queries_path}");
println!("cargo:rerun-if-changed={schema_file}");
cornucopia::generate_managed(
cornucopia::generate_against(
queries_path,
&[schema_file],
Some(destination),
Expand Down