mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-07-02 09:39:24 +09:00
refactoring: rename crate_database functions (BREAKING)
This commit is contained in:
parent
733fb392c3
commit
656848f850
6 changed files with 26 additions and 16 deletions
|
@ -20,8 +20,12 @@ include("import_data.jl")
|
|||
include("DispatchChecker.jl")
|
||||
using .DispatchChecker
|
||||
|
||||
export create_database
|
||||
|
||||
@deprecate create_database_from_exported_csvs(dbpath::AbstractString; kw...) create_database(dbpath; kw...) false
|
||||
|
||||
"""
|
||||
create_database_from_exported_csvs(
|
||||
create_database(
|
||||
dbpath::AbstractString;
|
||||
masterlog_dir::AbstractString,
|
||||
slavelog_dir::AbstractString,
|
||||
|
@ -57,13 +61,13 @@ If you want to use alternative CSV or are not online, you can specify the path o
|
|||
- `hundred_csv`: CSV of 100 tests results exported from the Google sheets database
|
||||
- `jathubs_csv`: CSV for jathub list used in QAQC. Used to add skew.
|
||||
"""
|
||||
function create_database_from_exported_csvs(
|
||||
function create_database(
|
||||
dbpath::AbstractString;
|
||||
masterlog_dir::AbstractString,
|
||||
slavelog_dir::AbstractString,
|
||||
kw...
|
||||
kw...,
|
||||
)
|
||||
db = create_database(dbpath)
|
||||
db = create_empty_database(dbpath)
|
||||
|
||||
single_result_df,
|
||||
runlist_table,
|
||||
|
|
|
@ -4,21 +4,21 @@
|
|||
Create new database at `dbpath` and prepare all tables.
|
||||
Tables are empty.
|
||||
"""
|
||||
function create_database end
|
||||
function create_empty_database end
|
||||
|
||||
"""
|
||||
create_database(dbpath::AbstractString)
|
||||
"""
|
||||
function create_database(dbpath::AbstractString)
|
||||
function create_empty_database(dbpath::AbstractString)
|
||||
db::SQLite.DB = DBInterface.connect(SQLite.DB, dbpath)
|
||||
|
||||
create_database(db)
|
||||
create_empty_database(db)
|
||||
end
|
||||
|
||||
"""
|
||||
create_database(db::SQLite.DB)
|
||||
"""
|
||||
function create_database(db::SQLite.DB)
|
||||
function create_empty_database(db::SQLite.DB)
|
||||
dirpath = @__DIR__
|
||||
sql_creates::String = read("$dirpath/sql/create_table.sql", String) |> chomp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue