Ferreteria/v0.42/sql/node leaf: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==About== * '''Purpose''': Values for nodes ==Fields== * '''Type''': name of type; caller code will maintain an index of leaf-handler classes (<code>array[Type] => class_name<...") |
(concept documentation from v0.41 (no change)) |
||
| Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': Values for nodes | * '''Purpose''': Values for nodes | ||
==Concept== | |||
Every '''leaf''': | |||
* has | |||
** a data type | |||
** a name (unique within the node) | |||
** a value | |||
* is like a single field in a single record | |||
==Fields== | ==Fields== | ||
* '''Type''': name of type; caller code will maintain an index of leaf-handler classes (<code>array[Type] => class_name</code>) | * '''Type''': name of type; caller code will maintain an index of leaf-handler classes (<code>array[Type] => class_name</code>) | ||
Revision as of 01:37, 24 January 2020
About
- Purpose: Values for nodes
Concept
Every leaf:
- has
- a data type
- a name (unique within the node)
- a value
- is like a single field in a single record
Fields
- Type: name of type; caller code will maintain an index of leaf-handler classes (
array[Type] => class_name)
History
- 2017-08-03 Started, because the need became apparent.
- 2020-01-16 redesigning for v0.4 (copied from Ferreteria/sql/tf leaf) - this became 0.41
- 2020-01-23 tweaking for v0.42
SQL
CREATE TABLE `node_leaf` (
`ID` INT(4) NOT NULL AUTO_INCREMENT,
`ID_Node` INT(4) NOT NULL COMMENT "ID of node to which this value belongs",
`Name` VARCHAR(255) NOT NULL COMMENT "field name of this value",
`Value` LONGTEXT DEFAULT NULL COMMENT "value, in string format",
PRIMARY KEY(`ID`),
UNIQUE KEY(`ID_Node`,`Name`)
) ENGINE=InnoDB;