Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
DataMapper as an ORM is intended to create, retrieve, update, and delete records from a repository through interactions with Ruby objects. This means that we don’t have to write SQL statements through the normal course of usage. In fact, DataMapper’s versatility, intelligence, and performance will probably leave you never needing to write a single SQL statement in your entire application.
Throughout this section, we will assume the existence of the following model:
class BlogEntry include DataMapper::Resource property :id, Serial property :live, TrueClass property :title, String property :text, Text end