update: docstring for create_database

This commit is contained in:
Wataru Otsubo 2024-09-15 08:12:17 +09:00
parent 1dd48e703e
commit 61b6d4a39e
2 changed files with 11 additions and 2 deletions

View file

@ -51,7 +51,7 @@ function create_database_from_exported_csvs(
insert_qaqc_positions(db)
add_psboard_ids(db, single_result_df)
add_qaqc_runlist(db, runlist_table)
add_qaqc_runlist_from_runlist(db, runlist_table)
add_qaqc_single_result(db, single_result_df, runlist_table)
add_qaqc_dispatch(db, dispatch_table)
add_qaqc_runlist_from_masterlogs(db, masterlog_dir)

View file

@ -1,7 +1,13 @@
"""
create_database(dbpath::AbstractString)
create_database(db)
Create new database at `dbpath` and prepare all tables.
Tables are empty.
"""
function create_database end
"""
create_database(dbpath::AbstractString)
"""
function create_database(dbpath::AbstractString)
db::SQLite.DB = DBInterface.connect(SQLite.DB, dbpath)
@ -9,6 +15,9 @@ function create_database(dbpath::AbstractString)
create_database(db)
end
"""
create_database(db::SQLite.DB)
"""
function create_database(db::SQLite.DB)
dirpath = @__DIR__
sql_creates::String = read("$dirpath/sql/create_table.sql", String) |> chomp