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.
- Host: GitHub
- URL: https://github.com/foxcapades/jdbc-ro-result-set
- Owner: Foxcapades
- License: mit
- Created: 2022-10-10T16:59:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-10T17:37:27.000Z (almost 4 years ago)
- Last Synced: 2025-02-12T17:19:28.106Z (over 1 year ago)
- Topics: java, jdbc, kotlin
- Language: Kotlin
- Homepage:
- Size: 300 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.adoc
- License: license
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+
|===