[PD] SQLdb for linux

Mike McGonagle mjmogo at gmail.com
Fri Jan 4 18:41:50 CET 2008


On Jan 4, 2008 1:31 AM, Hans-Christoph Steiner <hans at eds.org> wrote:

>
> I just had a look at ftm.sqlite.help.pd.    They use a custom and very
> specialized message box to deal with the comma issue.  I think your
> technique of handling the commas is much more natural to deal with, and
> probably more flexible.
>

Well, I will say that I like the fact of using the COLD inlet for the SQL,
it removes all the "wrapping" keywords, as you said. I also think that it
will make for the Programmatic generation of SQL much easier. One thing I
was playing with, I kind of discovered that it would be best to encourage
everyone using dynamic generation to do the whole thing into a single
message box that is then passed to the Query object in one fell swoop. The
mechanics of trying to stuff SQL into the Query object in smaller chunks
might get a little confusing. At least with the use of a single message box,
you can see the whole of the SQL statement before it gets sent.


>
> The part that I still can't see a clear way to deal with is handling the
> queries and the results.  I had one thought inspired by your send/receive
> symbols.  Perhaps the first argument to the [sql_query] object would be like
> your send/receive symbol, except that it would be the selector in all of the
> results returned from that query.  Then there could be one database object
> that outputs the query data thru an outlet, and the results would still be
> sortable using [route].
>

I have created an example. I also made some changes to the Database object
to allow it to recognize a NULL value from the database. NULL's I think will
be one datatype that is kind of difficult to deal with, as a Float object
can only be returned as a NULL as in the following:


select max(id) from table;

AND, there is no data in 'table'. This will return a NULL value, and NOT 0.
I also think that it should be left to the person designing the database and
the PD stuff using a Database object to worry about the differences. The
reason behind that is that a User will understand the schema of their
database, and should program accordingly.

I am going to post this up on the Pure Data site, as I still have yet to
figure out the CVS stuff. I will do that this afternoon.


Mike



>
> .hc
>
>
>
>
>
> Mike
>
>
>
> >
> >
> > .hc
> >
> > On Thu, 3 Jan 2008, Mike McGonagle wrote:
> >
> > > So, it would appear that I am wrong, it is for PD, but in the README,
> > it
> > > says it is not working...
> > >
> > http://ftm.cvs.sourceforge.net/ftm/ftm-sql/pd/README.txt?revision=1.1&view=markup
> > >
> > > It also goes through another Database Layer, rather than compiling
> > directly
> > > into the external. I still can't figure out its API in PD...
> > >
> > >
> > > Mike
> > >
> > > PS, sorry for all these messages...
> > >
> > > On Jan 3, 2008 1:40 PM, Mike McGonagle < mjmogo at gmail.com> wrote:
> > >
> > >> http://puredata.info/community/projects/software/ftm/
> > >> Hans,
> > >>
> > >> This is the URL for the FTM stuff on the PureData site. It appears
> > that
> > >> this code is still Max specific, and there are a lot of Macros so I
> > can't
> > >> really tell what is going on at first glance.
> > >>
> > >> I don't have Max, so if you know anyone that might be using this, and
> > they
> > >> could send some screen shots of what they have, that would be really
> > useful.
> > >> IOhannes says he doesn't have Max either, so I don't know anyone who
> > might
> > >> have access to these things.
> > >>
> > >>
> > >> Mike
> > >>
> > >>
> > >> On Jan 3, 2008 1:13 AM, Hans-Christoph Steiner < hans at eds.org> wrote:
> >
> > >>
> > >>>
> > >>> You should have CVS access now, so if you check this into CVS, then
> > it
> > >>> shouldn't be too hard to add it to the nightly builds.  That
> > certainly makes
> > >>> it easier for people to test it.
> > >>>
> > >>> .hc
> > >>>
> > >>> On Jan 2, 2008, at 8:19 AM, Mike McGonagle wrote:
> > >>>
> > >>> Ed,
> > >>>
> > >>> I really doubt that anyone has tried this yet, as this is just the
> > first
> > >>> release, and even that is very preliminary. We are still trying to
> > get the
> > >>> programming interface down in PD.
> > >>> You may be able to try taking a basic makefile from some other
> > external.
> > >>> The only difference here is that you also need to compile the
> > Sqlite3 code
> > >>> into an object file. It then gets linked up with the SQLdb object.
> > You may,
> > >>> depending on what 'warning' you ask for, see a lot of message. I
> > have yet to
> > >>> find any troubles with the resulting compiled objects. You can check
> > with
> > >>> the SQLite site for details, but probably won't need to...
> > >>>
> > >>> I do have access to a Ubuntu (GG) install, so I can try to figure
> > >>> something out there, but that won't happen for a few days.
> > >>>
> > >>> BUT, if anyone does create a makefile, please forward it to me, and
> > I
> > >>> can add it to the main makefile.
> > >>>
> > >>>
> > >>> Mike
> > >>>
> > >>>
> > >>> On Jan 2, 2008 9:49 AM, Ed Kelly < morph_2016 at yahoo.co.uk> wrote:
> > >>>
> > >>>> Hi there,
> > >>>>
> > >>>> has anyone had any experience of compiling Mogo's SQLdb v0.0 for
> > >>>> linux? The makefile refers to the OSX SDK...
> > >>>>
> > >>>> peace,
> > >>>> Ed
> > >>>>
> > >>>> Lone Shark "Aviation" out now on http://www.pyramidtransmissions.com
> >
> > >>>> http://www.myspace.com/sharktracks
> > >>>>
> > >>>> ------------------------------
> > >>>> Support the World Aids Awareness campaign this month with Yahoo!
> > for
> > >>>> Good<http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/
> > >
> > >>>>
> > >>>> _______________________________________________
> > >>>> PD-list at iem.at mailing list
> > >>>> UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>> --
> > >>> Peace may sound simple?one beautiful word? but it requires
> > everything we
> > >>> have, every quality, every strength, every dream, every high ideal.
> > >>> ?Yehudi Menuhin (1916?1999), musician
> > >>> _______________________________________________
> > >>> PD-list at iem.at mailing list
> > >>> UNSUBSCRIBE and account-management ->
> > >>> http://lists.puredata.info/listinfo/pd-list
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > ----------------------------------------------------------------------------
> > >>>
> > >>> Looking at things from a more basic level, you can come up with a
> > more
> > >>> direct solution... It may sound small in theory, but it in practice,
> > it can
> > >>> change entire economies.      - Amy Smith
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Peace may sound simple?one beautiful word? but it requires everything
> > we
> > >> have, every quality, every strength, every dream, every high ideal.
> > >> ?Yehudi Menuhin (1916?1999), musician
> > >>
> > >
> > >
> > >
> > > --
> > > Peace may sound simple?one beautiful word? but it requires everything
> > we
> > > have, every quality, every strength, every dream, every high ideal.
> > > ?Yehudi Menuhin (1916?1999), musician
> > >
> >
> >        zen
> >           \
> >            \
> >             \ [D [D [D [D
> >
>
>
>
> --
> Peace may sound simple—one beautiful word— but it requires everything we
> have, every quality, every strength, every dream, every high ideal.
> —Yehudi Menuhin (1916–1999), musician
>
>
>
>
>
>
>
> ----------------------------------------------------------------------------
>
> 'You people have such restrictive dress for women,' she said, hobbling
> away in three inch heels and panty hose to finish out another pink-collar
> temp pool day.  - "Hijab Scene #2", by Mohja Kahf
>
>
>


-- 
Peace may sound simple—one beautiful word— but it requires everything we
have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080104/d1cd477c/attachment.htm>


More information about the Pd-list mailing list