Coder Social home page Coder Social logo

mtimofiiv / express-query-params Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 73 KB

Express.js middleware implementing the API Query Spec, converting the query to something queryable to an SQL or Mongo database.

Home Page: https://www.npmjs.com/package/express-query-params

License: MIT License

JavaScript 100.00%
express express-middleware middleware mongodb querystring sequelize sql

express-query-params's Introduction

Hai! ๐Ÿ‘‹

I'm a freelance Javascript developer.

I build...

  • web-based apps using whatever makes sense
  • mobile apps using React Native
  • desktop apps using Electron

I might be available to help you with your project โ€“ feel free to message me on Twitter (@mtimofiiv) or email me at contact [at] fiiv.io.

express-query-params's People

Contributors

mtimofiiv avatar

Stargazers

 avatar  avatar  avatar

Forkers

voodoohero

express-query-params's Issues

Implement multiple values in this query...

The API query spec can be enhanced to have multiple values:

/users?name=joe,john

This can be converted to IN ('joe','john') in SQL query.

We should also be able to have the following to have a partial match for multiple values:
/users?name=joe,john

Add support for SQL output

Currently, this middleware only supports Mongo syntax, but...

Would be nice if it allowed people to generate a portion of an SQL query to append to an existing one. So for instance...

/users?username=*steve*&age%3E18 would produce:

username LIKE `%steve%` AND age > 18

This would be appendable to a WHERE clause in any query like so:

var query = 'SELECT * FROM users WHERE ' + req.parsedQuery;

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.