src/Pure/General/sql.scala
changeset 80357 fe123d033e76
parent 80083 e2174bf626b8
child 80441 c420429fdf4c
equal deleted inserted replaced
80356:8365f1e7955e 80357:fe123d033e76
   327       def update(i: Int, x: Option[String]): Unit = update(i, x.orNull)
   327       def update(i: Int, x: Option[String]): Unit = update(i, x.orNull)
   328     }
   328     }
   329     object bytes {
   329     object bytes {
   330       def update(i: Int, bytes: Bytes): Unit = {
   330       def update(i: Int, bytes: Bytes): Unit = {
   331         if (bytes == null) rep.setBytes(i, null)
   331         if (bytes == null) rep.setBytes(i, null)
   332         else rep.setBinaryStream(i, bytes.stream(), bytes.length)
   332         else if (bytes.size > Int.MaxValue) throw new IllegalArgumentException
       
   333         else rep.setBinaryStream(i, bytes.stream(), bytes.size.toInt)
   333       }
   334       }
   334       def update(i: Int, bytes: Option[Bytes]): Unit = update(i, bytes.orNull)
   335       def update(i: Int, bytes: Option[Bytes]): Unit = update(i, bytes.orNull)
   335     }
   336     }
   336     object date {
   337     object date {
   337       def update(i: Int, date: Date): Unit = db.update_date(stmt, i, date)
   338       def update(i: Int, date: Date): Unit = db.update_date(stmt, i, date)