Giter Club home page Giter Club logo

pgdoc's Introduction

License

pgdoc

A dead-simple NoSQL document store using PostgreSQL.

This project is intended to allow you to get a simple JSON document store database up and running as quickly as possible, with minimal cognitive overhead. The system is using a robust and popular database called PostgreSQL as the database. The point is to delay having to wrangle the complexities of database management as long as possible for you own project, which for many small projects may mean never having to worry about it.

Using this you can store and search JSON documents, a generic format for data structures popular in web programming, with simple function calls (or other language specific methods). All application logic is handled server-side, in the cozy confines of your programming language of choice. If it is supported.

Available on the npm repository via npm install --save pgdoc-nosql

Features

A library that allows document storage, retrieval and deletion with a function call.

Document selection via JSON object subset of the top level of a document. This allows selection via group tags, IDs and shared simple values, but not select elements of complex sub-object hierarchies.

A means of requesting unused sequential IDs from the database. pgdoc.requestID(docType)

Incomplete error handling system, that will reduce but not yet eliminate the need for try-catch blocks everywhere.

An install script that configures PostgreSQL for pgdoc.

Full support for NodeJS.

Features (Planned)

Complete error handling system, which will capture errors so consistently that an external try-catch is largely redundant OR Pass through and wrap Error subtypes in a more standard manner.

Specific errors for all known cases.

A script to generate install scripts for custom projects.

Pass through functions for other useful postgresQL features.

Support for additional programming languages (tentative)

A means of generating or requesting unused non-sequential IDs. pgdoc.requestUUID(docType) or similar.

Document Selection via JSON object subsets at any level of the object hierarchy.

Additional asyncronous testing and support.

Support

Please report any bugs on our GitHub issues page

Be sure to state your issue clearly and provide information that can help with reproducing it, such as PostgreSQL version. For details on how to do this, or if you just want to help out, look at the contribution guidelines for more information.

License

The code is available at Github under the MIT license.

pgdoc's People

Contributors

eadsjr avatar

Watchers

James Cloos avatar  avatar

pgdoc's Issues

Initial CRUD Examples are synchronous, need to be async

Because the initial examples were written in a synchronous context, a library implementing them will be very inefficient for any non-trivial application. A method of asynchronous handling should be decided and examples updated to match. This should happen before much code is written.

API: Single Object with named parameters vs positional arguments?

I have a goal of simplicity of use for this library. Do you think using a single object parameter with named members as arguments to be extracted makes it more complicated?

Most things use positional arguments:

ex1( a, b, c )

This method uses destructuring internally to pick out named parameters.

ex2( { a, b, c } )

o = {}
o.a = a
o.b = b
o.c = c
ex3( o )

The issue comes up when I have a lot of parameters and you end up needing something like this.

ex4( a, null, null, null, null, b)

Which is annoying.

Also the single object style makes it easier to extend the function with backwards compatibility.

I just don't want to make it harder to use.

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.