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

Implement cast from operation to reset_account_operation

parent 4468657d
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
......@@ -814,4 +814,11 @@ extern "C"
_operation* op = PG_GETARG_HIVE_OPERATION_PP( 0 );
return operation_to<hive::protocol::request_account_recovery_operation>(op);
}
PG_FUNCTION_INFO_V1( operation_to_reset_account_operation );
Datum operation_to_reset_account_operation( PG_FUNCTION_ARGS )
{
_operation* op = PG_GETARG_HIVE_OPERATION_PP( 0 );
return operation_to<hive::protocol::reset_account_operation>(op);
}
}
......@@ -357,3 +357,13 @@ AS 'MODULE_PATHNAME',
CREATE CAST (hive.operation AS hive.request_account_recovery_operation)
WITH FUNCTION hive._operation_to_request_account_recovery_operation
AS ASSIGNMENT;
CREATE OR REPLACE FUNCTION hive._operation_to_reset_account_operation(
hive.operation
) RETURNS hive.reset_account_operation LANGUAGE c IMMUTABLE STRICT PARALLEL SAFE
AS 'MODULE_PATHNAME',
'operation_to_reset_account_operation';
CREATE CAST (hive.operation AS hive.reset_account_operation)
WITH FUNCTION hive._operation_to_reset_account_operation
AS ASSIGNMENT;
......@@ -405,4 +405,10 @@ CREATE TYPE hive.request_account_recovery_operation AS (
extensions hive.extensions_type
);
CREATE TYPE hive.reset_account_operation AS (
reset_account hive.account_name_type,
account_to_reset hive.account_name_type,
new_owner_authority hive.authority
);
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