Announcing: TiddlyWiki for SQL users

All other details about the table, I’d keep in the text field for the “table”.

As JSON data (I.e. maintained with edit field using “index” instead of field.

So definition details about the table and the columns, the columns being the fields.

The values in those fields being default values.

Then the “table” tiddler would be the template for new “rows”. Whatever applies to the tiddler and not the rows, I’d alter accordingly for the new row.

Something like that.

Hmm, an interesting approach too. I’m going to have to think through this a bit.

Thanks for your insight!

I have a new release out, 0.2.1. It has two main changes:

The new version overlays the old one, but the older ones are still posted. This one, for instance, can also be found in https://crosseye.github.io/TW5-SQL_Playground/0.2.1/

Thank you everyone for the help!

4 Likes

Hello Scott,

Great work!

Another suggestion for easier understanding:

  • maybe use the same variable name in the WikiText version and the SQL version,
  • Add inline html comment

Some example below:

For instance (from SQL Playground — five tables - do as you will) :

SQL

SELECT CompanyName, ProductName
  FROM Supplier S
  JOIN Product P ON S.Id = P.SupplierId

WikiText

<$list filter="[tag[Supplier]]" variable="company">
  <$let company-id={{{ [<company>get[id]] }}} >
   <$list filter="[tag[Product]] :filter[get[supplier-id]match<company-id>]"  variable="product" />
  </$let>
</$list>

Proposed WikiText:

<!-- List all company name from Supplier records -->
<$list filter="[tag[Supplier]]" variable="company-name">
<!-- Get supplier company id from current company name -->
  <$let company-id={{{ [<company-name>get[id]] }}} >
<!-- Get all product name having a supplier id matching current company id -->
   <$list filter="[tag[Product]] :filter[get[supplier-id]match<company-id>]"  variable="product-name" />
  </$let>
</$list>

BR,

Eskha

1 Like

Hi Scott,
Great content – Well worth experimenting with it and examine the underlaying code and templates.

I think it can help users, which know SQL code to easier understand the TW filter-syntax, since they have a reference they know already.

I was looking at the very same example for the same reason, and definitely want to improve it, but have been vacillating on using the SQL names or their aliases (S and P). I will definitely fix this in some manner!

All these examples will eventually have significant explanatory text. I’m pretty sure I would rather that such explanations end up there than in comments, but I’ll see once I start writing that content.

Thank you very much for your contributions!

That is the main goal. A secondary goal is to help me organize my own thinking and my own practices for a certain kind of wiki. And I suppose a tertiary goal is as always to learn more TW techniques.

Thank you for the encouragement!