Draft: block search by operation, account, block range and specific key and value
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], NULL, 'desc', 0, 2147483647, 100, 'gtg', 'value', 'author')
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], NULL, 'desc', 0, 2147483647, 100)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], NULL, 'asc', 0, 2147483647, 100)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15], NULL, 'desc', 0, 2147483647, 1000)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], 'blocktrades', 'desc', 0, 2147483647, 100, 'gtg', 'value', 'author')
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[0,72,28,18,34,11], 'blocktrades', 'desc', 0, 2147483647, 100)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[28,18,34,11], 'blocktrades', 'desc', 0, 2147483647, 100)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[0,1,2,3,4,5,6,7,8,9,10,11,12,13,15], 'blocktrades', 'asc', 0, 2147483647, 100)
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1,28,34,74,23,41,83], 'gtg', 'desc', 0, 2147483647, 1000, 'gtg', 'value', 'author')
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], 'gtg', 'asc', 0, 2147483647, 1000, 'gtg', 'value', 'author')
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], 'gtg', 'desc', 0, 2147483647, 100, 'blocktrades', 'value', 'author')
exception when:
SELECT * FROM hafbe_backend.get_block_by_op(ARRAY[1], 'gtg', 'desc', 0, 2147483647, 100, 'blocktrades', 'value', 'aut23131hor')
Edited by Michal Zander