Ferreteria/sql/tf node: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(WhenCreated)
m (7 revisions imported: moving this project here)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
==About==
==About==
* '''Purpose''': a thing that has values
* '''Purpose''': a thing that has values
* '''Module''': {{l/ferreteria/module|TextFerret}}
* '''History''':
* '''History''':
** '''2017-03-12''' started
** '''2017-03-12''' started
** '''2017-04-09''' decided there really should be a WhenMade timestamp; can always remove later
** '''2017-04-09''' decided there really should be a WhenMade timestamp; can always remove later
** '''2017-08-05''' renamed '''Class''' to '''Type''' for consistency with tf_leaf: records use "types", code maps these to "classes"
==Fields==
* '''Type''': name of node type; code should know how to map these to node-handler classes
==SQL==
==SQL==
<mysql>CREATE TABLE `tf_node` (
<syntaxhighlight lang=mysql>CREATE TABLE `tf_node` (
   `ID`      INT(4)       NOT NULL AUTO_INCREMENT,
   `ID`      INT(4)       NOT NULL AUTO_INCREMENT,
   `Class`   VARCHAR(255) NOT NULL COMMENT "app-defined code to indicate what class of object to use for wrapping this node and its values",
   `Type`     VARCHAR(255) NOT NULL COMMENT "name of node type",
   `WhenMade` DATETIME     NOT NULL DEFAULT CURRENT_TIMESTAMP
   `WhenMade` DATETIME     NOT NULL DEFAULT CURRENT_TIMESTAMP,
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
) ENGINE=InnoDB;</mysql>
) ENGINE=InnoDB;</syntaxhighlight>

Latest revision as of 16:42, 22 May 2022

About

  • Purpose: a thing that has values
  • Module: Template:L/ferreteria/module
  • History:
    • 2017-03-12 started
    • 2017-04-09 decided there really should be a WhenMade timestamp; can always remove later
    • 2017-08-05 renamed Class to Type for consistency with tf_leaf: records use "types", code maps these to "classes"

Fields

  • Type: name of node type; code should know how to map these to node-handler classes

SQL

CREATE TABLE `tf_node` (
  `ID`       INT(4)       NOT NULL AUTO_INCREMENT,
  `Type`     VARCHAR(255) NOT NULL COMMENT "name of node type",
  `WhenMade` DATETIME     NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY(`ID`)
) ENGINE=InnoDB;