# Lotus v0.14.0 - Table of Contents Embeddable business intelligence engine for Elixir — run SQL queries, build dashboards, and manage analytics directly in your Phoenix app with Ecto. ## Pages - [Lotus](readme.md) - [Overview](overview.md) - [Installation](installation.md) - [Getting Started](getting-started.md) - [Dashboards](dashboards.md) - [Advanced Variables](advanced-variables.md) - [AI Query Generation](ai_query_generation.md) - [Configuration](configuration.md) - [Visibility Rules](visibility.md) - [Caching Guide](caching.md) - [Contributing to Lotus](contributing.md) ## Modules - [CSVParser](CSVParser.md) - [Lotus.AI](Lotus.AI.md): AI-powered query generation for Lotus. - [Lotus.AI.Conversation](Lotus.AI.Conversation.md): Manages conversational state for AI-assisted query generation. - [Lotus.AI.ErrorDetector](Lotus.AI.ErrorDetector.md): Analyzes SQL query errors and provides actionable suggestions. - [Lotus.AI.Prompts.SQLGeneration](Lotus.AI.Prompts.SQLGeneration.md): Shared system prompts for SQL query generation across all providers. - [Lotus.AI.Provider](Lotus.AI.Provider.md): Behaviour for LLM provider adapters with tool/function calling support. - [Lotus.AI.ProviderRegistry](Lotus.AI.ProviderRegistry.md): Registry for built-in LLM providers. - [Lotus.AI.Providers.Anthropic](Lotus.AI.Providers.Anthropic.md): Anthropic (Claude) provider implementation for Lotus AI. - [Lotus.AI.Providers.Gemini](Lotus.AI.Providers.Gemini.md): Google Gemini provider implementation for Lotus AI. - [Lotus.AI.Providers.OpenAI](Lotus.AI.Providers.OpenAI.md): OpenAI provider implementation for Lotus AI. - [Lotus.AI.SchemaOptimizer](Lotus.AI.SchemaOptimizer.md): Optimizes schema loading for large databases using two-stage approach. - [Lotus.AI.Tools.SchemaTools](Lotus.AI.Tools.SchemaTools.md): Shared tool implementations for schema introspection. - [Lotus.Dashboards](Lotus.Dashboards.md): Service functions for managing dashboards in Lotus. - [Lotus.Preflight.Relations](Lotus.Preflight.Relations.md): Manages preflight relations stored in the process dictionary. - [Lotus.Storage.Dashboard](Lotus.Storage.Dashboard.md): Represents a saved Lotus dashboard. - [Lotus.Storage.DashboardCard](Lotus.Storage.DashboardCard.md): Represents a card within a Lotus dashboard. - [Lotus.Storage.DashboardCard.Layout](Lotus.Storage.DashboardCard.Layout.md): Embedded schema for card layout in the dashboard grid. - [Lotus.Storage.DashboardCardFilterMapping](Lotus.Storage.DashboardCardFilterMapping.md): Maps a dashboard filter to a query variable within a card. - [Lotus.Storage.DashboardFilter](Lotus.Storage.DashboardFilter.md): Represents a filter control for a Lotus dashboard. - [Lotus.Storage.QueryVariable.StaticOption](Lotus.Storage.QueryVariable.StaticOption.md): Represents a single static option for a QueryVariable select widget. - [Lotus.Storage.QueryVisualization](Lotus.Storage.QueryVisualization.md): Represents a saved visualization configuration for a Lotus query. - [Lotus.Storage.SchemaCache](Lotus.Storage.SchemaCache.md): Caches table schema metadata for automatic type detection and casting. - [Lotus.Storage.TypeCaster](Lotus.Storage.TypeCaster.md): Casts variable values to appropriate types based on database column types. - [Lotus.Storage.TypeHandler](Lotus.Storage.TypeHandler.md): Behavior for implementing custom database type handlers. - [Lotus.Storage.TypeMapper](Lotus.Storage.TypeMapper.md): Maps database column types to Lotus internal types for automatic casting. - [Lotus.Storage.VariableResolver](Lotus.Storage.VariableResolver.md): Extracts variable-to-column bindings from SQL queries. - [Lotus.Visibility.Policy](Lotus.Visibility.Policy.md): Policy builders and validators for visibility rules. - [Lotus.Viz](Lotus.Viz.md): Service functions for managing query visualizations in Lotus storage. - Core API - [Lotus](Lotus.md): Lotus is a lightweight Elixir library for saving and executing read-only SQL queries. - [Lotus.Config](Lotus.Config.md): Configuration management for Lotus. - [Lotus.Value](Lotus.Value.md): Central value normalization for JSON/CSV/UI display. - Query Storage - [Lotus.Storage](Lotus.Storage.md): Storage operations for Lotus queries. - [Lotus.Storage.Query](Lotus.Storage.Query.md): Represents a saved Lotus query. - [Lotus.Storage.QueryVariable](Lotus.Storage.QueryVariable.md): Represents a variable placeholder (`{{var}}`) used inside a Lotus query. - Query Execution - [Lotus.Preflight](Lotus.Preflight.md): SQL preflight authorization for Lotus. - [Lotus.Result](Lotus.Result.md): Represents the result of a SQL query execution. - [Lotus.Runner](Lotus.Runner.md): Read-only SQL execution with safety checks, param binding, and result shaping. - Data Export - [Lotus.Export](Lotus.Export.md): Export functionality for Lotus.Result to various formats. - [Lotus.Export.Normalizer](Lotus.Export.Normalizer.md): Protocol for normalizing database values for export formats. - [Lotus.Export.Value](Lotus.Export.Value.md): Value normalization for export formats. Handles various database types and edge cases for CSV and JSON export. - Data Sources - [Lotus.Source](Lotus.Source.md): Source behavior for database-specific operations. - [Lotus.Sources.Default](Lotus.Sources.Default.md): Default source adapter implementation for unsupported or unknown database sources. - Schema Introspection - [Lotus.Schema](Lotus.Schema.md): Schema introspection functionality for Lotus. - [Lotus.Visibility](Lotus.Visibility.md): Schema and table visibility filtering for Lotus. - Caching - [Lotus.Cache](Lotus.Cache.md): Lotus cache facade. If no adapter configured, acts as a no-op pass-through. - [Lotus.Cache.Adapter](Lotus.Cache.Adapter.md): Behaviour specification for cache adapters in the Lotus framework. - [Lotus.Cache.Cachex](Lotus.Cache.Cachex.md): A Cachex-based, local or distributed, in-memory cache adapter for Lotus. - [Lotus.Cache.ETS](Lotus.Cache.ETS.md): An ETS-based, local, in-memory cache adapter for Lotus. - Database Migrations - [Lotus.Migration](Lotus.Migration.md): Migration behavior for database-specific migrations. - [Lotus.Migrations](Lotus.Migrations.md): Migration management system for Lotus. - [Lotus.Migrations.Postgres.V1](Lotus.Migrations.Postgres.V1.md): Initial table structure for Lotus queries on PostgreSQL. - [Lotus.Migrations.Postgres.V2](Lotus.Migrations.Postgres.V2.md): Add lotus_query_visualizations table for storing chart configs per query. - [Lotus.Migrations.Postgres.V3](Lotus.Migrations.Postgres.V3.md): Add dashboard tables for storing dashboard configurations, cards, filters, and mappings. - OTP Application - [Lotus.Supervisor](Lotus.Supervisor.md): Top-level supervisor for Lotus. - SQL Processing - [Lotus.SQL.Transformer](Lotus.SQL.Transformer.md): Transforms SQL queries for database-specific syntax compatibility.