essential_node_db_sql::insert

Constant DEC_VAR

Source
pub const DEC_VAR: &str = "INSERT\n    OR IGNORE INTO dec_var (\n        data_id,\n        dec_var_index,\n        value\n    )\nVALUES\n    (\n       (\n            SELECT\n                solution_data.id\n            FROM\n                solution_data\n                JOIN solution ON solution.id = solution_data.solution_id\n            WHERE\n                solution.content_hash = :solution_hash AND solution_data.data_index = :data_index\n            LIMIT\n                1\n        ), :dec_var_index, :value\n    );\n";
Expand description
INSERT
    OR IGNORE INTO dec_var (
        data_id,
        dec_var_index,
        value
    )
VALUES
    (
       (
            SELECT
                solution_data.id
            FROM
                solution_data
                JOIN solution ON solution.id = solution_data.solution_id
            WHERE
                solution.content_hash = :solution_hash AND solution_data.data_index = :data_index
            LIMIT
                1
        ), :dec_var_index, :value
    );