GithubHelp home page GithubHelp logo

rethinkdbfake's Introduction

rethinkdbfake

Motivation

ReQL is a great language. Perhaps one of the best parts is that it is implemented in pure JavaScript. Unfortunately, testing large codebases using Rethink can be slow, as the server is slow to create and delete new tables. To remedy that, the other half of RethinkDB has been implemented in pure Javascript – a mechanism that can take ReQL queries and evaluate them against an in-memory datastore. Obviously this is ideal for very small data sets – exactly what one would find in a testing environment.

Roadmap

  • Most types are converted to their native JS equivalent. This has a few unfortunate implications, namely (1) the handling of what should return a cursor and what should return a straight array is very approximate and (2) since there is no way to distinguish between an object and a SingleSelection or a Stream and StreamSelection, updates can be run where they shouldn't be. To move forward, every function executed should return a Rethink type, which is only converted to a native JS type at the very end.
  • The order of function execution is backwards – this starts at the beginning of the query and works towards the end, instead of the other way around. This prevents .default() from working properly (and likely has other implications as well).
  • Certain functions are not implemented:
    • Between
    • Many date functions
    • Default doesn't properly work
  • Backtraces are not implemented (though they should be relatively trivial).

rethinkdbfake's People

Contributors

neumino avatar dmitrig01 avatar

Stargazers

John Barker avatar Slava Akhmechet avatar Alexis Okuwa avatar

Watchers

James Cloos 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.