Skip to content

Commit

Permalink
minimize diff
Browse files Browse the repository at this point in the history
  • Loading branch information
fblanqui committed Nov 13, 2023
1 parent 1cad200 commit e3eb2fe
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/exporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ import scala.collection.mutable
import scala.util.control.Breaks._

object Exporter {
def read_entry_names_of_theory(db: SQL.Database, session_name: String, theory_name: String): List[Export.Entry_Name] = {
val select =
Export.private_data.Base.table.select(List(Export.private_data.Base.theory_name, Export.private_data.Base.name), sql = Export.private_data.where_equal(session_name,theory_name))
db.using_statement(select)(stmt =>
stmt.execute_query().iterator(res =>
Export.Entry_Name(session = session_name,
theory = res.string(Export.private_data.Base.theory_name),
name = res.string(Export.private_data.Base.name))).toList)
}

def exporter(
options: Options,
session: String,
Expand Down Expand Up @@ -58,6 +50,16 @@ object Exporter {
}
}

def read_entry_names_of_theory(db: SQL.Database, session_name: String, theory_name: String): List[Export.Entry_Name] = {
val select =
Export.private_data.Base.table.select(List(Export.private_data.Base.theory_name, Export.private_data.Base.name), sql = Export.private_data.where_equal(session_name,theory_name))
db.using_statement(select)(stmt =>
stmt.execute_query().iterator(res =>
Export.Entry_Name(session = session_name,
theory = res.string(Export.private_data.Base.theory_name),
name = res.string(Export.private_data.Base.name))).toList)
}

val db = store.open_database(session)
val current_theory = mutable.Queue[Syntax.Command]()

Expand Down

0 comments on commit e3eb2fe

Please sign in to comment.