A functional query tool for Elixir and PostgreSQL that embraces SQL and avoids ORM abstractions.
Moebius is a functional query tool for Elixir that provides a composable, pipe-based API for interacting with PostgreSQL databases. It solves the problem of database abstraction by avoiding ORM complexities and instead embracing PostgreSQL's native features like JSONB, full-text search, and aggregates directly within Elixir's functional paradigm.
Elixir developers who prefer working closely with PostgreSQL and want a lightweight, functional alternative to traditional ORMs, especially those building applications that leverage advanced PostgreSQL capabilities.
Developers choose Moebius for its minimal abstraction, direct PostgreSQL integration, and functional API that feels like a natural extension of Elixir, allowing them to write efficient queries without sacrificing SQL's power.
A functional query tool for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Elixir's pipe operator to build queries in a composable, functional style, as shown in examples like `db(:users) |> filter(name: 'Steve') |> Moebius.Db.run`, making code readable and maintainable.
Surfaces native PostgreSQL features like full-text search and JSONB document storage without heavy abstraction, evidenced by built-in support for `tsvector` searches and automatic table creation for JSONB.
Automatically creates tables and indexes for JSONB documents, including full-text indexing, as detailed in the DocumentQuery section, simplifying document storage and querying.
Allows execution of raw SQL files directly, catering to developers who prefer writing complex queries in SQL, with configuration via the `scripts` entry in config.
Lacks built-in support for migrations and schema definitions, as explicitly stated in the philosophy that it's not an ORM, requiring external tools or manual SQL for schema changes.
Tightly coupled to PostgreSQL, so it cannot be used with other databases, limiting flexibility for projects that might need to switch or support multiple database backends.
Setting up multiple supervised database connections requires manual configuration and supervision tree adjustments, as shown in the 'Supervision and Databases' section, adding overhead for simple use cases.