Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include a dispatcher / parser #8

Open
rgertenbach opened this issue May 18, 2016 · 3 comments
Open

Include a dispatcher / parser #8

rgertenbach opened this issue May 18, 2016 · 3 comments

Comments

@rgertenbach
Copy link
Owner

At the moment to call fun, as or is you need to re-access the object.

What if we have a function query in which each argument is a call to a function with arguments, be it in array form or whatever

this could then even be wrapped by a language parser

@rgertenbach
Copy link
Owner Author

multiple arrays within the array could call the functions recursively

myTable.query(
  [
    {c: "select", 
     a: [
       "Field 1", 
       "Field 2",
       {c: "fun",
        a: [function(x,y) {return x*y;}, 
            "Product Field",
            "Header 1",
            "Header 2"]

        }
     ]
    },
    {c: "filter",
     a: [
       {c: "and",
        a: [
             {c: "is",
              a: ["Product Field",
                  ">",
                  4
                 ]
             }
           ]
       }
     ]
    }
  ]
);          

@rgertenbach
Copy link
Owner Author

rgertenbach commented May 18, 2016

This includes a query object of the structure

{c: <command>, // This is the function to call
 a: <array of arguments> // These are the arguments and can contain nested query objects
}

@rgertenbach
Copy link
Owner Author

Where clause does some streamlining now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant