partiql / partiql-lang-kotlin

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

Add parser support for additional variant types. #1590

Open RCHowell opened 4 days ago

RCHowell commented 4 days 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 4 days ago

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