I wonder why sqldelight 2.0.0 generate a nullable ...
# squarelibraries
d
I wonder why sqldelight 2.0.0 generate a nullable value here?
Copy code
CREATE TABLE AnalysisHistoryEntry (
  id INTEGER NOT NULL PRIMARY KEY,
  ...
)

insertOrReplace:
INSERT OR REPLACE
INTO AnalysisHistoryEntry
VALUES (?, ?, ?, ?, ?, ?, ?);
generates:
Copy code
public fun insertOrReplace(
    id: Long?,
    ...
  )
Is this a bug? Seeing this in all my tables.
h
Definitely a bug
a
Maybe try explicitly defining your columns in the insert statement, like:
Copy code
insertOrReplace:
INSERT OR REPLACE
INTO AnalysisHistoryEntry (id, foo, bar, baz)
VALUES (:id, :foo, :bar, :baz);
👍 1
d
I'll try, but still looks like a bug, because generator outputs "id: Long?", so it knows which column is which (by default), so it could derive its nullability
a
Yes, I agree. Might be worth a shot as a workaround.
👍 1