Coder Social home page Coder Social logo

fndb's Introduction

FnDB

Basic api:

  • db(connection, branch)
  • db.bucket(name) => bucket => bucket<unknown> - keep different kinds of data separate
  • bucket.schema(unknown => T) => bucket<T> - ensure your data has the type you expect
  • bucket.withSchemas((unknown => T)[]) => view<T> - ensure your data has the type you expect
  • (db | bucket | view).map((a, prev) => { key, b } | {key, b}[]) => view - map over a set of objects to produce another set of objects, possibly referencing previous versions
  • (db | bucket | view).index(name, (a) => key) => view - map over a set of objects to produce an index which can be used for filtering
  • (db | bucket | view).filter(key, Matcher) => view - return only records where key matches the matcher
  • db.commit() - bump the current commit version
  • db.merge(branch) - merge branch into this branch

FnDB is a library of basic data types which can be backed by memory or a database for event sourcing or functional programming.

Basic idea:

create a function reduce(set, fn, args) the fn should convert any args which are collections into proxies for a collection.

Note: this needs to go along with a set of immutable collections because otherwise we can't be sure what is happening...

fndb's People

Contributors

cwohlman avatar

Watchers

 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.