Skip to content

Commit

Permalink
Merge pull request mauricio#154 from iforiq/add_column_types
Browse files Browse the repository at this point in the history
Added types field to MutableResultSet. This will allow inferring the …
  • Loading branch information
mauricio committed Aug 26, 2015
2 parents 936afcf + e5e725f commit 7e3937e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ class MutableResultSet[T <: ColumnData](
private val columnMapping: Map[String, Int] = this.columnTypes.indices.map(
index =>
( this.columnTypes(index).name, index ) ).toMap


val columnNames : IndexedSeq[String] = this.columnTypes.map(c => c.name)

val types : IndexedSeq[Int] = this.columnTypes.map(c => c.dataType)

override def length: Int = this.rows.length

override def apply(idx: Int): RowData = this.rows(idx)
Expand All @@ -43,4 +45,4 @@ class MutableResultSet[T <: ColumnData](
this.rows += new ArrayRowData(this.rows.size, this.columnMapping, row)
}

}
}

0 comments on commit 7e3937e

Please sign in to comment.