(import scheme) (import (chicken base)) (import (chicken random)) (import (chicken process-context)) (import simple-sha1) (import sql-de-lite) (define (main db-path) (call-with-database db-path (lambda (db) (with-transaction db (lambda () (let loop ((i 0)) (when (< i 15000) (let ((hash (string->sha1sum (number->string i))) (author "wasa") (title "test") (paste "123") (pastes (add1 (pseudo-random-integer 3)))) (let loop ((j 0)) (when (< j pastes) (exec (sql db "INSERT INTO pastes VALUES(?, ?, ?, ?, ?)") hash author title (+ i j) paste) (loop (add1 j)))) (loop (+ i pastes)))))))))) (apply main (command-line-arguments))