Skip to content
Snippets Groups Projects
Commit 218ea039 authored by Krzysztof Leśniak's avatar Krzysztof Leśniak Committed by Bartek Wrona
Browse files

Implement cast from operation to update_proposal_votes_operation

parent 2bb83cc9
No related branches found
No related tags found
6 merge requests!627merge in fix for get_current_block_age,!626Fix get_current_block_age function to avoid healthcheck fails,!622merge develop to master,!599merge ( with merge commit) develop to master,!597Merge develop to master for release,!264Implement conversion functions from custom operation type to specific sql operation type
......@@ -963,4 +963,11 @@ extern "C"
_operation* op = PG_GETARG_HIVE_OPERATION_PP( 0 );
return operation_to<hive::protocol::update_proposal_operation>(op);
}
PG_FUNCTION_INFO_V1( operation_to_update_proposal_votes_operation );
Datum operation_to_update_proposal_votes_operation( PG_FUNCTION_ARGS )
{
_operation* op = PG_GETARG_HIVE_OPERATION_PP( 0 );
return operation_to<hive::protocol::update_proposal_votes_operation>(op);
}
}
......@@ -487,3 +487,13 @@ AS 'MODULE_PATHNAME',
CREATE CAST (hive.operation AS hive.update_proposal_operation)
WITH FUNCTION hive._operation_to_update_proposal_operation
AS ASSIGNMENT;
CREATE OR REPLACE FUNCTION hive._operation_to_update_proposal_votes_operation(
hive.operation
) RETURNS hive.update_proposal_votes_operation LANGUAGE c IMMUTABLE STRICT PARALLEL SAFE
AS 'MODULE_PATHNAME',
'operation_to_update_proposal_votes_operation';
CREATE CAST (hive.operation AS hive.update_proposal_votes_operation)
WITH FUNCTION hive._operation_to_update_proposal_votes_operation
AS ASSIGNMENT;
......@@ -508,4 +508,11 @@ CREATE TYPE hive.update_proposal_operation AS (
extensions hive.update_proposal_extensions_type
);
CREATE TYPE hive.update_proposal_votes_operation AS (
voter hive.account_name_type,
proposal_ids NUMERIC[],
approve boolean,
extensions hive.extensions_type
);
CREATE TYPE hive.void_t AS ();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment