Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations wrongly generated #2798

Closed
vanniktech opened this issue Jan 28, 2022 · 0 comments · Fixed by #2818
Closed

Annotations wrongly generated #2798

vanniktech opened this issue Jan 28, 2022 · 0 comments · Fixed by #2818

Comments

@vanniktech
Copy link
Contributor

SQLDelight Version

1.5.3

Operating System

OS

Gradle Version

7.3.3

Kotlin Version

1.6.10

AGP Version

7.0.4

Describe the Bug

Similar to #1957:

import app.becoach.Timestamp;
import java.lang.Deprecated;

CREATE TABLE something (
  startDate INTEGER AS @Deprecated Timestamp NOT NULL,
  endDate INTEGER AS @Deprecated Timestamp NOT NULL,
)

will yield wrong kotlin code for the data class:

public data class Someething(
  public val startDate: @Deprecated Timestamp,
  public val endDate: @Deprecated Timestamp,	
)

In addition when doing a single select on the column:

startDate:
SELECT startDate FROM something;

the following method will be generated:

public fun startDate(activityId: String): Query<@Deprecated Timestamp>

which does not work either.

Custom queries don't work either:

SELECT foo, startDate FROM something;

will also generate properties like the generated data class:

  public val startDate: @Deprecated Timestamp,
  public val endDate: @Deprecated Timestamp,	

Stacktrace

No response

Gradle Build Script

No response

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

Successfully merging a pull request may close this issue.

2 participants