The fastest easiest way to get it right.

The LATEST Automation

The LATEST automation saves the most recent value in a child table up to the parent table. Consider the following YAML definition. In it we have a table of sporting events, and an automated feed is inserting updated scores into a child table.

column score

table games:
    module: sports
    description: Games
    
    # ....various columns here...

    # these two always have the latest
    # score from the child table.
    column score_a:
        suffix: _a
        description: Score Team A
        auto: latest,gamedetails.score_a
    column score_b:
        suffix: _b
        description: Score Team B
        auto: latest,gamedetails.score_b

# As score updates come in over the feed, we insert
# into this table, and the scores are saved up 
# to the game.  This keeps the game updated while
# also preserving a detailed history.
table gamedetails:
    module: sports
    description: Game Details
    
    foreign_key games:
    column score_a:
        suffix: _a
    column score_b:        
        suffix: _b

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2