CREATE TABLE ImageProcessingParams (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
data JSON NOT NULL
);
search:
SELECT
id,
data
FROM
ImageProcessingParams
WHERE
JSON_EXTRACT(data, '$.preset_id') = :preset_id;
Queries generated by sqldelight:
import com.squareup.sqldelight.Query
import com.squareup.sqldelight.Transacter
import java.lang.Void
import kotlin.Any
import kotlin.Int
import kotlin.String
import kotlin.Unit
public interface ImageProcessingParamsQueries : Transacter {
public fun <T : Any> search(preset_id: Void?, mapper: (id: Int, data_: String) -> T): Query<T>
public fun search(preset_id: Void?): Query<ImageProcessingParams>
}
What's wrong:
1 - preset_id type is java.lang.Void. I think java type was not expected.
2 - It is logical that sqldelight cannot understand the field type in json.\
However, I would like to pass Int value for preset_id param.
SQLDelight Version
1.5.5
SQLDelight Dialect
mysql
Describe the Bug
My sql file:
Queries generated by sqldelight:
What's wrong: 1 -
preset_id
type isjava.lang.Void
. I think java type was not expected. 2 - It is logical that sqldelight cannot understand the field type in json.\ However, I would like to passInt
value forpreset_id
param.Stacktrace
No response