Skip to content

Support for quoted identifiers#1307

Open
matejcerny wants to merge 1 commit into
typelevel:mainfrom
matejcerny:quoted-identifiers
Open

Support for quoted identifiers#1307
matejcerny wants to merge 1 commit into
typelevel:mainfrom
matejcerny:quoted-identifiers

Conversation

@matejcerny
Copy link
Copy Markdown

implements #1276

@matejcerny matejcerny force-pushed the quoted-identifiers branch from 059f5d6 to a19d05f Compare May 13, 2026 19:33
def asSql: String = if (quoted) s"\"${value.replace("\"", "\"\"")}\"" else value
override def toString: String = asSql

override def equals(other: Any): Boolean = other match {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this can break anything?

val identifier: SCodec[Identifier] =
utf8z.exmap(
s => Attempt.fromEither(Identifier.fromString(s).leftMap(Err(_))),
s => Attempt.fromEither(Identifier.fromString(s).orElse(Identifier.fromStringQuoted(s)).leftMap(Err(_))),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea if there is a better solution?

@matejcerny matejcerny force-pushed the quoted-identifiers branch from a19d05f to 214acdf Compare May 13, 2026 19:41
@matejcerny
Copy link
Copy Markdown
Author

It's a much bigger change than I originally thought 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant