Created
February 27, 2014 10:06
-
-
Save kencoba/9247431 to your computer and use it in GitHub Desktop.
Integral挑戦ログ ref: http://qiita.com/kencoba/items/8ba7b66ad26d2172d79e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; SLIME 2013-11-17 | |
CL-USER> (ql:quickload :integral) | |
To load "integral": | |
Load 1 ASDF system: | |
integral | |
; Loading "integral" | |
(:INTEGRAL) | |
CL-USER> (import 'integral:connect-toplevel) | |
T | |
CL-USER> (connect-toplevel :sqlite3 | |
:database-name "c:/home/ken/lisp/testdb.db") | |
To load "dbd-sqlite3": | |
Load 1 ASDF system: | |
dbd-sqlite3 | |
; Loading "dbd-sqlite3" | |
#<DBD.SQLITE3:<DBD-SQLITE3-CONNECTION> #xD0F3BFE> | |
CL-USER> (import 'integral:<dao-table-class>) | |
T | |
CL-USER> (defclass user () | |
((name :col-type text | |
:initarg :name)) | |
(:metaclass <dao-table-class>)) | |
#<<DAO-TABLE-CLASS> USER> | |
CL-USER> (import '(integral:table-definition integral:execute-sql)) | |
T | |
CL-USER> (table-definition 'user) | |
"CREATE TABLE \"user\" (\"%oid\" SERIAL NOT NULL PRIMARY KEY, \"name\" TEXT)" | |
NIL | |
CL-USER> (execute-sql (table-definition 'user)) | |
; Evaluation aborted on #<DBI.ERROR:<DBI-PROGRAMMING-ERROR> #xD090EC6>. | |
CL-USER> (integral:ensure-table-exists 'user) | |
CREATE TABLE IF NOT EXISTS "user" ("%oid" SERIAL NOT NULL PRIMARY KEY, "name" TEXT); | |
NIL | |
CL-USER> (make-instance 'user :name "Ken-Coba") | |
#<USER %oid: <unbound>> | |
CL-USER> (import 'integral:save-dao) | |
T | |
CL-USER> (save-dao (make-instance 'user :name "Ken-Coba")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment