Code Monkey home page Code Monkey logo

dynosql's People

Contributors

zshamrock avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dynosql's Issues

Parse values in single quotes

Test the following characters in the value:
' ,"= between in and or

so to check all the tokens processing are ignored when in the quote.

Add support for LIKE

The corresponding statement in the DynamoDB will be one of the following:

  • Contains
  • Not contains
  • Begins with

Depending on the location of the placeholder.

There are two wildcards used in conjunction with the LIKE operator:

    % - The percent sign represents zero, one, or multiple characters
    _ - The underscore represents a single character

Rewrite the logic of processing WHERE statement

Considering how relatively complex WHERE statement could be, i.e. IN, functions, IS NULL, IS NOT NULL, spaces in the string literals, parens, as well as detecting the type of the literal (i.e. number or string) I thought of the different approach of parsing the WHERE statement.

The idea is to parse WHERE condition character by character, identifying the token (also including parens, quotes, commas, etc.) and establish the context, where the action will depend on the current context, i.e. inside the string, or inside the IN, etc.

This also allows to do the validation where knowing the current token we can validate the next token on the list of the supported tokens for the current one. Ex.: IN token expects the next one will be '(', etc.

Hope this allows to resolve all SQL related tickets all at once.

Add support for the GROUP

I.e. some of the statements could be grouped by the parens to specify the priority of the operation, so have to handle this accordingly.

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.