Skip to content

poissoncorp/QueryEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QueryEngine

Engine that accepts SQL string in from <Source> where <Expression> select <Field> format and runs query. Source is one of the properties on the data source (IEnumerable), where Expression is a potentially compound predicate that can include equality, range comparisons, etc.

Exemplary data source :

public class Data
{
  public List<User> Users;
  public List<Order> Orders;
  //etc
}

We can use QueryReadTools.ReadQueryFromConsole(bool slowMode) method to grab a Query from the console. Slow mode format given below:

from Users
where Age > 25 or Age < 60 and FullName = "Denis Ritchie"
select Email

And the same query in the normal mode:

from Users where Age > 25 or Age < 60 and FullName = "Denis Ritchie" select Email

Ouput is given to the console. In this example using pre-initialized data inside Program.cs, the output should be

[email protected]
----------------------------------------------------------------
[email protected]
----------------------------------------------------------------
[email protected]
----------------------------------------------------------------

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages