Skip to content

Commit

Permalink
remove deprecated actionTxId column
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Apr 26, 2024
1 parent 8e13bac commit 2d51b52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ISqlProjectedNftRangeByAddressQuery {
result: ISqlProjectedNftRangeByAddressResult;
}

const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":true,"after_tx_id":true,"until_tx_id":true,"limit":true},"params":[{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":1456,"b":1470}]},{"name":"after_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1496,"b":1508}]},{"name":"until_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1535,"b":1547}]},{"name":"limit","required":true,"transform":{"type":"scalar"},"locs":[{"a":1649,"b":1655}]}],"statement":"SELECT\n json_agg(json_build_object(\n 'ownerAddress', encode(\"ProjectedNFT\".owner_address, 'hex'),\n 'previousUtxoTxHash', encode(\"ProjectedNFT\".previous_utxo_tx_hash, 'hex'),\n 'previousTxOutputIndex', \"ProjectedNFT\".previous_utxo_tx_output_index,\n 'actionOutputIndex', CASE\n WHEN \"TransactionOutput\".output_index = NULL THEN NULL\n ELSE \"TransactionOutput\".output_index\n END,\n 'actionTxId', encode(\"Transaction\".hash, 'hex'),\n 'policyId', \"ProjectedNFT\".policy_id,\n 'assetName', \"ProjectedNFT\".asset_name,\n 'amount', \"ProjectedNFT\".amount,\n 'status', CASE\n WHEN \"ProjectedNFT\".operation = 0 THEN 'Lock'\n WHEN \"ProjectedNFT\".operation = 1 THEN 'Unlocking'\n WHEN \"ProjectedNFT\".operation = 2 THEN 'Claim'\n ELSE 'Invalid'\n END,\n 'plutusDatum', encode(\"ProjectedNFT\".plutus_datum, 'hex'),\n 'forHowLong', \"ProjectedNFT\".for_how_long,\n 'actionSlot', \"Block\".slot\n )) as \"payload!\",\n encode(\"Block\".hash, 'hex') as \"block!\",\n encode(\"Transaction\".hash, 'hex') as \"tx_id!\"\nFROM \"ProjectedNFT\"\n LEFT JOIN \"TransactionOutput\" ON \"TransactionOutput\".id = \"ProjectedNFT\".hololocker_utxo_id\n JOIN \"Transaction\" ON \"Transaction\".id = \"ProjectedNFT\".tx_id\n JOIN \"Block\" ON \"Transaction\".block_id = \"Block\".id\nWHERE\n encode(\"ProjectedNFT\".owner_address, 'hex') = :owner_address! AND\n\t\"Transaction\".id > :after_tx_id! AND\n\t\"Transaction\".id <= :until_tx_id!\nGROUP BY (\"Block\".id, \"Transaction\".id)\nORDER BY (\"Block\".height, \"Transaction\".tx_index) ASC\nLIMIT :limit!"};
const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":true,"after_tx_id":true,"until_tx_id":true,"limit":true},"params":[{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":1399,"b":1413}]},{"name":"after_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1439,"b":1451}]},{"name":"until_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1478,"b":1490}]},{"name":"limit","required":true,"transform":{"type":"scalar"},"locs":[{"a":1592,"b":1598}]}],"statement":"SELECT\n json_agg(json_build_object(\n 'ownerAddress', encode(\"ProjectedNFT\".owner_address, 'hex'),\n 'previousUtxoTxHash', encode(\"ProjectedNFT\".previous_utxo_tx_hash, 'hex'),\n 'previousTxOutputIndex', \"ProjectedNFT\".previous_utxo_tx_output_index,\n 'actionOutputIndex', CASE\n WHEN \"TransactionOutput\".output_index = NULL THEN NULL\n ELSE \"TransactionOutput\".output_index\n END,\n 'policyId', \"ProjectedNFT\".policy_id,\n 'assetName', \"ProjectedNFT\".asset_name,\n 'amount', \"ProjectedNFT\".amount,\n 'status', CASE\n WHEN \"ProjectedNFT\".operation = 0 THEN 'Lock'\n WHEN \"ProjectedNFT\".operation = 1 THEN 'Unlocking'\n WHEN \"ProjectedNFT\".operation = 2 THEN 'Claim'\n ELSE 'Invalid'\n END,\n 'plutusDatum', encode(\"ProjectedNFT\".plutus_datum, 'hex'),\n 'forHowLong', \"ProjectedNFT\".for_how_long,\n 'actionSlot', \"Block\".slot\n )) as \"payload!\",\n encode(\"Block\".hash, 'hex') as \"block!\",\n encode(\"Transaction\".hash, 'hex') as \"tx_id!\"\nFROM \"ProjectedNFT\"\n LEFT JOIN \"TransactionOutput\" ON \"TransactionOutput\".id = \"ProjectedNFT\".hololocker_utxo_id\n JOIN \"Transaction\" ON \"Transaction\".id = \"ProjectedNFT\".tx_id\n JOIN \"Block\" ON \"Transaction\".block_id = \"Block\".id\nWHERE\n encode(\"ProjectedNFT\".owner_address, 'hex') = :owner_address! AND\n\t\"Transaction\".id > :after_tx_id! AND\n\t\"Transaction\".id <= :until_tx_id!\nGROUP BY (\"Block\".id, \"Transaction\".id)\nORDER BY (\"Block\".height, \"Transaction\".tx_index) ASC\nLIMIT :limit!"};

/**
* Query generated from SQL:
Expand All @@ -40,7 +40,6 @@ const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":tr
* WHEN "TransactionOutput".output_index = NULL THEN NULL
* ELSE "TransactionOutput".output_index
* END,
* 'actionTxId', encode("Transaction".hash, 'hex'),
* 'policyId', "ProjectedNFT".policy_id,
* 'assetName', "ProjectedNFT".asset_name,
* 'amount', "ProjectedNFT".amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ SELECT
WHEN "TransactionOutput".output_index = NULL THEN NULL
ELSE "TransactionOutput".output_index
END,
'actionTxId', encode("Transaction".hash, 'hex'),
'policyId', "ProjectedNFT".policy_id,
'assetName', "ProjectedNFT".asset_name,
'amount', "ProjectedNFT".amount,
Expand Down

0 comments on commit 2d51b52

Please sign in to comment.