Skip to content

Commit

Permalink
* Cleaned up a few things in the base.tcl source code.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidw committed Nov 2, 2008
1 parent bffa027 commit 94e96fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 5 additions & 15 deletions base.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ proc fetch_n {conn n} {

set start [clock seconds]
catch {c drop}
# set where "where customer_id = 37677"
set where ""
$conn statement c "select customer_id, first_name,
last_name, credit_limit, email_address, gender,
income_level, marital_status, score1, score2, score3, score4,
score5,score6,score7,score8,score9,score10
from public.testdata $where limit $n"

puts [time {c execute}]
for {set i 1} {$i <= $n} {incr i} {
# puts $i
Expand All @@ -126,22 +125,13 @@ proc fetch_n {conn n} {
puts "Time: [expr $end - $start] seconds"
}

# tk_messageBox -message [odbc::database drivers]

#if { 0 } {
# load ./libgetdata[info sharedlibextension]
#}

console show
if { $tcl_platform(platform) == "windows" } {
console show
}

set conn [odbc::database pgsqlconn {PostgreSQL35W} "davidw" "hola"]
set conn [odbc::database pgsqlconn dogru_test "davidw" "blargh"]

#make_test_db $conn
#populate $conn 1 1000000

fetch_n $conn 50000

#while { 1 } {
# after 1000
# puts "end loop"
#}
2 changes: 2 additions & 0 deletions getdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <stdlib.h>
#include <tcl.h>

#ifdef __WINDOWS__
#include <windows.h>
#endif

#define DONT_TD_VOID 1
#include <sql.h>
Expand Down

0 comments on commit 94e96fa

Please sign in to comment.