Skip to content

Building a composed query for fields is somewhat difficult #52

@paustint

Description

@paustint
  • Feature
  • Bug Request

Description

there are a number of nuances with a WHERE clause in a query that take some work to account for.

This library should include some utility functions to aid in working with the library. Below is a list of ideas that need to be considered and vetted out.

  • (Compose) Get correctly formatted Operator based on field type and operator type
    • Based on the field type, the field may need to be wrapped in ' (not the case for non-string types or date literals).
      • NON_STRING_TYPES = ['double', 'boolean', 'datetime', 'date', 'int', 'currency', 'percent'];
      • example might be getFormattedCondition(field: string, operator: Operator, type: LiteralType, logicalPrefix?: boolean): Condition - this would only apply to types that do not use functions or semi-join queries.
  • (compose) Add subquery to query.
    • Given a query and subquery, add to the subquery to the query (update field and add to array)

(Others TBD)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions