Skip to content

Type Safety

Ohad Shai edited this page Oct 25, 2018 · 2 revisions

Although there is no full support for ORM, we try to supply a small enhancement for the Driver type will allow using it in a type-safe manner, thus avoiding the hassle of casting from users.

In jasync-sql, type safety for values is implemented similarly to JDBC. Means it is the user responsibility to pick the correct type that was returned from the database.

RowData contains methods such as getInt(), getString() etc'

For Generic usage, use getAs() method that allows casting to any given type.

Clone this wiki locally