Giannandrea Castaldi | 9 Jun 10:43 2004
Picon

Invalid initialization argument :NULLS-OK for class

Hi,
I'm executing the tutorial (using postgres) but when I try to load the 
following expression I've an error. I've run the tests without problem.

(clsql:def-view-class employee ()
   ((emplid
     :db-kind :key
     :db-constraints :not-null
     :nulls-ok nil
     :type integer
     :initarg :emplid)
    (first-name
     :accessor first-name
     :type (string 30)
     :initarg :first-name)
    (last-name
     :accessor last-name
     :type (string 30)
     :initarg :last-name)
    (email
     :accessor employee-email
     :type (string 100)
     :nulls-ok t
     :initarg :email)
    (companyid
     :type integer)
    (company
     :accessor employee-company
     :db-kind :join
     :db-info (:join-class company
(Continue reading)

Marcus Pearce | 9 Jun 12:35 2004
Picon

Re: Invalid initialization argument :NULLS-OK for class


> Invalid initialization argument :NULLS-OK for class
> CLSQL-SYS::VIEW-CLASS-DIRECT-SLOT-DEFINITION
>     [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

The :NULLS-OK slot option for View Classes (originally from UncommonSQL)
is rendered redundant by the more general :DB-CONSTRAINTS slot option
(i.e., :db-constraints :not-null) and has been removed in CLSQL. The
tutorial example has been fixed in CLSQL Version 2.11.6
(http://clsql.b9.com/download.html) and documentation for this (and other)
extensions to CommonSQL is currently underway.

Cheers,
Marcus
KMP | 29 Jun 03:53 2004
Picon

clsql on Mac OS X (PostgreSql)

Hi.

I'm having difficulties in using clsql (version 2.11.11) in  OS X.3 
(Panther) with  SBCL 0.8.11,  postgresql 7.4.3.

After setting postgresql server, I tried to connect to it like, 
"(connect '("" "db" "id" "password") :database-type :postgresql)" but 
this kind of error occured.

unknown foreign symbol: "_PQsetdbLogin"
    [Condition of type SIMPLE-ERROR]

When there *is* that symbol in libpq shared object file, though 
(checked with nm) . Uffi(or ffi) seems to find the right shared object 
file, but could not load that symbol from it. I'm not sure whether uffi 
is wrong or sbcl ffi is wrong or clsql.

Did you have similar bug report?

Thanks.
Kevin Rosenberg | 29 Jun 04:35 2004
Picon

Re: clsql on Mac OS X (PostgreSql)

KMP wrote:
> I'm having difficulties in using clsql (version 2.11.11) in  OS X.3 
> (Panther) with  SBCL 0.8.11,  postgresql 7.4.3.

I've recently tested the latest version of clsql with Postgresql 7.4.3
on OS X 10.3.4 using OpenMCL 0.14.2-p1. With that setup, CLSQL passed
all 218 tests of its 218 tests suite.

> After setting postgresql server, I tried to connect to it like, 
> "(connect '("" "db" "id" "password") :database-type :postgresql)" but 
> this kind of error occured.

I usually use the form:
  ((:postgresql ("localhost" "db" "id" "")))
in ~/.clsql-test.config

I leave the password blank since I setup a trust in the pg_hba.conf

> unknown foreign symbol: "_PQsetdbLogin"
>    [Condition of type SIMPLE-ERROR]

That usually occurs when the shared library is not found and
loaded. You should see a note about whether the shared library was
loaded or not in the compilation log.

> When there *is* that symbol in libpq shared object file, though 
> (checked with nm) . Uffi(or ffi) seems to find the right shared object 
> file, but could not load that symbol from it. I'm not sure whether uffi 
> is wrong or sbcl ffi is wrong or clsql.

(Continue reading)


Gmane