Skip to content

Commit 31990c5

Browse files
committed
Changes to field structure and added type info to WHERE
Refactored the Field structure to have specific type information Added convinience methods for working with the new type easily Added unit tests Added public utility methods Added type information the WHERE clause resolves #52 resolves #51
1 parent a07c671 commit 31990c5

20 files changed

+5614
-830
lines changed

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5-
- **New:** Added literal type information to fields to provide additional information about the field type. (#51)
6-
75
### Changed
8-
- Initial development WIP - unpublished
6+
**!BREAKING CHANGES!**
7+
- Added literal type information to fields to provide additional information about the field type. (#51)
8+
- WHERE clause fields have one of the following types `'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN' | 'NULL' | 'DATE_LITERAL' | 'DATE_N_LITERAL';` stored in the condition.
9+
- For date literal fields that have variables, `dateLiteralVariable` will be populated with the value
10+
- Modified Field data structure to have explicit type information. (#46, #52)
11+
- The data structure for fields has been modified to include specific information about the structure of a given field to ease making sense of a parsed query,
12+
- To aid in creating compose fields, a new helper method is available - `getComposedField()`. This takes in a simple data structure (or even a string) and will return the structure needed to compose a query.
13+
14+
### New
15+
- An additional `queryUtils` object is available with the following functions:
16+
- `function getComposedField(input: string | ComposeFieldInput): FieldType`
17+
- `function getFlattenedFields(query: Query, isAggregateResult?: boolean): string[]`
18+
- `function isSubquery(query: Query | Subquery): query is Subquery`
19+
- Look at the README and refer to the unit tests for example usage.

0 commit comments

Comments
 (0)