[PD-dev] Fwd: Fwd: Fwd: Connecting up an SQL Database to PD

Jamie Bullock jamie at postlude.co.uk
Tue Nov 13 09:50:53 CET 2007


On Mon, 2007-11-12 at 16:51 -0600, Mike McGonagle wrote:
> On 11/12/07, Jamie Bullock <jamie at postlude.co.uk> wrote:
> > I'm sure you've already looked at it, but there's a (maybe) useful
> > README and help file here:
> >
> > http://pure-data.cvs.sourceforge.net/pure-data/externals/postlude/psql/
> 
> Jamie,
> 
> I was looking at your source code for psql, 

I know I said this already, and it's in the sources, but just for the
record, the majority of the code in [psql] is by Iain Mott. I just
forked the code added a little functionality, and took over maintaining
it in CVS.

> and was wondering if it
> expects there to be only a single result set returned? Or does it
> merge all the results into one? I noticed the the comment...
> 

It gathers the results from each query and prefixes them with an index
starting from 0, outputting each row as a list.

> /*  up to 10 fields may be returned. returns floats or symbols */

This is referring to the number of columns (not rows) that may be
returned (corresponding to atoms in each Pd list from the outlet).
There's no reasoon why this figure can't be higher, so I might change
this in the source.

> I would think that making it such that it acted like 'textfile', that
> with each bang sent to the sql object, that it would return each
> subsequent row, and once the end of that set is reached, it would
> output a bang on a second outlet, similar to what 'textfile' does.
> 

Good idea! I'll add that too.

Jamie

-- 
www.postlude.co.uk





More information about the Pd-dev mailing list