Module: AxiTdl::SdlmodulePathDB

Defined in:
lib/tdl/sdlmodule/sdlmodlule_path_db.rb

Constant Summary collapse

DB_PATH =
File.join(__dir__, "../auto_script/tmp/sdlmodule_path_map.db" )
TARGET =
SQLite3::Database.new DB_PATH

Class Method Summary collapse

Class Method Details

.ceate_sdlmoule_path_tableObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/tdl/sdlmodule/sdlmodlule_path_db.rb', line 8

def self.ceate_sdlmoule_path_table

    tabel = nil
    TARGET.execute("SELECT count(*) FROM sqlite_master WHERE type='table' AND name='sdlmoule_mtime_path';") do |row|
        tabel_exist = row 
        break
    end

    # Create a table
    unless table 
        rows = TARGET.execute <<-SQL
            create table sdlmoule_mtime_path (
                name varchar(128),
                path varchar(1024),
                grade varchar(5),
                blog varchar(50)
            );
        SQL
    end

    
end