LoginSignup
1
1

More than 5 years have passed since last update.

Integral挑戦ログ

Posted at

Integral
がかっこいい、と思ったのでチャレンジ中。途中まで動作確認した。
ちょっと様子がつかめてきたー。

; 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"))
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1