← Back to Stormify Documentation

readOne

inline fun <T : Any> readOne(query: String, vararg params: Any?): T?

Executes a SELECT query and returns exactly one result, or null if no row is found.

A null return always means "no matching row". If a row exists but the selected scalar column is SQL NULL, an SQLException is thrown instead — a non-nullable T cannot represent NULL.