My MapTool Fork: Video Proofs of Concept 02-07-2013

Talk about whatever topic you'd like, RPG related or not. (But please discuss things related to our software in the Tools section, below.)

Moderators: dorpond, trevor, Azhrei

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: My MapTool Fork: Video Proofs of Concept 02-07-2013

Post by Lee »

badsequel wrote: That sounds like a strange approach to me. So you are in essence querying the H2.INFORMATION_SCHEMA to look for tables that might hold KV pairs belonging to a Token?

SELECT table_name FROM INFORMATION_SCHEMA.TABLES
where table_name like 'someTokenIDfromTheJavaCode'

I assumed a KV table schema like this:
+-----------------+
|TokenId|Key|Value|
|100 |STR|18 |
+-----------------+

You do avoid some DB setup before use. No need to create/make sure tables exists that conform to a predefined/expected schema.
Oh, users are more than welcome to roll their own way of doing tables. What you describe is perfect for a row-schemed table that contains everything in it. I meant that the initial data transfer would involve both the application and the DB.

In detail, when a campaign loads, we'll spin through all tokens with properties, create a table in the DB using their UID, and insert all its key-values into the table. We'll then leave an accessible method of referencing these tables, either through a lib:token, or another table. After that a user can decide what he/she will do with the data. This way, a user can deal with one table at a time without sifting or iterating through a result set. Off the top of my head, each row can easily be set into a JSON right away, instead of retrieving a row and iterating through its columns, and setting column to key, and cell value to JSON value.

Also, it is likely on the initial run that there will be disparities, especially with lib:tokens made by different authors, or those that store different data. All in all, it's just a temporary store that the user can I either keep or not.
badsequel wrote:edit: btw I kinda like H2. ;) Haven't figured out how to interact via Talen Open Studio for data integration yet, but the DB itself works fine. I loved the way they packaged that simple web browser studio app in it. \O/
:) Yeah, it's growing on me too. Talend's too powerful for my simple use cases :lol: I was content to use SQL Workbench for my evaluations as it had all the drivers for the DBs I was assessing. Of course, if it'll benefit the designer base to learn how to use it, please feel free to share your findings ;)

badsequel
Giant
Posts: 115
Joined: Thu May 31, 2012 3:13 am

Re: My MapTool Fork: Video Proofs of Concept 02-07-2013

Post by badsequel »

Ouch! User defined DB functions and stored procedures in H2 have to be written in Java..
http://www.h2database.com/html/features ... _functions
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm

Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev

User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

Re: My MapTool Fork: Video Proofs of Concept 02-07-2013

Post by Bone White »

badsequel wrote:Ouch! User defined DB functions and stored procedures in H2 have to be written in Java..
http://www.h2database.com/html/features ... _functions
Iirc the intention all along was to convert to using java from the MapTool macro language.

Lee
Dragon
Posts: 958
Joined: Wed Oct 19, 2011 2:07 am

Re: My MapTool Fork: Video Proofs of Concept 02-07-2013

Post by Lee »

@badsequel Hmm. I know you mentioned you're Java's rusty, but what did you have in mind? Using PL/SQL or some other language? B.W. has it almost right, I wanted a direct coupling between the DB and Java. Perhaps JaQu, or iciQL can help, though these are still Java-based solutions. If all else fails, we can always collaborate, where you write your UDF, and I'll make the Java calls for you. The only caveat is, it must be shared if it is helpful to the community ;)

badsequel
Giant
Posts: 115
Joined: Thu May 31, 2012 3:13 am

Re: My MapTool Fork: Video Proofs of Concept 02-07-2013

Post by badsequel »

Lee wrote:@badsequel Hmm. I know you mentioned you're Java's rusty, but what did you have in mind? Using PL/SQL or some other language? B.W. has it almost right, I wanted a direct coupling between the DB and Java. Perhaps JaQu, or iciQL can help, though these are still Java-based solutions. If all else fails, we can always collaborate, where you write your UDF, and I'll make the Java calls for you. The only caveat is, it must be shared if it is helpful to the community ;)
Oh I was just hoping for something familiar(and that I am good at) to work with, so I went looking through the H2 docs with a childish hope for a somewhat pl/sql'ish -something to work with. Instead I found the dreaded "public static void"-thing. Tried registering a function - failed - and had my pride hurt a little.

No worries, I'll figure things out. Over time H2 and I will become good friends. :D

Edit: Adding \javac.exe to PATH sure helped in successfully creating "user defined function from source" in H2. One learns every day(thank the gods) :wink:
Edit: Talend connects just fine now! \O/
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm

Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev

Post Reply

Return to “General Discussion”