ActiveRecord-like read-only interface for querying static YAML/JSON files in Ruby applications.
FrozenRecord is a Ruby gem that provides an ActiveRecord-like read-only interface for querying static data stored in YAML or JSON files. It allows developers to interact with static datasets using familiar ActiveRecord query methods without needing a live database, solving the problem of efficiently accessing and querying configuration data, reference tables, or other static content in Ruby applications.
Ruby developers, particularly those using Ruby on Rails, who need to query static datasets like country lists, configuration settings, or reference data without the overhead of a database.
Developers choose FrozenRecord because it offers a lightweight, zero-dependency way to query static data with an ActiveRecord-like syntax they already know, avoiding database setup for read-only data while providing features like indexing, scopes, and rich type support.
Read only ActiveRecord-like interface to query static YAML files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports where, order, limit, and other ActiveRecord-like methods, making it intuitive for Rails developers to query static data without learning a new syntax.
Eliminates the need for a database connection for read-only data, reducing dependencies and setup overhead for static datasets like configuration files.
Offers built-in backends for YAML and JSON files, with the ability to create custom backends, providing flexibility in data storage formats.
Includes indexing to speed up queries on larger datasets and configurable scan limits (max_records_scan) to prevent accidental performance issues.
Does not support string-typed SQL conditions or complex WHERE clauses, restricting filtering options compared to full ActiveRecord.
Uses linear search (O(n)) for queries without indices, making it inefficient for very large datasets unless carefully indexed.
Purely read-only; any data updates require manual file edits and potential reloading, which can be cumbersome for dynamic content.