Skip to content

Conversation

Sid-MB
Copy link
Contributor

@Sid-MB Sid-MB commented Jul 12, 2025

What kind of change does this PR introduce?

Adds "case" to the list of Swift keywords so that a Postgres table with a column named 'case' won't cause the Swift type generation to produce invalid code.

What is the current behavior?

gen types swift with a table that has a column named 'case' will produce the following code:

public let case: String // ERROR: Keyword 'case' cannot be used as an identifier here. // FIX: If this name is unavoidable, use backticks to escape it

What is the new behavior?

case will be encoded in backticks so there will be no error:

public let `case`: String

Additional context

--

@Sid-MB Sid-MB requested review from a team as code owners July 12, 2025 00:20
@soedirgo soedirgo enabled auto-merge (squash) July 12, 2025 03:03
@soedirgo soedirgo merged commit 003391e into supabase:master Jul 12, 2025
5 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16232138796

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.117%

Totals Coverage Status
Change from base Build 16045733927: 0.0%
Covered Lines: 5179
Relevant Lines: 6720

💛 - Coveralls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants