class

Pk::DB::Database

Inherits Reference < Object

Constructors

new(path : String = LOCAL_DB)
Source

Class methods

blake3_hex(path : String) : String
Source

Instance methods

close
Source
delete_files(package_name : String)
Source
finish_transaction(transaction_id : Int64, result : String, conn : ::DB::Connection | Nil = nil)
Source
get_all_files
Source
get_dependents(package_name : String) : Array(String)
Source
get_explicit(name : String) : Bool | Nil
Source
get_files(package_name : String) : Array(FileEntry)
Source
get_installed
Source
get_snapshot(transaction_id : Int64) : Array(Package)
Source
insert_file(package_id : Int64, entry : FileEntry)
Source
insert_package(pkg : Package, repository : String, checksum : String, signature : String | Nil, explicit : Bool = true)
Source
remove_package(name : String)
Source
save_snapshot(transaction_id : Int64, installed : Array(Package), conn : ::DB::Connection | Nil = nil)
Source
set_explicit(name : String, explicit : Bool)
Source
start_transaction(command : String, summary : String, conn : ::DB::Connection | Nil = nil) : Int64

If conn is provided, use it; otherwise use the pool

Source
transaction
Source