You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/cicd/generate_docstring/kotlin_test_file.kt
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,27 @@ import java.sql.ResultSet
5
5
importkotlin.random.Random
6
6
7
7
8
+
/**
9
+
* Computes the sum of two numeric values by converting them to Double.
10
+
*
11
+
* This function accepts any type that extends Number, converts the values to Double,
12
+
* and returns the sum as a Double.
13
+
*
14
+
* @param a The first numeric value of type T, where T extends Number.
15
+
* @param b The second numeric value of type T, where T extends Number.
16
+
* @return The sum of a and b as a Double.
17
+
*/
8
18
fun <T:Number> aPlusB(a:T, b:T): Double= a.toDouble() + b.toDouble()
9
19
10
20
21
+
/**
22
+
* Executes a SQL query on a given database connection and returns the results as a list of lists.
23
+
* Each inner list represents a row from the result set, with each element corresponding to a column value.
24
+
*
25
+
* @param db The database connection to use for executing the query.
26
+
* @param query The SQL query to be executed on the database.
27
+
* @return A list of rows, where each row is represented as a list of objects. Each object corresponds to a column value in the result set. Returns an empty list if no results are found.
0 commit comments