Skip to main content

Crate ignis_db

Crate ignis_db 

Source
Expand description

Ignis: A comprehensive PostgreSQL ORM with macro-driven schema management

This crate provides compile-time type safety with sqlx execution, comprehensive macro system, and sophisticated migration management.

Re-exports§

pub use connection::ConnectionManager;
pub use connection::PoolStats;
pub use database::Database;
pub use database::DatabaseConfig;
pub use database::DatabaseType;
pub use database::MySQL;
pub use database::PostgreSQL;
pub use dsl::call_function;
pub use dsl::call_procedure;
pub use dsl::Column as DslColumn;
pub use dsl::CompositeField;
pub use dsl::CompositeFieldBuilder;
pub use dsl::CompositeFieldRef;
pub use dsl::FunctionCall;
pub use dsl::ProcedureCall;
pub use dsl::Query;
pub use dsl::Source;
pub use exec::transaction::execute_transaction;
pub use exec::transaction::IsolationLevel;
pub use exec::transaction::TransactionConfig;
pub use exec::transaction::TransactionManager;
pub use schema::Column;
pub use schema::ColumnType;
pub use schema::CompositeField as SchemaCompositeField;
pub use schema::CompositeType;
pub use schema::IndexMeta;
pub use schema::IndexType;
pub use schema::StoredFunction;
pub use schema::StoredProcedure;
pub use schema::Table;
pub use schema::TableMeta;
pub use schema::Trigger;
pub use schema::TriggerEvent;
pub use schema::TriggerOrientation;
pub use schema::TriggerTiming;
pub use macros::parameter_binding::BindValue;

Modules§

builders
Builder Pattern Module for Ignis-DB
code_parsing
Code parsing module for extracting table! macro definitions from Rust code
codegen
common
Common utilities for SQL name generation and other shared functionality
config
Configuration Management for Ignis-DB
connection
Connection Management for Ignis-DB
database
Multi-platform database abstraction layer
dsl
Domain Specific Language for building type-safe database queries
exec
Execution and Transaction Management
introspection
macros
Macro system for Ignis
migrate
Migration system for Ignis
schema
Schema definitions for Ignis

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
auto_projection
Macro to automatically implement AutoProjection
build_column
Macro to create a column
build_constraint
Macro to create a constraint
build_extension
Macro to create an extension
build_function
Macro to create a function with a schema-qualified name
build_guc
Macro to create a GUC setting
build_index
Macro to create an index
build_materialized_view
Macro to create a materialized view with a schema-qualified name
build_policy
Macro to create a policy
build_procedure
Macro to create a procedure with a schema-qualified name
build_role
Macro to create a role
build_schema
Macro to create a schema
build_table
Macro to create a table with a schema-qualified name
build_view
Macro to create a view with a schema-qualified name
column_type_mapping
Shared column type mappings to eliminate duplication
composite
Macro for defining PostgreSQL composite types
composite_field
Macro for creating composite field expressions
event
Event macro for pg_cron scheduled jobs
function
Macro for defining PostgreSQL stored functions
grant
Grant definition macro
impl_builder_crud
Macro to implement all CRUD traits at once
impl_builder_deletable
Macro to automatically implement Deletable trait for a struct
impl_builder_insertable
Macro to automatically implement Insertable trait for a struct
impl_builder_model
Macro to automatically implement IgnisModel trait for a struct using builder information
impl_builder_updatable
Macro to automatically implement Updatable trait for a struct
impl_deletable
Macro to implement Deletable trait for a struct
impl_ignis_model
Macro to implement IgnisModel trait for a struct
impl_insertable
Macro to implement Insertable trait for a struct
impl_updatable
Macro to implement Updatable trait for a struct
index
Enhanced macro for creating database indexes with composite type support
info_schema
Macro to create an information schema query
procedure
Macro for defining PostgreSQL stored procedures
projection_target
Macro to automatically implement ProjectionTarget
role
Role definition macro
rust_type_mapping
Shared Rust type mappings
safe_sql
Macro for safely building SQL statements
select_anonymous
Macro for anonymous projections (like C# anonymous objects)
sql_type_mapping
Shared SQL type mappings for DDL
table
Macro for defining database tables
trigger
Macro for defining PostgreSQL triggers
view
Macro for defining database views

Structs§

RegisteredObject
Wrapper type for inventory registration
SchemaObject
Schema object that can be registered in the inventory system

Traits§

Deletable
IgnisModel
IgnisObject
Core trait that all Ignis objects must implement
Insertable
Updatable

Functions§

get_registered_by_type
Get all registered objects of a specific type
get_registered_events
Get all registered events
get_registered_functions
Get all registered functions
get_registered_procedures
Get all registered procedures
get_registered_tables
Get all registered tables
get_registered_triggers
Get all registered triggers
get_registered_views
Get all registered views
iter_registered
Get an iterator over all registered schema objects

Type Aliases§

RegisteredObjectRef
Type alias for registered objects in the inventory
Result
Result<T, Error>

Derive Macros§

Deletable
Derive macro for Deletable trait
IgnisModel
Derive macro for IgnisModel trait
Insertable
Derive macro for Insertable trait
PgComposite
Derive macro for PostgreSQL composite types
Updatable
Derive macro for Updatable trait