dart_edge_sql_core 0.1.0

Shared SQL wire payload types for Dart Edge native crates.
Documentation
use serde::{Deserialize, Serialize};

/// JSON-compatible SQL value used for both parameters and result columns.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
#[serde(tag = "kind", content = "value", rename_all = "camelCase")]
pub enum SqlValue {
    /// SQL `NULL`.
    Null,
    /// Signed 64-bit integer.
    Integer(i64),
    /// 64-bit floating point value.
    Double(f64),
    /// Boolean value.
    Boolean(bool),
    /// UTF-8 text value.
    String(String),
    /// Base64-encoded bytes.
    Bytes(String),
    /// Date/time value encoded as text, normally RFC 3339.
    DateTime(String),
    /// Arbitrary JSON value.
    Json(serde_json::Value),
}