//! # somnia — Type-safe SurrealDB ORM
//!
//! ```ignore
//! use somnia::{SomniaClient, SurrealRecord, Thing};
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(SurrealRecord, Serialize, Deserialize)]
//! #[table("asset")]
//! struct Asset {
//!     #[field(thing)]
//!     id: Thing<Asset>,
//!     name: String,
//!     #[field(name = "content_type")]
//!     content_type: Option<String>,
//!     file_size: Option<i64>,
//! }
//!
//! async fn example() -> Result<(), SomniaError> {
//!     let db = SomniaClient::connect("ws://localhost:8000", "root", "root", "ns", "db").await?;
//!
//!     // Typed column accessors are generated by the derive macro:
//!     let videos: Vec<Asset> = db.query(
//!         &Asset::table()
//!             .select(Asset::all())
//!             .filter(Asset::name().eq("video/mp4".to_string()))
//!             .filter(Asset::file_size().gt(1024 * 1024))
//!             .limit(10)
//!     ).await?;
//!
//!     let db = db;
//!     Ok(())
//! }
//! ```

pub mod connection;
pub mod migrate;

pub use connection::{SomniaClient, SomniaError};
pub use migrate::{MigrationStatus, Migrator};
pub use somnia_core::{
    col,
    expr::{Column, ColumnMeta, ColumnSet, DynExpr, Order, SurrealQL},
    field, ident,
    query::{Batch, Create, Delete, Insert, Relate, RelateEdge, Returning, Select, Table, Update},
    types::{Key, SurrealEdge, SurrealRecord, SurrealSchema, Thing},
    DynExprBox, Func, Grouped, Ident, NoneLit, Projection, Raw, RecordLink,
};
pub use somnia_derive::SurrealRecord;
