"Fossies" - the Fresh Open Source Software Archive

Member "whois-5.5.2/create_whois_sqlite3.sql" (8 Aug 2012, 635 Bytes) of package /linux/privat/old/whois-5.5.2.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PL/SQL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 CREATE TABLE IF NOT EXISTS cache (
    3     query TEXT PRIMARY KEY,
    4     value TEXT,
    5     stamp TEXT DEFAULT CURRENT_TIMESTAMP
    6 );
    7 
    8 CREATE TABLE IF NOT EXISTS control (
    9     id TEXT PRIMARY KEY,
   10     class TEXT NOT NULL,
   11     count INTEGER,
   12     stamp TEXT DEFAULT CURRENT_TIMESTAMP
   13 );
   14 
   15 CREATE INDEX IF NOT EXISTS cache_stamp ON cache ( stamp DESC );
   16 CREATE INDEX IF NOT EXISTS control_stamp ON control ( stamp DESC );
   17 
   18 DROP VIEW IF EXISTS view_cache;
   19 DROP VIEW IF EXISTS view_control;
   20 
   21 CREATE VIEW view_cache AS
   22     SELECT query, stamp FROM cache ORDER BY stamp DESC;
   23 
   24 CREATE VIEW view_control AS
   25     SELECT * FROM control ORDER BY stamp DESC;
   26