Oleg Broytmann | 1 Apr 02:46
X-Face
Picon
Favicon

SQLObject 04.01.1

Hello!

I'm pleased to announce version 04.01.1, the first major release of the
Apollo branch of SQLObject!

What is SQLObject
=================

SQLObject is a future mapper. It allows a developer to eat, drink, smoke or
inhale some substances and then predict the future.

SQLObject supports a number of backends: Delphic Oracle, Pythia and Guido's
time machine. The last one has an important characteristic - not only it
allows to predict the future, it allows to build one in advance; the
substance the machine is working on is spam.

Where is SQLObject
==================

Site:
future://now

What's New
==========

* SQLObject was rewritten in Apollo, a new programming language that really
  kills Python.

* Use of nanotechnology, in particular GNU nano and nanosleep() system
  call. In the future we are going to switch to pico!
(Continue reading)

Daniel Fetchinson | 6 Apr 07:55

select only one column, not the whole record

Hi folks,

Is it possible to select only 1 column out of a table and not the
whole record? More specifically, what I really need is the following:

SELECT DISTINCT column FROM table;

The point is that I only need DISTINCT values and if I can't select 1
column only then I can't use DISTINCT because generally full records
are never the same but the value in 'column' might be repeated. So I
would need to select everything and filter through the data in python
which would be a huge performance hit.

Cheers,
Daniel

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Daniel Fetchinson | 6 Apr 10:04

Re: SQLObject 04.01.1

> Hello!
>
> I'm pleased to announce version 04.01.1, the first major release of the
> Apollo branch of SQLObject!
>
>
> What is SQLObject
> =================
>
> SQLObject is a future mapper. It allows a developer to eat, drink, smoke or
> inhale some substances and then predict the future.
>
> SQLObject supports a number of backends: Delphic Oracle, Pythia and Guido's
> time machine. The last one has an important characteristic - not only it
> allows to predict the future, it allows to build one in advance; the
> substance the machine is working on is spam.
>
> Where is SQLObject
> ==================
>
> Site:
> future://now
>
> What's New
> ==========
>
> * SQLObject was rewritten in Apollo, a new programming language that really
>   kills Python.
>
> * Use of nanotechnology, in particular GNU nano and nanosleep() system
(Continue reading)

Frank Wagner | 6 Apr 14:31
Picon

Re: select only one column, not the whole record

Sorry forgot something in my former post. See below

On Sun, Apr 6, 2008 at 2:29 PM, Frank Wagner <frank.wagner <at> nofusion.de> wrote:
Hi Daniel,

it will not be possible to achieve this with the regular SQLObject-classes. All you can do is something like this:



Yoursqlobject._connection.queryAll("select distinct ...") # hardcoded sql


or, to maintain more flexibility:

conn = Yoursqlobject._connection
conn.queryAll(conn.sqlrepr(Select(items=Yoursqlobject.q.column)))

this won´t include DISTINCT in the sql. this will:
 
results = conn.queryAll(conn.sqlrepr(Select(items=Yoursqlobject.q.column, distinct=True)))




HTH.

KR,
Frank



On Sun, Apr 6, 2008 at 7:55 AM, Daniel Fetchinson <fetchinson <at> googlemail.com> wrote:
Hi folks,

Is it possible to select only 1 column out of a table and not the
whole record? More specifically, what I really need is the following:

SELECT DISTINCT column FROM table;

The point is that I only need DISTINCT values and if I can't select 1
column only then I can't use DISTINCT because generally full records
are never the same but the value in 'column' might be repeated. So I
would need to select everything and filter through the data in python
which would be a huge performance hit.

Cheers,
Daniel

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytmann | 6 Apr 17:46
X-Face
Picon
Favicon

Re: SQLObject 04.01.1

On Sun, Apr 06, 2008 at 01:04:55AM -0700, Daniel Fetchinson wrote:
> So, Oleg, tell us, how much did you smoke?

   Not much, unfortunately. The joke was not very funny, I am afraid.
Sorry. :(

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Markus Gritsch | 6 Apr 18:38
Picon
Gravatar

Re: SQLObject 04.01.1

On Sun, Apr 6, 2008 at 5:46 PM, Oleg Broytmann <phd <at> phd.pp.ru> wrote:
> On Sun, Apr 06, 2008 at 01:04:55AM -0700, Daniel Fetchinson wrote:
>  > So, Oleg, tell us, how much did you smoke?
>
>    Not much, unfortunately. The joke was not very funny, I am afraid.
>  Sorry. :(

IMO it was not bad :)

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Oleg Broytmann | 6 Apr 18:43
X-Face
Picon
Favicon

Re: SQLObject 04.01.1

On Sun, Apr 06, 2008 at 06:38:40PM +0200, Markus Gritsch wrote:
> IMO it was not bad :)

   Thank you!

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Daniel Fetchinson | 6 Apr 18:59

Re: select only one column, not the whole record

> > it will not be possible to achieve this with the regular
> > SQLObject-classes. All you can do is something like this:
> >
> > Yoursqlobject._connection.queryAll("select distinct ...") # hardcoded sql
> >
> > or, to maintain more flexibility:
> >
> > conn = Yoursqlobject._connection
> > conn.queryAll(conn.sqlrepr(Select(items=Yoursqlobject.q.column)))
>
> this won´t include DISTINCT in the sql. this will:
>
> results = conn.queryAll(conn.sqlrepr(Select(items=Yoursqlobject.q.column,
> distinct=True)))

Hi Frank, the hard coded query of course works but I'd like to have
something go through sqlobject. The Select( ) actually does the trick
of selecting only 1 column, thanks! But it does not accept 'distinct'
as a keyword argument, I wonder why.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Oleg Broytmann | 6 Apr 19:04
X-Face
Picon
Favicon

Re: select only one column, not the whole record

On Sun, Apr 06, 2008 at 09:59:56AM -0700, Daniel Fetchinson wrote:
> But it does not accept 'distinct'
> as a keyword argument, I wonder why.

   It does in SQLObject 0.10.0.

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Daniel Fetchinson | 6 Apr 19:14

Re: select only one column, not the whole record

> > But it does not accept 'distinct'
> > as a keyword argument, I wonder why.
>
>    It does in SQLObject 0.10.0.

Indeed! That's great, thanks a lot!

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane