equal
deleted
inserted
replaced
253 if_proper(names, Generic.name.member(names))) |
253 if_proper(names, Generic.name.member(names))) |
254 } |
254 } |
255 |
255 |
256 object Config { |
256 object Config { |
257 val instance = Generic.instance.make_primary_key |
257 val instance = Generic.instance.make_primary_key |
258 val ml_identifier = SQL.Column.string("ml_identifier") |
258 val ml_platform = SQL.Column.string("ml_platform") |
259 val options = SQL.Column.string("options") |
259 val options = SQL.Column.string("options") |
260 |
260 |
261 val table = make_table("", List(instance, ml_identifier, options)) |
261 val table = make_table("", List(instance, ml_platform, options)) |
262 } |
262 } |
263 |
263 |
264 object State { |
264 object State { |
265 val instance = Generic.instance.make_primary_key |
265 val instance = Generic.instance.make_primary_key |
266 val serial = SQL.Column.long("serial") |
266 val serial = SQL.Column.long("serial") |
422 } |
422 } |
423 |
423 |
424 def write_config(db: SQL.Database, instance: String, hostname: String, options: Options): Unit = |
424 def write_config(db: SQL.Database, instance: String, hostname: String, options: Options): Unit = |
425 db.using_statement(Config.table.insert()) { stmt => |
425 db.using_statement(Config.table.insert()) { stmt => |
426 stmt.string(1) = instance |
426 stmt.string(1) = instance |
427 stmt.string(2) = Isabelle_System.getenv("ML_IDENTIFIER") |
427 stmt.string(2) = Isabelle_System.getenv("ML_PLATFORM") |
428 stmt.string(3) = options.make_prefs(Options.init(prefs = "")) |
428 stmt.string(3) = options.make_prefs(Options.init(prefs = "")) |
429 stmt.execute() |
429 stmt.execute() |
430 } |
430 } |
431 |
431 |
432 def read_state(db: SQL.Database, instance: String): (Long, Int) = |
432 def read_state(db: SQL.Database, instance: String): (Long, Int) = |