Usage
* Default for a three column table :
CREATE VIRTUAL TABLE pivot_table USING perl
("SQLite::VirtualTable::Pivot","base_table");
* Specify the pivot columns:
CREATE VIRTUAL TABLE pivot_table USING perl
("SQLite::VirtualTable::Pivot","base_table",
"pivot_row", "pivot_column", "pivot_value");
CREATE VIRTUAL TABLE pivot_table USING perl
("SQLite::VirtualTable::Pivot","base_table",
"entity", "attribute", "value");
* Can also transparently handle foreign keys in the base table:
* <base table column>-><child table>.(<child table id>).<child table column>
CREATE VIRTUAL TABLE pivot_table USING perl
("SQLite::VirtualTable::Pivot","base_table",
"entity_id->entity_lookup(id).entity",
"attribute_id->attribute_lookup(id).attribute",
"value_id->value_lookup(id).value" );