An open API service indexing awesome lists of open source software.

https://github.com/foxcapades/jdbc-ro-result-set

Read-only JDBC ResultSet wrapper.
https://github.com/foxcapades/jdbc-ro-result-set

java jdbc kotlin

Last synced: 3 months ago
JSON representation

Read-only JDBC ResultSet wrapper.

Awesome Lists containing this project

README

          

= Read-Only ResultSet

image:https://img.shields.io/github/license/foxcapades/jdbc-ro-result-set[GitHub]
image:https://img.shields.io/badge/mvn-central-blue[link="https://search.maven.org/artifact/io.foxcapades.lib/jdbc-ro-result-set"]
image:https://img.shields.io/badge/docs-dokka-brightgreen[link="https://foxcapades.github.io/jdbc-ro-result-set/"]

Provides a simple, thin wrapper around a `ResultSet` instance that blocks
actions that mutate the state of the underlying instance.

Methods that are documented as mutating the state of a `ResultSet` will instead
throw an `UnsupportedOperationException`.

== Usage

.build.gradle.kts
[source, kotlin]
----
implementation("io.foxcapades.lib:jdbc-ro-result-set:${version}")
----

.Example
[source, kotlin]
----
import io.foxcapades.lib.jdbc.ro.ReadOnlyResultSet

fun main() {
...

val rawResultSet = ps.executeQuery()
val safeResultSet = ReadOnlyResultSet(rawResultSet)

while (rawResultSet.next()) {
someMethod(safeResultSet)
}

...
}
----

== Compatibility

|===
| Library Version | JDBC Version | JDK Version

| v1.x.x
| 4.3+
| 9+
|===