athena_rs 3.23.0

Hyper performant polyglot Database driver
Documentation
use crate::api::gateway::contracts::D1MigrationDiagnostic;
use crate::api::query::d1_migration::RawStatement;

pub fn add_warning(statement: &RawStatement, code: &str, message: &str) -> D1MigrationDiagnostic {
    D1MigrationDiagnostic {
        code: code.to_string(),
        message: message.to_string(),
        statement_index: statement.index,
        source_range: statement.source_range.clone(),
    }
}

pub fn warn_unrecognized_feature(
    statement: &RawStatement,
    feature: &str,
    message: &str,
) -> D1MigrationDiagnostic {
    add_warning(statement, feature, message)
}