Hi,
does anyone know a Pd external which connects to a MySQL database and performs SQL commands?
https://puredata.info/dev/SQL mentions a [mysql] object but there's no link so I'm not sure it actually exists.
I'm willing to write such an external but I just want to double check that I'm not reinventing the wheel.
Christof
PS: possible use case: have Pd running as a daemon on my server, querying my wordpress database and generating web art :-)
Hi Christof, this is very easy using the py/pyext external [1] and the Python MySQL module. I am not aware of the mysql interface possibilities of lua or tcl which could be other options. best, Thomas
[1] https://grrrr.org/research/software/py/
-- Thomas Grill http://grrrr.org
Am 22.01.2018 um 18:32 schrieb Christof Ressi christof.ressi@gmx.at:
Hi,
does anyone know a Pd external which connects to a MySQL database and performs SQL commands?
https://puredata.info/dev/SQL mentions a [mysql] object but there's no link so I'm not sure it actually exists.
I'm willing to write such an external but I just want to double check that I'm not reinventing the wheel.
Christof
PS: possible use case: have Pd running as a daemon on my server, querying my wordpress database and generating web art :-)
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
hi, thanks for the hint! My original idea was to write a simple wrapper external around the 'mysql' command line tool but you're right that pyext could also be a good solution.
Gesendet: Montag, 22. Januar 2018 um 23:41 Uhr Von: "Thomas Grill" gr@grrrr.org An: "Christof Ressi" christof.ressi@gmx.at Cc: pd-list pd-list@iem.at Betreff: Re: [PD] MySQL Pd external?
Hi Christof, this is very easy using the py/pyext external [1] and the Python MySQL module. I am not aware of the mysql interface possibilities of lua or tcl which could be other options. best, Thomas
[1] https://grrrr.org/research/software/py/
-- Thomas Grill http://grrrr.org
Am 22.01.2018 um 18:32 schrieb Christof Ressi christof.ressi@gmx.at:
Hi,
does anyone know a Pd external which connects to a MySQL database and performs SQL commands?
https://puredata.info/dev/SQL mentions a [mysql] object but there's no link so I'm not sure it actually exists.
I'm willing to write such an external but I just want to double check that I'm not reinventing the wheel.
Christof
PS: possible use case: have Pd running as a daemon on my server, querying my wordpress database and generating web art :-)
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Mon, 2018-01-22 at 18:32 +0100, Christof Ressi wrote:
does anyone know a Pd external which connects to a MySQL database and performs SQL commands?
Last time I was looking for a mysql external, I ended up using purest_json calling some simple php script that abstracted out all the database handling. It turned out I liked that approach more than I would have by using some SQL external in Pd directly. This way I hadn't to think about SQL anymore in the Pd realm and was able to use a simplified interface that allowed to focus at the task at hand.
I'm not sure SQL and Pd go well together so nicely. The question of blocking audio in synchronous request is only one aspect. Another is the limitation of what you can express in Pd messages and what you need in SQL. How are you going to express something like this in Pd:
START TRANSACTION; UPDATE passwords set algo = 'sha512' where hash like '$6%'; DELETE FROM passwords where algo = 'md5'; COMMIT;
(Consider the '$6' and the semicolons. Ok, that's a pretty made up example, but you get the idea)
Roman
I'm not sure SQL and Pd go well together so nicely.
sadly, Pd doesn't go well together with most other languages.... but SQL is not so bad in this context, compare that to assembling JS or PHP statements in Pd! (it's all possible with [list tosymbol], but it's a pain.) I think simple single SQL statements would work quite fine as Pd lists (the trailing semicolon could be ommited). anyhow, I would consider such an external useful very simple database interaction, for everything else an approach like yours or Thomas' is definitely preferable!
Gesendet: Dienstag, 23. Januar 2018 um 12:22 Uhr Von: "Roman Haefeli" reduzent@gmail.com An: pd-list pd-list@iem.at Betreff: Re: [PD] MySQL Pd external?
On Mon, 2018-01-22 at 18:32 +0100, Christof Ressi wrote:
does anyone know a Pd external which connects to a MySQL database and performs SQL commands?
Last time I was looking for a mysql external, I ended up using purest_json calling some simple php script that abstracted out all the database handling. It turned out I liked that approach more than I would have by using some SQL external in Pd directly. This way I hadn't to think about SQL anymore in the Pd realm and was able to use a simplified interface that allowed to focus at the task at hand.
I'm not sure SQL and Pd go well together so nicely. The question of blocking audio in synchronous request is only one aspect. Another is the limitation of what you can express in Pd messages and what you need in SQL. How are you going to express something like this in Pd:
START TRANSACTION; UPDATE passwords set algo = 'sha512' where hash like '$6%'; DELETE FROM passwords where algo = 'md5'; COMMIT;
(Consider the '$6' and the semicolons. Ok, that's a pretty made up example, but you get the idea)
Roman _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list