From: Saikat Chakrabarti
Subject: CLSQL problem selecting an object
Date: 
Message-ID: <6ba9dc23-e052-4d00-9603-2fa3a7077b81@z9g2000yqi.googlegroups.com>
I am trying to use clsql to select an object from my postgres
database, and syntax like (clsql:select [email] :from [person]) works,
but syntax like (clsql:select 'person) gives me an error that "No
source tables supplied to select statement."  I have locally enabled
the syntax.  It seems like from http://clsql.b9.com/manual/csql-find.html
that the second syntax should work - anyone have any ideas as to why
it might not? I guess I would like to, ideally, have clsql do the work
of hydrating my object, rather than selecting all the columns and
creating an object where I manually set all those columns.

Thanks!
Saikat

From: Alexander Lehmann
Subject: Re: CLSQL problem selecting an object
Date: 
Message-ID: <go3fes$r21$1@online.de>
Saikat Chakrabarti wrote:
> I am trying to use clsql to select an object from my postgres
> database, and syntax like (clsql:select [email] :from [person]) works,
> but syntax like (clsql:select 'person) gives me an error that "No
> source tables supplied to select statement."  I have locally enabled
> the syntax.  It seems like from http://clsql.b9.com/manual/csql-find.html
> that the second syntax should work - anyone have any ideas as to why
> it might not? I guess I would like to, ideally, have clsql do the work
> of hydrating my object, rather than selecting all the columns and
> creating an object where I manually set all those columns.

Hi Saikat,

although the document that you linked to provides the exact same syntax that 
you've used, according to <http://clsql.b9.com/manual/select.html> it could be 
that the correct syntax were

(clsql:select :from [person])

or maybe

(clsql:select :all T :from [person])

Let me know if it helps,
regards,

Alexander
From: Saikat Chakrabarti
Subject: Re: CLSQL problem selecting an object
Date: 
Message-ID: <fb39222f-7c92-4d71-aacf-ece04ce0d5fa@h5g2000yqh.googlegroups.com>
On Feb 25, 5:01 am, Alexander Lehmann <········@in.tum.de> wrote:
> Saikat Chakrabarti wrote:
> > I am trying to use clsql to select an object from my postgres
> > database, and syntax like (clsql:select [email] :from [person]) works,
> > but syntax like (clsql:select 'person) gives me an error that "No
> > source tables supplied to select statement."  I have locally enabled
> > the syntax.  It seems like fromhttp://clsql.b9.com/manual/csql-find.html
> > that the second syntax should work - anyone have any ideas as to why
> > it might not? I guess I would like to, ideally, have clsql do the work
> > of hydrating my object, rather than selecting all the columns and
> > creating an object where I manually set all those columns.
>
> Hi Saikat,
>
> although the document that you linked to provides the exact same syntax that
> you've used, according to <http://clsql.b9.com/manual/select.html> it could be
> that the correct syntax were
>
> (clsql:select :from [person])
>
> or maybe
>
> (clsql:select :all T :from [person])
>
> Let me know if it helps,
> regards,
>
> Alexander

Thanks for the reply.  Neither of those commands seem to work for me
(I get an error saying "No target columns supplied to select
statement. [Condition of type SIMPLE-ERROR]").  Also, it seems like I
should still be able to select instances of a class from the database
directly using the OODML.  In http://clsql.b9.com/manual/ref-oodml.html
, it says "The main function for reading data with the OODML is the
select function. The select is also used in the FDML. However, when
select is given a view class name, it returns a list of instances of
view classes."  This is what I want to do - I realize that with the
FDML I could just retrieve a list of all the columns, but then I would
need to manually create instances of each class, which seems overly
verbose.  Anyone have success using the OODML to select instances of a
class?
From: Saikat Chakrabarti
Subject: Re: CLSQL problem selecting an object
Date: 
Message-ID: <da6f1087-4788-4ed6-a010-204ad8068eea@e18g2000yqo.googlegroups.com>
On Feb 25, 5:01 am, Alexander Lehmann <········@in.tum.de> wrote:
> Saikat Chakrabarti wrote:
> > I am trying to use clsql to select an object from my postgres
> > database, and syntax like (clsql:select [email] :from [person]) works,
> > but syntax like (clsql:select 'person) gives me an error that "No
> > source tables supplied to select statement."  I have locally enabled
> > the syntax.  It seems like fromhttp://clsql.b9.com/manual/csql-find.html
> > that the second syntax should work - anyone have any ideas as to why
> > it might not? I guess I would like to, ideally, have clsql do the work
> > of hydrating my object, rather than selecting all the columns and
> > creating an object where I manually set all those columns.
>
> Hi Saikat,
>
> although the document that you linked to provides the exact same syntax that
> you've used, according to <http://clsql.b9.com/manual/select.html> it could be
> that the correct syntax were
>
> (clsql:select :from [person])
>
> or maybe
>
> (clsql:select :all T :from [person])
>
> Let me know if it helps,
> regards,
>
> Alexander

I just solved the problem - it wasn't any problem with clsql at all. I
was just trying to reference a symbol in a package that wasn't being
exported.  Thanks for the help.