Skip to content

Commit fdd21c2

Browse files
author
Robert Gelb
committed
updated docs
1 parent 21b1695 commit fdd21c2

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ This quickie app converts SQL statements into ElasticSearch equivalent queries.
1010
At the moment the application supports SELECT, FROM, WHERE, GROUP BY statements.
1111
For SELECT, you can either place * or specify column names.
1212
The FROM statement works with either aliases or indexes.
13-
The WHERE conditions support a subset of operators: =, >, >=, <, <=, IN, BETWEEN
14-
The GROUP BY statement only supports column names. Functions such as COUNT(*) will cause the translation to fail
13+
The WHERE conditions support a subset of operators: =, >, >=, <, <=, IN, BETWEEN.
14+
The GROUP BY statement only supports column names. Columns in the GROUP BY must match those in SELECT.
1515

1616
Examples:
1717
```sql
@@ -40,10 +40,9 @@ GROUP BY SolarSystem, Galaxy
4040

4141
## What doesn't work yet
4242
+ Inequality operator (!=)
43-
+ LIKE operator
4443
+ Sorting
4544
+ Joins (because ElasticSearch doesn't support them)
46-
+ Common SQL functions like GetDate, DateDiff, etc are not supported yet
45+
+ Common SQL functions like GetDate, DateDiff, Count(*), etc are not supported yet
4746

4847
## The Plan
4948
See the "What doesn't work yet" section

Views/Home/About.cshtml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,36 @@
66
<p>The application supports a very limited subset of sql. This is a work in progress. Here are examples of what works:</p>
77

88
<code style="padding:initial">
9-
SELECT name, type, state, pin<br />
10-
FROM cities<br />
11-
WHERE name LIKE 'M%'<br />
12-
&nbsp;&nbsp; AND state = 'FL'<br />
13-
&nbsp;&nbsp; AND zipCode IN (33126, 33151)<br />
14-
&nbsp;&nbsp; AND averageAge BETWEEN 34 AND 65<br />
15-
&nbsp;&nbsp; AND averageSalary >= 55230<br />
16-
&nbsp;&nbsp; AND averageTemperature < 80
9+
SELECT name, type, state, pin<br />
10+
FROM cities<br />
11+
WHERE name LIKE 'M%'<br />
12+
&nbsp;&nbsp; AND state = 'FL'<br />
13+
&nbsp;&nbsp; AND zipCode IN (33126, 33151)<br />
14+
&nbsp;&nbsp; AND averageAge BETWEEN 34 AND 65<br />
15+
&nbsp;&nbsp; AND averageSalary >= 55230<br />
16+
&nbsp;&nbsp; AND averageTemperature < 80
1717
</code>
1818

1919
<div style="height:15px;"></div>
2020

2121
<code style="padding:initial">
22-
SELECT *<br />
23-
FROM Planets<br />
24-
WHERE SpacecraftWithinKilometers < 10000
22+
SELECT *<br />
23+
FROM Planets<br />
24+
WHERE SpacecraftWithinKilometers < 10000
25+
</code>
26+
27+
<div style="height:15px;"></div>
28+
29+
<code style="padding:initial">
30+
SELECT SolarSystem, Galaxy
31+
FROM Planets
32+
WHERE SpacecraftWithinKilometers < 10000
33+
GROUP BY SolarSystem, Galaxy
2534
</code>
2635

2736
<p style="margin-top:15px;">At the moment the following things do not work:</p>
2837
<ul>
29-
<li>Grouping</li>
30-
<li>Aggregations</li>
31-
<li>Sorting</li>
32-
<li style="text-decoration: line-through">LIKE operator</li>
38+
<li>Sorting</li>
39+
<li>Inequality operator (!=)</li>
40+
<li>Common SQL functions like GetDate, DateDiff, Count(*), etc are not supported yet</li>
3341
</ul>

0 commit comments

Comments
 (0)