wiki:SqlConstantsPlugin

Maintain list of static data as key-value pairs

Description

This plugin adds a new administration control panel that can be used to manage constants (key/value pairs) stored in the database. These can then be used in report queries.

Bugs/Feature Requests

Existing bugs and feature requests for SqlConstantsPlugin are here.

If you have any issues, create a new ticket.

enhancement

0 / 1

Download

Download the zipped source from here.

Source

You can check out SqlConstantsPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

When the plugin is installed, add a table like this to the database:

CREATE TABLE `constants` (
  `constant` VARCHAR(255) NOT NULL,
  `stringval` VARCHAR(255) DEFAULT NULL,
  `intval` INT(11) DEFAULT NULL,
  `floatval` FLOAT DEFAULT NULL,
  PRIMARY KEY (`constant`)
);

You can then use this in report queries. The stringval column will always be stored. Also, intval and floatval will contain the int/float equivalent if possible, ie the input could be cast to an INT.

Visit the administration panel to update constants.

Recent Changes

4677 by optilude on 2008-10-30 16:17:02
Initial checkin - mostly working.
4676 by optilude on 2008-10-30 16:15:30
Make trunk
4675 by optilude on 2008-10-30 16:14:49
New hack SqlConstantsPlugin, created by optilude
(more)

Author/Contributors

Author: optilude
Maintainer: Martin Aspeli
Contributors:

Last modified 6 weeks ago Last modified on Aug 17, 2016, 11:00:20 PM