Giter Club home page Giter Club logo

embedded-mongo's Introduction

== What ==

A Ruby implementation of the MongoDB interface.

Just swap out the line "Mongo::Connection.new" in your application
with "EmbeddedMongo::Connection.new" and leave the rest of the code
alone.  No server process needed!

E.g.

    conn = EmbeddedMongo::Connection.new
    coll = conn['test']['embedded']
    coll.insert({ 'hello' => 'world' })
    coll.find.to_a
    # => [{"_id"=>BSON::ObjectId('4e1b4027f626214e9e000001'), "hello"=>"world"}]

== Goal ==

embedded-mongo's goal is to provide the same interface as mongodb but
be embedded inside the calling process.  This allows unit tests to be
run without the overhead of database roundtrips or the creation of
ad-hoc mock layers.  It also allows one to start using the mongodb
interface for new projects without having to set up a real database.
I don't think there's a use-case for it in production, though I could
be wrong.

== Status ==

Most of the query semantics have been coded.  Many of the database
management operations have not.  Nothing involving execution of
JavaScript has been coded, because that sounds like work.  Persistence
hasn't been added, though that could be as easy as a Marshal or YAML
dump when needed.

I think the next thing to add is indexes.  Currently everything works
via a linear scan of the database.

embedded-mongo's People

Contributors

gdb avatar yaauie avatar

Watchers

Aurélien Thieriot avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.