Documentation ¶
Overview ¶
Package enumdb provides simple methods to store and retrieve enumerations from database tables. Each enumeration has a numerical ID ("id" on the database table as primary key) and a string name ("name" database table as unique string). Example of table:
CREATE TABLE IF NOT EXISTS `example` ( `id` SMALLINT UNSIGNED NOT NULL, `name` VARCHAR(50) NOT NULL, `disabled` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX `id_UNIQUE` (`id` ASC), UNIQUE INDEX `name_UNIQUE` (`name` ASC)) ENGINE = InnoDB COMMENT = 'Example enumeration table';
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnumTableQuery ¶
EnumTableQuery maps each enumeration table name with the SQL query string used to read the data.
Click to show internal directories.
Click to hide internal directories.