Lucid ORM

Lucid ORM is Lightpack's highly performant and sleek object relational mapper to help you with some of the most common tasks when dealing with relational databases.

Tradeoffs

When it comes to data access patterns, there is a lot of debate about ORMs in any programming community. Some even consider it an anti-pattern. Some hate it because it may introduce possible leaky-abstraction and cost performance. Some even think that an ORM makes simple things easy and difficult things dead difficult.

And then there is a whole new concept of thinking about your business objects called Domain Driven Design that promotes thinking in terms of domain models.

In that sense, Lightpack has no opinion about whether you should use or reject the concept of ORM at all. That being said, Lighpack does come with a dead simple abstraction which you might like for its simplicity and performance.

Performance

Lucid ORM is fast because of two major aspects in its design:

Models

Lucid ORM provides support for models classes that represent records in your database table. It also provides few more capabilities that often come handy when dealing with relational databases.

Learn more about models here.

Relationships

Lucid ORM is a simplified Active Record pattern implementation that also supports relationships for the most common use-case scenarios.

Following relationships are supported:

Learn more about relationships here.

Eager Loading

Lucid ORM supports eager loading for associated models to avoid the N+1 query performance issue.

Learn more about relationships here.