liboxen 0.53.0

Oxen is a fast data version control system, built with machine learning training data in mind. Designed to handle terabytes of data with ease, using a workflow similar to git. Version both structured and unstructured data of any modality: text, images, video, audio, CSV, Parquet, JSONL, model checkpoints, and more. liboxen is the embeddable core library behind the oxen CLI and server, which power fine tuning and inference pipelines for multimodal LLMs, image models, and video models on Oxen.ai.
use crate::constants::TABLE_NAME;
use crate::core::db::data_frames::df_db::{self, with_df_db_manager};
use crate::error::OxenError;
use crate::model::{Schema, Workspace};
use crate::repositories;

use std::path::Path;

pub fn get_by_path(workspace: &Workspace, path: impl AsRef<Path>) -> Result<Schema, OxenError> {
    let file_path = path.as_ref();
    let staged_db_path = repositories::workspaces::data_frames::duckdb_path(workspace, file_path);
    let df_schema = with_df_db_manager(&staged_db_path, |manager| {
        manager.with_conn(|conn| Ok(df_db::get_schema(conn, TABLE_NAME)?))
    })?;
    Ok(df_schema)
}

pub use crate::core::v_latest::workspaces::data_frames::schemas::add_schema_metadata;
pub use crate::core::v_latest::workspaces::data_frames::schemas::update_schema;