|
1 | 1 | ksql
|
2 | 2 | =====
|
3 |
| - |
| 3 | + |
4 | 4 | [](https://pkg.go.dev/github.com/go-playground/ksql)
|
5 | 5 | 
|
6 | 6 |
|
@@ -52,34 +52,39 @@ Expressions support most mathematical and string expressions see below for detai
|
52 | 52 |
|
53 | 53 | #### Syntax & Rules
|
54 | 54 |
|
55 |
| -| Token | Example | Syntax Rules | |
56 |
| -|----------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
57 |
| -| `Equals` | `==` | supports both `==` and `=`. | |
58 |
| -| `Add` | `+` | N/A | |
59 |
| -| `Subtract` | `-` | N/A | |
60 |
| -| `Multiply` | `*` | N/A | |
61 |
| -| `Divide` | `/` | N/A | |
62 |
| -| `Gt` | `>` | N/A | |
63 |
| -| `Gte` | `>=` | N/A | |
64 |
| -| `Lt` | `<` | N/A | |
65 |
| -| `Lte` | `<=` | N/A | |
66 |
| -| `OpenParen` | `(` | N/A | |
67 |
| -| `CloseParen` | `)` | N/A | |
68 |
| -| `OpenBracket` | `[` | N/A | |
69 |
| -| `CloseBracket` | `]` | N/A | |
70 |
| -| `Comma` | `,` | N/A | |
71 |
| -| `QuotedString` | `"sample text"` | Must start and end with an unescaped `"` character | |
72 |
| -| `Number` | `123.45` | Must start and end with a valid `0-9` digit. | |
73 |
| -| `Boolen` | `true` | Accepts `true` or `false` as a boolean only. | |
74 |
| -| `Identifier` | `.identifier` | Starts with a `.` and ends with whitespace blank space. This crate currently uses [gjson](https://github.com/tidwall/gjson.rs) and so the full gjson syntax for identifiers is supported. | |
75 |
| -| `And` | `&&` | N/A | |
76 |
| -| `Not` | `!` | Must be before Boolean identifier or expression or be followed by an operation | |
77 |
| -| `Or` | <code>||<code> | N/A | |
78 |
| -| `Contains` | `CONTAINS ` | Ends with whitespace blank space. | |
79 |
| -| `In` | `IN ` | Ends with whitespace blank space. | |
80 |
| -| `StartsWith` | `STARTSWITH ` | Ends with whitespace blank space. | |
81 |
| -| `EndsWith` | `ENDSWITH ` | Ends with whitespace blank space. | |
82 |
| -| `NULL` | `NULL ` | N/A | |
| 55 | +| Token | Example | Syntax Rules | |
| 56 | +|-----------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 57 | +| `Equals` | `==` | supports both `==` and `=`. | |
| 58 | +| `Add` | `+` | N/A | |
| 59 | +| `Subtract` | `-` | N/A | |
| 60 | +| `Multiply` | `*` | N/A | |
| 61 | +| `Divide` | `/` | N/A | |
| 62 | +| `Gt` | `>` | N/A | |
| 63 | +| `Gte` | `>=` | N/A | |
| 64 | +| `Lt` | `<` | N/A | |
| 65 | +| `Lte` | `<=` | N/A | |
| 66 | +| `OpenParen` | `(` | N/A | |
| 67 | +| `CloseParen` | `)` | N/A | |
| 68 | +| `OpenBracket` | `[` | N/A | |
| 69 | +| `CloseBracket` | `]` | N/A | |
| 70 | +| `Comma` | `,` | N/A | |
| 71 | +| `QuotedString` | `"sample text"` | Must start and end with an unescaped `"` character | |
| 72 | +| `Number` | `123.45` | Must start and end with a valid `0-9` digit. | |
| 73 | +| `BooleanTrue` | `true` | Accepts `true` as a boolean only. | |
| 74 | +| `BooleanFalse` | `false` | Accepts `false` as a boolean only. | |
| 75 | +| `SelectorPath` | `.selector_path` | Starts with a `.` and ends with whitespace blank space. This crate currently uses [gjson](https://github.com/tidwall/gjson.rs) and so the full gjson syntax for identifiers is supported. | |
| 76 | +| `And` | `&&` | N/A | |
| 77 | +| `Not` | `!` | Must be before Boolean identifier or expression or be followed by an operation | |
| 78 | +| `Or` | <code>||<code> | N/A | |
| 79 | +| `Contains` | `CONTAINS ` | Ends with whitespace blank space. | |
| 80 | +| `ContainsAny` | `CONTAINS_ANY ` | Ends with whitespace blank space. | |
| 81 | +| `ContainsAll` | `CONTAINS_ALL ` | Ends with whitespace blank space. | |
| 82 | +| `In` | `IN ` | Ends with whitespace blank space. | |
| 83 | +| `StartsWith` | `STARTSWITH ` | Ends with whitespace blank space. | |
| 84 | +| `EndsWith` | `ENDSWITH ` | Ends with whitespace blank space. | |
| 85 | +| `NULL` | `NULL` | N/A | |
| 86 | +| `Coerce` | `COERCE` | Coerces one data type into another using in combination with 'Identifier'. Syntax is `COERCE <expression> _identifer_`. | |
| 87 | +| `Identifier` | `_identifier_` | Starts and end with an `_` used with 'COERCE' to cast data types. Currently the onyl supported `Identifier` is `_datetime_`. | |
83 | 88 |
|
84 | 89 |
|
85 | 90 |
|
|
0 commit comments