[Cl-perec-devel] Troubles with cl-perec
Luís Oliveira
luismbo at gmail.com
Mon Jan 7 15:28:33 UTC 2008
Hello,
I'm playing with cl-perec and cl-rdbms whose feature sets are
impressive, but that unfortunately aren't working for me. I'm using
PostgreSQL 8.2.5 from Darwin Ports and SBCL 1.0.12.15 (ppc). I'm
pretty sure I have the latest stuff of everything (including the
branches from cl-dwim) and I have wiped out all my fasls and started
anew. So here's a small test case, taken from cl-perec website:
CL-USER> (asdf:oos 'asdf:load-op :cl-perec)
[...]
NIL
CL-USER> (asdf:oos 'asdf:load-op :cl-rdbms.postmodern)
[...]
NIL
CL-USER> (asdf:oos 'asdf:load-op :cl-perec-test)
[...]
NIL
PRCT> (setq *database*
(make-instance 'rdbms:postgresql-postmodern
:connection-specification
'(:database "rs" :user-name "rs" :password "rs")))
#<POSTGRESQL-POSTMODERN {118AB229}>
PRCT> (start-sql-recording)
; No value
PRCT> (defpclass c1 ()
((s1 :type string :initform "no" :initarg :s1 :accessor s1-of)))
#<PERSISTENT-CLASS C1>
PRCT> (with-transaction
(make-instance 'c1 :s1 "hello"))
; BEGIN
; SELECT relname FROM pg_class WHERE relkind = 'r'
; CREATE TABLE _c1 (_id BIGINT NOT NULL PRIMARY KEY, _s1 TEXT)
WARNING:
Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit
index "_c1_pkey" for table "_c1"
; COMMIT
; BEGIN
; SELECT relname FROM pg_class WHERE relkind = 'S'
; CREATE SEQUENCE _instance_id
; SELECT NEXTVAL('_instance_id')
Somewhere around here, I get this error:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION CL-PEREC::CREATED-INSTANCES-OF (1)>
when called with arguments
(#<#<STANDARD-CLASS NIL {146769C1}> :begin-executed-p #t {14663BF9}>).
[Condition of type SIMPLE-ERROR]
; COMMIT
NIL
T
PRCT>
Also, in this case I commited the transaction, had I not the
_instance_id sequence wouldn't have been created but
prc::*oid-instance-id-sequence-exists* would get set to T anyway and
then I would get errors about _instance_id not existing.
Any ideas?
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
More information about the cl-perec-devel
mailing list