Class QueryBuilder

java.lang.Object
com.couchbase.lite.QueryBuilder

public final class QueryBuilder extends Object
  • Method Details

    • select

      @NonNull public static Select select(@NonNull SelectResult... results)
      Create a SELECT statement instance that you can use further (e.g. calling the from() function) to construct the complete query statement.
      Parameters:
      results - The array of the SelectResult object for specifying the returned values.
      Returns:
      A Select object.
    • selectDistinct

      @NonNull public static Select selectDistinct(@NonNull SelectResult... results)
      Create a SELECT DISTINCT statement instance that you can use further (e.g. calling the from() function) to construct the complete query statement.
      Parameters:
      results - The array of the SelectResult object for specifying the returned values.
      Returns:
      A Select distinct object.
    • createQuery

      @NonNull public static Query createQuery(@NonNull String query, @NonNull Database database)
      Create Query from a N1QL string
      Parameters:
      query - A valid N1QL query.
      Returns:
      database The database against which the query will be run.