essential_node_db_sql::insertConstant MUTATION
Source pub const MUTATION: &str = "INSERT\n OR IGNORE INTO mutation (\n data_id,\n mutation_index,\n key,\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 ), :mutation_index, :key, :value\n );\n";
Expand description
INSERT
OR IGNORE INTO mutation (
data_id,
mutation_index,
key,
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
), :mutation_index, :key, :value
);