@@ -228,13 +228,24 @@ private fun isValid(sqlQuery: String): Boolean {
228
228
}
229
229
230
230
/* *
231
- * Reads the data from a [ResultSet] and converts it into a DataFrame.
231
+ * Reads the data from a [ResultSet][java.sql.ResultSet] and converts it into a DataFrame.
232
232
*
233
- * @param [resultSet] the [ResultSet] containing the data to read.
233
+ * A [ResultSet][java.sql.ResultSet] object maintains a cursor pointing to its current row of data.
234
+ * By default, a ResultSet object is not updatable and has a cursor that can only move forward.
235
+ * Therefore, you can iterate through it only once, from the first row to the last row.
236
+ *
237
+ * For more details, refer to the official Java documentation on [ResultSet][java.sql.ResultSet].
238
+ *
239
+ * NOTE: Reading from the [ResultSet][java.sql.ResultSet] could potentially change its state.
240
+ *
241
+ * @param [resultSet] the [ResultSet][java.sql.ResultSet] containing the data to read.
242
+ * Its state may be altered after the read operation.
234
243
* @param [dbType] the type of database that the [ResultSet] belongs to.
235
- * @param [limit] the maximum number of rows to read from the [ResultSet].
244
+ * @param [limit] the maximum number of rows to read from the [ResultSet][java.sql.ResultSet] .
236
245
* @param [inferNullability] indicates how the column nullability should be inferred.
237
- * @return the DataFrame generated from the [ResultSet] data.
246
+ * @return the DataFrame generated from the [ResultSet][java.sql.ResultSet] data.
247
+ *
248
+ * [java.sql.ResultSet]: https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html
238
249
*/
239
250
public fun DataFrame.Companion.readResultSet (
240
251
resultSet : ResultSet ,
@@ -247,13 +258,25 @@ public fun DataFrame.Companion.readResultSet(
247
258
}
248
259
249
260
/* *
250
- * Reads the data from a [ResultSet] and converts it into a DataFrame.
261
+ * Reads the data from a [ResultSet][java.sql.ResultSet] and converts it into a DataFrame.
251
262
*
252
- * @param [resultSet] the [ResultSet] containing the data to read.
253
- * @param [connection] the connection to the database (it's required to extract the database type).
254
- * @param [limit] the maximum number of rows to read from the [ResultSet].
263
+ * A [ResultSet][java.sql.ResultSet] object maintains a cursor pointing to its current row of data.
264
+ * By default, a ResultSet object is not updatable and has a cursor that can only move forward.
265
+ * Therefore, you can iterate through it only once, from the first row to the last row.
266
+ *
267
+ * For more details, refer to the official Java documentation on [ResultSet][java.sql.ResultSet].
268
+ *
269
+ * NOTE: Reading from the [ResultSet][java.sql.ResultSet] could potentially change its state.
270
+ *
271
+ * @param [resultSet] the [ResultSet][java.sql.ResultSet] containing the data to read.
272
+ * Its state may be altered after the read operation.
273
+ * @param [connection] the connection to the database (it's required to extract the database type)
274
+ * that the [ResultSet] belongs to.
275
+ * @param [limit] the maximum number of rows to read from the [ResultSet][java.sql.ResultSet].
255
276
* @param [inferNullability] indicates how the column nullability should be inferred.
256
- * @return the DataFrame generated from the [ResultSet] data.
277
+ * @return the DataFrame generated from the [ResultSet][java.sql.ResultSet] data.
278
+ *
279
+ * [java.sql.ResultSet]: https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html
257
280
*/
258
281
public fun DataFrame.Companion.readResultSet (
259
282
resultSet : ResultSet ,
0 commit comments