src/Pure/Thy/export.scala
changeset 77541 9d9b30741fc4
parent 77381 a86e346b20d8
child 77542 2da5562114c5
equal deleted inserted replaced
77540:c537905c2125 77541:9d9b30741fc4
   163 
   163 
   164     def yxml: XML.Body = YXML.parse_body(UTF8.decode_permissive(bytes), cache = cache)
   164     def yxml: XML.Body = YXML.parse_body(UTF8.decode_permissive(bytes), cache = cache)
   165 
   165 
   166     def write(db: SQL.Database): Unit = {
   166     def write(db: SQL.Database): Unit = {
   167       val (compressed, bs) = body.join
   167       val (compressed, bs) = body.join
   168       db.using_statement(Data.table.insert()) { stmt =>
   168       db.execute_statement(Data.table.insert(), body =
   169         stmt.string(1) = session_name
   169         { stmt =>
   170         stmt.string(2) = theory_name
   170           stmt.string(1) = session_name
   171         stmt.string(3) = name
   171           stmt.string(2) = theory_name
   172         stmt.bool(4) = executable
   172           stmt.string(3) = name
   173         stmt.bool(5) = compressed
   173           stmt.bool(4) = executable
   174         stmt.bytes(6) = bs
   174           stmt.bool(5) = compressed
   175         stmt.execute()
   175           stmt.bytes(6) = bs
   176       }
   176         })
   177     }
   177     }
   178   }
   178   }
   179 
   179 
   180   def make_regex(pattern: String): Regex = {
   180   def make_regex(pattern: String): Regex = {
   181     @tailrec def make(result: List[String], depth: Int, chs: List[Char]): Regex =
   181     @tailrec def make(result: List[String], depth: Int, chs: List[Char]): Regex =