Mark Mapper

A MarkLogic ORM for Ruby

MarkMapper is based on the MongoMapper ORM. Built from the ground up to be simple and extendable, MarkMapper is a lovely way to model your applications and persist your data in MarkLogic. It has all the bells and whistles you need to get the job done and have fun along the way.

MarkMapper requires MarkLogic 8 or greater. It persists all documents as JSON.

Getting Started

Install the MarkMapper gem:

$ gem install mark_mapper

Define your models:

class User
  include MarkMapper::Document

  key :name, String
  key :age,  Integer

  many :hobbies
end


class Hobby
  include MarkMapper::EmbeddedDocument

  key :name,    String
  key :started, Time
end

Use your models to create and find documents:

user = User.new(:name => 'Brandon')
user.hobbies.build(:name => 'Programming',
  :started => 10.years.ago)

user.save!

User.where(:name => 'Brandon').first

Check out the Documentation

Fork me on GitHub //