Skip to content

Commit

Permalink
fixup! Make classes more focused
Browse files Browse the repository at this point in the history
  • Loading branch information
coreywoodfield committed Oct 31, 2024
1 parent a0efda3 commit d75acd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions relate/src/main/scala/com/lucidchart/relate/SqlResult.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ object SqlResult {
* The extraction methods (int, string, long, etc.) also have "strict" counterparts. The "strict" methods are slightly
* faster, but do not do type checking or handle null values.
*/
class SqlResult(val resultSet: java.sql.ResultSet) extends CollectionsSqlResult {
def withResultSet[A](f: (java.sql.ResultSet) => A) = Using.resource(resultSet)(f)
class SqlResult(private[relate] val resultSet: java.sql.ResultSet) extends CollectionsSqlResult {
private[relate] def withResultSet[A](f: (java.sql.ResultSet) => A) = Using.resource(resultSet)(f)

def asSingle[A: RowParser](): A = asCollection[A, Seq](1).head
def asSingle[A](parser: SqlRow => A): A = asCollection[A, Seq](parser, 1).head
Expand Down
2 changes: 1 addition & 1 deletion relate/src/main/scala/com/lucidchart/relate/SqlRow.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object SqlRow {
def apply(rs: java.sql.ResultSet): SqlRow = new SqlRow(rs)
}

class SqlRow(val resultSet: java.sql.ResultSet) {
class SqlRow(resultSet: java.sql.ResultSet) {

/**
* Get the number of the row the SqlResult is currently on
Expand Down

0 comments on commit d75acd5

Please sign in to comment.