Skip to content

Commit 73947ec

Browse files
author
Dean Karn
authored
Additions and Fixes (#5)
1 parent e535d67 commit 73947ec

File tree

13 files changed

+1118
-416
lines changed

13 files changed

+1118
-416
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
- name: golangci-lint
4646
uses: golangci/golangci-lint-action@v2
4747
with:
48-
version: v1.45.0
48+
version: v1.47.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
16+
cmd/ksql/ksql

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.2.0] - 2022-07-18
10+
### Fixed
11+
- Reworked Parsing algorithm fixing a bunch of scoping issues.
12+
- Added COERCE to DateTime support.
13+
- Added CONTAINS_ANY & CONTAINS_ALL operators.
14+
915
## [0.1.2] - 2022-06-08
1016
### Fixed
1117
- Handling of commas in arrays.
@@ -18,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1824
### Added
1925
- Initial conversion from https://github.com/rust-playground/ksql.
2026

21-
[Unreleased]: https://github.com/go-playground/ksql/compare/v0.1.1...HEAD
27+
[Unreleased]: https://github.com/go-playground/ksql/compare/v0.2.0...HEAD
28+
[0.2.0]: https://github.com/go-playground/ksql/compare/v0.1.1...v0.2.0
2229
[0.1.1]: https://github.com/go-playground/ksql/compare/v0.1.0...v0.1.1
2330
[0.1.0]: https://github.com/go-playground/ksql/commit/v0.1.0

README.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ksql
22
=====
3-
![Project status](https://img.shields.io/badge/version-0.1.2-green.svg)
3+
![Project status](https://img.shields.io/badge/version-0.2.0-green.svg)
44
[![GoDoc](https://godoc.org/github.com/go-playground/ksql?status.svg)](https://pkg.go.dev/github.com/go-playground/ksql)
55
![License](https://img.shields.io/dub/l/vibe-d.svg)
66

@@ -52,34 +52,39 @@ Expressions support most mathematical and string expressions see below for detai
5252

5353
#### Syntax & Rules
5454

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>&vert;&vert;<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>&vert;&vert;<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_`. |
8388

8489

8590

0 commit comments

Comments
 (0)