Search Results for

    Show / Hide Table of Contents

    NOTE

    The information contained in this document represents information about preview features of the product. Features might change when the product is released for general availability.


    on_insert

    Specifies that the rule fires on the insertion of a row in the specified table.

    Syntax:

    on_insert(table){ . . . }

    table: Specifies the table in the database to watch for insertions.

    Remarks:

    Unlike the other On prefixes, on_insert takes a single parameter that must be a table name.

    Example

        // Rule 1: Whenever a name is inserted,
        // insert a new greeting into the greetings table.
        on_insert(names)
        {
            // Form the greeting using the name.
            string new_greeting = "Hello " + string(names.name) + "!";
    
            // Insert the greeting.
            gaia::hello::greetings_t::insert_row(new_greeting.c_str());
        }
    
    In This Article
    Back to top Copyright © 2021-2022 Gaia Platform Authors. Use of this documentation is governed by the MIT license that can be found in the LICENSE.txt file or at https://opensource.org/licenses/MIT.
    Generated by DocFX