MySQL

Just dabbled a day with MySQL within VL, and I thought my progress might be interesting to others as well.

The use case is super easy: save all games to a database, so a Top10 can be extracted. Additionally it can tell the current potential rank for a running game.

Pro
Unlike with the old vvvv nodes I still have total control if an operation should be blocking or async, which is really nice. Nested and convoluted SQL statements are fully supported.
The patch demonstrates on how Readers and Connections need to be opened and (eventually) closed.

Cons
This is a lot of handywork (fine for this usecase with just one tiny table), and even business logic buried deep in this patch, it can hardly be called a generalized or modular piece of code.

Test.zip (282.5 KB)

Remarks
If you want to test this yourself, create a new Database called “skyguide” and use the in-patch-initialisation to create the table structure with a bang. Make sure to use a current alpha

2 Likes

Hello, seems like I am on a quest to revive or to make alive old or abandoned projects :P but I assure you that this is coincidental.

I was looking few years back how to deal with MySQL in vl likewise but I never used it at the end I felt back in a small and handy implementation of Directus and its REST API.

Recently I managed to get back to mysql with MySQLConnector, and bellow you may see the current state.

using Beekeeper Studio to inspect and “debug” trully awesome (kudos to @sebescudie )

just to add some more info and a preview here, there is a Connection (Manager) and then standard SQL methods, like Query, NonQuery and Scalar. Theses are the basic elements (more or less) to build any combination of commands on top.
Plus there is a basic parameter implementation and example to Insert, Select Objects(Items) from a Table.

cheers!

3 Likes