iotex-analytics icon indicating copy to clipboard operation
iotex-analytics copied to clipboard

code optimization todo

Open coderbradlee opened this issue 4 years ago • 1 comments

1、need to add topics index for xrc_history related api:

query {
  xrc20{
    byAddress(address:"io163l2vyqhmvwfa70lfjucenrp8ctac0sfevg59y",
      numPerPage:10,page:0) {
      exist
      count
      xrc20{
        contract
       hash
        timestamp
        from
        to
        quantity
      }
      }
    }
}
query {
  xrc721{
    byAddress(address:"io163l2vyqhmvwfa70lfjucenrp8ctac0sfevg59y",
      numPerPage:10,page:0) {
      exist
      count
      xrc721{
        contract
       hash
        timestamp
        from
        to
        quantity
      }
      }
    }
}

2、replace all getcount related func with queryrow in sql/util 3、split getcount and general result returned with haveField func

coderbradlee avatar Apr 14 '20 02:04 coderbradlee

I have tested xrc_history related index,the effect is not obvious,need to do more tests and research

coderbradlee avatar Apr 18 '20 08:04 coderbradlee