ignis-db 0.2.0

A comprehensive PostgreSQL ORM with macro-driven schema management
Documentation
//! Sync Command Integration Test
//! This file contains both macro-based and builder-based schema definitions
//! to test the full sync command integration

use ignis_db::builders::SchemaBuilder;
use ignis_db::{Deletable, IgnisModel, Insertable, Updatable};

// Macro-based model
#[derive(IgnisModel, Insertable, Updatable, Deletable)]
#[ignis(table = "sync_macro_users", pk = "id")]
pub struct SyncMacroUser {
    pub id: i32,
    pub name: String,
    pub email: String,
}

// Builder-based model (will be detected by our new parser)
pub fn create_sync_builder_table() -> ignis_db::schema::Table {
    use ignis_db::builders::{ColumnBuilder, TableBuilder};
    use ignis_db::schema::ColumnType;

    TableBuilder::new("sync_builder_users")
        .column(ColumnBuilder::new("id", ColumnType::Int4).primary_key())
        .column(ColumnBuilder::new(
            "username",
            ColumnType::Varchar(Some(100)),
        ))
        .column(ColumnBuilder::new("email", ColumnType::Varchar(Some(255))))
        .build()
        .unwrap()
}

// Another builder-based model with different table name
pub fn create_sync_products_table() -> ignis_db::schema::Table {
    use ignis_db::builders::{ColumnBuilder, TableBuilder};
    use ignis_db::schema::ColumnType;

    TableBuilder::new("sync_products")
        .column(ColumnBuilder::new("sku", ColumnType::Varchar(Some(50))).primary_key())
        .column(ColumnBuilder::new("name", ColumnType::Varchar(Some(200))))
        .column(ColumnBuilder::new(
            "price",
            ColumnType::Numeric(Some(10), Some(2)),
        ))
        .build()
        .unwrap()
}

// Test function to ensure the file compiles
pub fn test_compilation() {
    let _user = SyncMacroUser {
        id: 1,
        name: "Test".to_string(),
        email: "test@example.com".to_string(),
    };

    let _table1 = create_sync_builder_table();
    let _table2 = create_sync_products_table();

    println!("✅ All models compile successfully!");
}

fn main() {
    test_compilation();
}