Giter Club home page Giter Club logo

cssaturday1's Introduction

About

The goal here is to build a JavaScript class called FQL that will be a pure JavaScript implementation of a (minimal) SQL-esque database management system and query language. By working on this exercise, you will get a chance to explore how the inner workings of a database engine can work.

Getting started

Fork and clone this repo, then npm install. Run these tests npm test. IMPORTANT: There are three files where you should be writing code: source/table.js, source/plan.js, and source/fql.js.

At the start, all but the first spec is pending, as specified by xit. As you work through the specs, change those xits to its. Work on these exercises and continue switching off each exercise with your pairing partner.

Guidance

The role of Table instances is to handle the persistence. In this case that means dealing with the file system, because each table will be a folder where each of its rows is stored in a json file. A Table instance also exposes a .read method for FQL queries to utilize.

The role of FQL instances is to build up a multi-faceted query for a particular table and then return an array of the results when executed with .get. Essentially a query object contains information about what to do later. Only during .get will this information be applied to actually running the query. It does so by using its table's .read and .getRowIds methods.

The role of Plan instances is to simplify the role of queries. Each query should have a plan that contains all of the infromation the query should "remember" for later (when it executes). The plan is also responsible for abstracting some of what a query needs to do when executed. For example, it has .withinLimit method that returns whether or not a possible result is still within the plan's stored limit.

cssaturday1's People

Contributors

antonlnd avatar

Watchers

 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.