Mercurial > hg > egg-tcls
view create_urllog_db.tcl @ 681:204699e84dee
utillib: Increase HTTP request timeout to 8 seconds from 6.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 15 Jul 2021 12:36:50 +0300 |
parents | 1255d524a919 |
children |
line wrap: on
line source
#!/usr/bin/tclsh # TCL script for creating (empty) URLLog SQLite3 database # # Written by Matti 'ccr' Hamalainen <ccr@tnsp.org> # (C) Copyright 2011 Tecnic Software productions (TNSP) # package require sqlite3 source [file dirname [info script]]/utillib.tcl set db_create_desc "Creates tables for URLLog in target SQLite3 file" set db_table_list {urls} proc db_create_table { dbh utable } { utl_create_table_or_fail dbh "$utable" "id INTEGER PRIMARY KEY AUTOINCREMENT, utime INT, url VARCHAR(2048), user VARCHAR(32), host VARCHAR(256), chan VARCHAR(32), title VARCHAR(256)" } proc db_drop_table { dbh utable } { utl_drop_table dbh "$utable" } proc db_get_table_list { utable } { return [list "$utable"] } source [file dirname [info script]]/utilcreate.tcl