src/Pure/Thy/store.scala
changeset 78367 4978a158dc4c
parent 78366 aa4ea5398ab8
child 78369 ba71ea02d965
equal deleted inserted replaced
78366:aa4ea5398ab8 78367:4978a158dc4c
   325   ): Option[SQL.Database] = if (build_database_test) Some(open_build_database(path)) else None
   325   ): Option[SQL.Database] = if (build_database_test) Some(open_build_database(path)) else None
   326 
   326 
   327   def try_open_database(
   327   def try_open_database(
   328     name: String,
   328     name: String,
   329     output: Boolean = false,
   329     output: Boolean = false,
   330     server: Boolean = build_database_server
   330     server_mode: Boolean = build_database_server
   331   ): Option[SQL.Database] = {
   331   ): Option[SQL.Database] = {
   332     def check(db: SQL.Database): Option[SQL.Database] =
   332     def check(db: SQL.Database): Option[SQL.Database] =
   333       if (output || session_info_exists(db)) Some(db) else { db.close(); None }
   333       if (output || session_info_exists(db)) Some(db) else { db.close(); None }
   334 
   334 
   335     if (server) check(open_database_server())
   335     if (server_mode) check(open_database_server())
   336     else if (output) Some(SQLite.open_database(output_database(name)))
   336     else if (output) Some(SQLite.open_database(output_database(name)))
   337     else {
   337     else {
   338       (for {
   338       (for {
   339         dir <- input_dirs.view
   339         dir <- input_dirs.view
   340         path = dir + database(name) if path.is_file
   340         path = dir + database(name) if path.is_file