bahir-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ricellis <...@git.apache.org>
Subject [GitHub] bahir pull request #61: [BAHIR-154] Refactor sql-cloudant to use Cloudant's ...
Date Fri, 12 Jan 2018 16:46:34 GMT
Github user ricellis commented on a diff in the pull request:

    https://github.com/apache/bahir/pull/61#discussion_r161270944
  
    --- Diff: sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
---
    @@ -58,35 +54,30 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
         }
       }
     
    -  def getAll[T](url: String)
    -      (implicit columns: Array[String] = null): Seq[String] = {
    -    this.getQueryResult[Seq[String]](url, processAll)
    -  }
    -
       def getIterator(skip: Int, limit: Int, url: String)
           (implicit columns: Array[String] = null,
           postData: String = null): Iterator[String] = {
    +    logger.info(s"Loading data from Cloudant using: $url , postData: $postData")
         val newUrl = config.getSubSetUrl(url, skip, limit, postData != null)
         this.getQueryResult[Iterator[String]](newUrl, processIterator)
       }
     
       def getTotalRows(url: String, queryUsed: Boolean)
    -      (implicit postData: String = null): Int = {
    -      if (queryUsed) config.queryLimit // Query can not retrieve total row now.
    -      else {
    -        val totalUrl = config.getTotalUrl(url)
    -        this.getQueryResult[Int](totalUrl,
    -          { result => config.getTotalRows(Json.parse(result))})
    -      }
    +                  (implicit postData: String = null): Int = {
    --- End diff --
    
    is this a bit too indented?


---

Mime
View raw message