partiql / partiql-lang-kotlin

PartiQL libraries and tools in Kotlin.
https://partiql.org/
Apache License 2.0
539 stars 61 forks source link

Add parser support for additional variant types. #1590

Open RCHowell opened 1 month ago

RCHowell commented 1 month ago

Relevant Issue/Bug

Our charter claims syntax independence, yet our specification encodes Ion into the syntax.

Charter Format Independence

PartiQL syntax and semantics are not tied to any particular data format.

PartiQL Specification Data Model Syntax

scalar_value     = "`", ? ion literal ?, "`"
                 | ? sql literal ? ;

Requested Solution/Feature

Generalize the backticks to be true to the charter while keeping Ion as the default.

<value>
    ::= "`" <utf8> "`" ["::" <encoding>] // if encoding is omitted, '::ion' is implicit
      | <sql literal>

<encoding>
    ::= <regular identifier>
RCHowell commented 1 month ago

See https://github.com/orgs/partiql/discussions/92