Page MenuHomeDevCentral

Datacube support
ClosedPublic

Authored by dereckson on Mar 3 2018, 21:17.
Tags
None
Referenced Files
F2843256: D1394.id3557.diff
Tue, Apr 23, 04:34
F2843114: D1394.id3556.diff
Tue, Apr 23, 04:03
F2840994: D1394.id3557.diff
Mon, Apr 22, 21:54
Unknown Object (File)
Fri, Apr 19, 15:18
Unknown Object (File)
Fri, Apr 19, 14:10
Unknown Object (File)
Fri, Apr 19, 08:30
Unknown Object (File)
Wed, Apr 17, 11:23
Unknown Object (File)
Wed, Apr 17, 11:23
Subscribers
None

Details

Summary

This mechanism allows Dæghrefn to be configured to fill data to
MySQL tables from the partyline.

In the partyline, the user writes .+db <name of the datacube>.

It receives instruction to fill a form as a dialog.
For example, for a song database, the dialog could be:

<luser> .+db songs
<robot> Song artist:
<luser> Apocalyptica
<robot> Song title:
<luser> In the Hall of the Mountain King
<robot> Song comment:
<luser> This is a metal interpretation, with cello.
<luser> The original title is from 1875, as 'incidental music'.
<luser> +
<robot> Ajouté dans le cube :-)

Dictionary structure

The datacube properties is a dictionary with the following data structure:

keytypedescription
dbstringThe database where the table is located
tablestringThe table where to insert data into
fieldslistThe fields (ie the columns) to use in the INSERT query
fields_typeslistFor each field, "line" for varchar, etc. / "multiline" for text
fields_promptslistFor each field, the label to prompt the user to invite them to fill a value

In the dialog example above, the values could be:

keyvalue
dbradio
tablesongs
fields{artist title comment}
fields_types{line line multline}
fields_prompts{"Song artist:" "Song title:" "Song comment:"}

Such datastructure would be saved in db_datacubes table,
with "songs" as title and the dictionary TCL string as
properties value.

Test Plan

Tested on Dæghrefn with a lyrics table

Diff Detail

Repository
rVIPER ViperServ scripts
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
db (branched from master)
Build Status
Buildable 2187
Build 2435: arc lint + arc unit

Event Timeline

dereckson created this revision.

Better schema to represent fields

dereckson added inline comments.
Daeghrefn/Bureautique.tcl
324

Done.

This revision is now accepted and ready to land.Mar 4 2018, 23:40
dereckson marked an inline comment as done.

rm TODO note

This revision was automatically updated to reflect the committed changes.