Skip navigation links
com.landawn.abacus.da

Class CouchbaseExecutor

Since:
0.8
Author:
Haiyang Li
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static String _ID
      It's name of object id set in Map/Object array.
      static String ID
      Property name of id.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CouchbaseExecutor(com.couchbase.client.java.Cluster cluster)
      Instantiates a new couchbase executor.
      CouchbaseExecutor(com.couchbase.client.java.Cluster cluster, com.couchbase.client.java.Bucket bucket)
      Instantiates a new couchbase executor.
      CouchbaseExecutor(com.couchbase.client.java.Cluster cluster, com.couchbase.client.java.Bucket bucket, com.landawn.abacus.util.SQLMapper sqlMapper)
      Instantiates a new couchbase executor.
      CouchbaseExecutor(com.couchbase.client.java.Cluster cluster, com.couchbase.client.java.Bucket bucket, com.landawn.abacus.util.SQLMapper sqlMapper, com.landawn.abacus.util.AsyncExecutor asyncExecutor)
      Instantiates a new couchbase executor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      com.landawn.abacus.util.ContinuableFuture<Long> asyncCount(String query, Object... parameters)
      Deprecated. 
      may be misused and it's inefficient.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(com.couchbase.client.java.query.N1qlQuery query)
      Async execute.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Async execute.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(String query)
      Async execute.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(String query, Object... parameters)
      Async execute.
      com.landawn.abacus.util.ContinuableFuture<Boolean> asyncExists(String query, Object... parameters)
      Always remember to set "LIMIT 1" in the sql statement for better performance.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncFindFirst(Class<T> targetClass, String query, Object... parameters)
      Async find first.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncGet(Class<T> targetClass, String id)
      Async get.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncGet(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Async get.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument>> asyncGet(String id)
      Async get.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument>> asyncGet(String id, long timeout, TimeUnit timeUnit)
      Async get.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncGett(Class<T> targetClass, String id)
      Async gett.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncGett(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Async gett.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncGett(String id)
      Async gett.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncGett(String id, long timeout, TimeUnit timeUnit)
      Async gett.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncInsert(T document)
      Async insert.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncInsert(T document, long timeout, TimeUnit timeUnit)
      Async insert.
      <T> com.landawn.abacus.util.ContinuableFuture<List<T>> asyncList(Class<T> targetClass, String query, Object... parameters)
      Async list.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass, com.couchbase.client.java.query.N1qlQuery query)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass, com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass, String query, Object... parameters)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(com.couchbase.client.java.query.N1qlQuery query)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(String query, Object... parameters)
      Async query.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalBoolean> asyncQueryForBoolean(String query, Object... parameters)
      Async query for boolean.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalByte> asyncQueryForByte(String query, Object... parameters)
      Async query for byte.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalChar> asyncQueryForChar(String query, Object... parameters)
      Async query for char.
      <T extends Date>
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<T>>
      asyncQueryForDate(Class<T> targetClass, String query, Object... parameters)
      Async query for date.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<Date>> asyncQueryForDate(String query, Object... parameters)
      Async query for date.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalDouble> asyncQueryForDouble(String query, Object... parameters)
      Async query for double.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalFloat> asyncQueryForFloat(String query, Object... parameters)
      Async query for float.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalInt> asyncQueryForInt(String query, Object... parameters)
      Async query for int.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalLong> asyncQueryForLong(String query, Object... parameters)
      Async query for long.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalShort> asyncQueryForShort(String query, Object... parameters)
      Async query for short.
      <V> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<V>> asyncQueryForSingleResult(Class<V> targetClass, String query, Object... parameters)
      Async query for single result.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<String>> asyncQueryForString(String query, Object... parameters)
      Async query for string.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(Class<T> targetClass, String id)
      Async remove.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Async remove.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncRemove(String id)
      Async remove.
      com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncRemove(String id, long timeout, TimeUnit timeUnit)
      Async remove.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(T document)
      Async remove.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(T document, long timeout, TimeUnit timeUnit)
      Async remove.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncReplace(T document)
      Async replace.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncReplace(T document, long timeout, TimeUnit timeUnit)
      Async replace.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass, com.couchbase.client.java.query.N1qlQuery query)
      Async stream.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass, com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Async stream.
      <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass, String query, Object... parameters)
      Async stream.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(com.couchbase.client.java.query.N1qlQuery query)
      Async stream.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Async stream.
      com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(String query, Object... parameters)
      Async stream.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncUpsert(T document)
      Async upsert.
      <T> com.landawn.abacus.util.ContinuableFuture<T> asyncUpsert(T document, long timeout, TimeUnit timeUnit)
      Async upsert.
      com.couchbase.client.java.Bucket bucket()
      Bucket.
      void close()
      Close.
      com.couchbase.client.java.Cluster cluster()
      Cluster.
      long count(String query, Object... parameters)
      Deprecated. 
      may be misused and it's inefficient.
      com.couchbase.client.java.query.N1qlQueryResult execute(com.couchbase.client.java.query.N1qlQuery query)
      Execute.
      com.couchbase.client.java.query.N1qlQueryResult execute(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Execute.
      com.couchbase.client.java.query.N1qlQueryResult execute(String query)
      Execute.
      com.couchbase.client.java.query.N1qlQueryResult execute(String query, Object... parameters)
      Execute.
      boolean exists(String query, Object... parameters)
      Always remember to set "LIMIT 1" in the sql statement for better performance.
      static com.landawn.abacus.DataSet extractData(Class<?> targetClass, com.couchbase.client.java.query.N1qlQueryResult resultSet)
      Extract data.
      static com.landawn.abacus.DataSet extractData(com.couchbase.client.java.query.N1qlQueryResult resultSet)
      Extract data.
      <T> com.landawn.abacus.util.u.Optional<T> findFirst(Class<T> targetClass, String query, Object... parameters)
      Find first.
      static <T> T fromJSON(Class<T> targetClass, String json)
      Returns an instance of the specified target class with the property values from the specified JSON String.
      <T> com.landawn.abacus.util.u.Optional<T> get(Class<T> targetClass, String id)
      Gets the.
      <T> com.landawn.abacus.util.u.Optional<T> get(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Gets the.
      com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument> get(String id)
      Gets the.
      com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument> get(String id, long timeout, TimeUnit timeUnit)
      Gets the.
      <T> T gett(Class<T> targetClass, String id)
      Gets the t.
      <T> T gett(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Gets the t.
      com.couchbase.client.java.document.JsonDocument gett(String id)
      Gets the t.
      com.couchbase.client.java.document.JsonDocument gett(String id, long timeout, TimeUnit timeUnit)
      Gets the t.
      static String idNameOf(String bucketName)
      Id name of.
      <T> T insert(T document)
      Insert.
      <T> T insert(T document, long timeout, TimeUnit timeUnit)
      Insert.
      <T> List<T> list(Class<T> targetClass, String query, Object... parameters)
      List.
      com.landawn.abacus.DataSet query(Class<?> targetClass, com.couchbase.client.java.query.N1qlQuery query)
      Query.
      com.landawn.abacus.DataSet query(Class<?> targetClass, com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Query.
      com.landawn.abacus.DataSet query(Class<?> targetClass, String query, Object... parameters)
      Query.
      com.landawn.abacus.DataSet query(com.couchbase.client.java.query.N1qlQuery query)
      Query.
      com.landawn.abacus.DataSet query(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Query.
      com.landawn.abacus.DataSet query(String query, Object... parameters)
      Query.
      com.landawn.abacus.util.u.OptionalBoolean queryForBoolean(String query, Object... parameters)
      Query for boolean.
      com.landawn.abacus.util.u.OptionalByte queryForByte(String query, Object... parameters)
      Query for byte.
      com.landawn.abacus.util.u.OptionalChar queryForChar(String query, Object... parameters)
      Query for char.
      <T extends Date>
      com.landawn.abacus.util.u.Nullable<T>
      queryForDate(Class<T> targetClass, String query, Object... parameters)
      Query for date.
      com.landawn.abacus.util.u.Nullable<Date> queryForDate(String query, Object... parameters)
      Query for date.
      com.landawn.abacus.util.u.OptionalDouble queryForDouble(String query, Object... parameters)
      Query for double.
      com.landawn.abacus.util.u.OptionalFloat queryForFloat(String query, Object... parameters)
      Query for float.
      com.landawn.abacus.util.u.OptionalInt queryForInt(String query, Object... parameters)
      Query for int.
      com.landawn.abacus.util.u.OptionalLong queryForLong(String query, Object... parameters)
      Query for long.
      com.landawn.abacus.util.u.OptionalShort queryForShort(String query, Object... parameters)
      Query for short.
      <V> com.landawn.abacus.util.u.Nullable<V> queryForSingleResult(Class<V> targetClass, String query, Object... parameters)
      Query for single result.
      com.landawn.abacus.util.u.Nullable<String> queryForString(String query, Object... parameters)
      Query for string.
      static void registerIdProperty(Class<?> cls, String idPropertyName)
      The object id ("_id") property will be read from/write to the specified property .
      <T> T remove(Class<T> targetClass, String id)
      Removes the.
      <T> T remove(Class<T> targetClass, String id, long timeout, TimeUnit timeUnit)
      Removes the.
      com.couchbase.client.java.document.JsonDocument remove(String id)
      Removes the.
      com.couchbase.client.java.document.JsonDocument remove(String id, long timeout, TimeUnit timeUnit)
      Removes the.
      <T> T remove(T document)
      Removes the.
      <T> T remove(T document, long timeout, TimeUnit timeUnit)
      Removes the.
      <T> T replace(T document)
      Replace.
      <T> T replace(T document, long timeout, TimeUnit timeUnit)
      Replace.
      <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass, com.couchbase.client.java.query.N1qlQuery query)
      Stream.
      <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass, com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Stream.
      <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass, String query, Object... parameters)
      Stream.
      com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(com.couchbase.client.java.query.N1qlQuery query)
      Stream.
      com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(com.couchbase.client.java.query.N1qlQuery query, long timeout, TimeUnit timeUnit)
      Stream.
      com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(String query, Object... parameters)
      Stream.
      static <T> T toEntity(Class<T> targetClass, com.couchbase.client.java.document.JsonDocument jsonDocument)
      The id in the specified jsonDocument will be set to the returned object if and only if the id is not null or empty and the content in jsonDocument doesn't contain any "id" property, and it's acceptable to the targetClass.
      static <T> T toEntity(Class<T> targetClass, com.couchbase.client.java.document.json.JsonObject jsonObject)
      To entity.
      static <T> T toEntity(Class<T> targetClass, com.couchbase.client.java.query.N1qlQueryRow row)
      To entity.
      static String toJSON(com.couchbase.client.java.document.json.JsonArray jsonArray)
      To JSON.
      static String toJSON(com.couchbase.client.java.document.JsonDocument jsonDocument)
      To JSON.
      static String toJSON(com.couchbase.client.java.document.json.JsonObject jsonObject)
      To JSON.
      static com.couchbase.client.java.document.json.JsonArray toJsonArray(Object... a)
      To json array.
      static com.couchbase.client.java.document.json.JsonArray toJsonArray(Object obj)
      To json array.
      static com.couchbase.client.java.document.JsonDocument toJsonDocument(Object... a)
      The id for the target document is got from the "id" property in the specified a.
      static com.couchbase.client.java.document.JsonDocument toJsonDocument(Object obj)
      The id for the target document is got from the "id" property in the specified obj.
      static com.couchbase.client.java.document.json.JsonObject toJsonObject(Object... a)
      To json object.
      static com.couchbase.client.java.document.json.JsonObject toJsonObject(Object obj)
      To json object.
      static <T> List<T> toList(Class<T> targetClass, com.couchbase.client.java.query.N1qlQueryResult resultSet)
      To list.
      <T> T upsert(T document)
      All the signed properties will be updated/inserted into data store.
      <T> T upsert(T document, long timeout, TimeUnit timeUnit)
      All the signed properties will be updated/inserted into data store.
    • Constructor Detail

      • CouchbaseExecutor

        public CouchbaseExecutor(com.couchbase.client.java.Cluster cluster)
        Instantiates a new couchbase executor.
        Parameters:
        cluster - the cluster
      • CouchbaseExecutor

        public CouchbaseExecutor(com.couchbase.client.java.Cluster cluster,
                                 com.couchbase.client.java.Bucket bucket)
        Instantiates a new couchbase executor.
        Parameters:
        cluster - the cluster
        bucket - the bucket
      • CouchbaseExecutor

        public CouchbaseExecutor(com.couchbase.client.java.Cluster cluster,
                                 com.couchbase.client.java.Bucket bucket,
                                 com.landawn.abacus.util.SQLMapper sqlMapper)
        Instantiates a new couchbase executor.
        Parameters:
        cluster - the cluster
        bucket - the bucket
        sqlMapper - the sql mapper
      • CouchbaseExecutor

        public CouchbaseExecutor(com.couchbase.client.java.Cluster cluster,
                                 com.couchbase.client.java.Bucket bucket,
                                 com.landawn.abacus.util.SQLMapper sqlMapper,
                                 com.landawn.abacus.util.AsyncExecutor asyncExecutor)
        Instantiates a new couchbase executor.
        Parameters:
        cluster - the cluster
        bucket - the bucket
        sqlMapper - the sql mapper
        asyncExecutor - the async executor
    • Method Detail

      • cluster

        public com.couchbase.client.java.Cluster cluster()
        Cluster.
        Returns:
        the cluster
      • bucket

        public com.couchbase.client.java.Bucket bucket()
        Bucket.
        Returns:
        the bucket
      • registerIdProperty

        public static void registerIdProperty(Class<?> cls,
                                              String idPropertyName)
        The object id ("_id") property will be read from/write to the specified property .
        Parameters:
        cls - the cls
        idPropertyName - the id property name
      • extractData

        public static com.landawn.abacus.DataSet extractData(com.couchbase.client.java.query.N1qlQueryResult resultSet)
        Extract data.
        Parameters:
        resultSet - the result set
        Returns:
        the data set
      • extractData

        public static com.landawn.abacus.DataSet extractData(Class<?> targetClass,
                                                             com.couchbase.client.java.query.N1qlQueryResult resultSet)
        Extract data.
        Parameters:
        targetClass - an entity class with getter/setter method or Map.class
        resultSet - the result set
        Returns:
        the data set
      • toList

        public static <T> List<T> toList(Class<T> targetClass,
                                         com.couchbase.client.java.query.N1qlQueryResult resultSet)
        To list.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - an entity class with getter/setter method, Map.class or basic single value type(Primitive/String/Date...)
        resultSet - the result set
        Returns:
        the list
      • toEntity

        public static <T> T toEntity(Class<T> targetClass,
                                     com.couchbase.client.java.query.N1qlQueryRow row)
        To entity.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - an entity class with getter/setter method or Map.class
        row - the row
        Returns:
        the t
      • toEntity

        public static <T> T toEntity(Class<T> targetClass,
                                     com.couchbase.client.java.document.JsonDocument jsonDocument)
        The id in the specified jsonDocument will be set to the returned object if and only if the id is not null or empty and the content in jsonDocument doesn't contain any "id" property, and it's acceptable to the targetClass.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - an entity class with getter/setter method or Map.class
        jsonDocument - the json document
        Returns:
        the t
      • toEntity

        public static <T> T toEntity(Class<T> targetClass,
                                     com.couchbase.client.java.document.json.JsonObject jsonObject)
        To entity.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - an entity class with getter/setter method or Map.class
        jsonObject - the json object
        Returns:
        the t
      • toJSON

        public static String toJSON(com.couchbase.client.java.document.json.JsonArray jsonArray)
        To JSON.
        Parameters:
        jsonArray - the json array
        Returns:
        the string
      • toJSON

        public static String toJSON(com.couchbase.client.java.document.json.JsonObject jsonObject)
        To JSON.
        Parameters:
        jsonObject - the json object
        Returns:
        the string
      • toJSON

        public static String toJSON(com.couchbase.client.java.document.JsonDocument jsonDocument)
        To JSON.
        Parameters:
        jsonDocument - the json document
        Returns:
        the string
      • fromJSON

        public static <T> T fromJSON(Class<T> targetClass,
                                     String json)
        Returns an instance of the specified target class with the property values from the specified JSON String.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - JsonArray.class, JsonObject.class or JsonDocument.class
        json - the json
        Returns:
        the t
      • toJsonObject

        public static com.couchbase.client.java.document.json.JsonObject toJsonObject(Object obj)
        To json object.
        Parameters:
        obj - an array of pairs of property name and value, or Map, or an entity with getter/setter methods.
        Returns:
        the json object
      • toJsonObject

        @SafeVarargs
        public static com.couchbase.client.java.document.json.JsonObject toJsonObject(Object... a)
        To json object.
        Parameters:
        a - the a
        Returns:
        the json object
      • toJsonArray

        public static com.couchbase.client.java.document.json.JsonArray toJsonArray(Object obj)
        To json array.
        Parameters:
        obj - the obj
        Returns:
        the json array
      • toJsonArray

        @SafeVarargs
        public static com.couchbase.client.java.document.json.JsonArray toJsonArray(Object... a)
        To json array.
        Parameters:
        a - the a
        Returns:
        the json array
      • toJsonDocument

        public static com.couchbase.client.java.document.JsonDocument toJsonDocument(Object obj)
        The id for the target document is got from the "id" property in the specified obj.
        Parameters:
        obj - an array of pairs of property name and value, or Map, or an entity with getter/setter methods.
        Returns:
        the json document
        Throws:
        IllegalArgumentException - if the specified obj doesn't have any "id" property.
      • toJsonDocument

        @SafeVarargs
        public static com.couchbase.client.java.document.JsonDocument toJsonDocument(Object... a)
        The id for the target document is got from the "id" property in the specified a.
        Parameters:
        a - pairs of property name and value.
        Returns:
        the json document
        Throws:
        IllegalArgumentException - if the specified a doesn't have any "id" property.
      • idNameOf

        public static String idNameOf(String bucketName)
        Id name of.
        Parameters:
        bucketName - the bucket name
        Returns:
        the string
      • get

        public com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument> get(String id)
        Gets the.
        Parameters:
        id - the id
        Returns:
        the optional
        See Also:
        Bucket.get(String)
      • get

        public com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument> get(String id,
                                                                                                       long timeout,
                                                                                                       TimeUnit timeUnit)
        Gets the.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the optional
        See Also:
        Bucket.get(String, long, TimeUnit)
      • get

        public <T> com.landawn.abacus.util.u.Optional<T> get(Class<T> targetClass,
                                                             String id)
        Gets the.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the optional
        See Also:
        Bucket.get(String, Class)
      • get

        public <T> com.landawn.abacus.util.u.Optional<T> get(Class<T> targetClass,
                                                             String id,
                                                             long timeout,
                                                             TimeUnit timeUnit)
        Gets the.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the optional
        See Also:
        Bucket.get(String, Class, long, TimeUnit)
      • gett

        public com.couchbase.client.java.document.JsonDocument gett(String id)
        Gets the t.
        Parameters:
        id - the id
        Returns:
        the t
        See Also:
        Bucket.get(String)
      • gett

        public com.couchbase.client.java.document.JsonDocument gett(String id,
                                                                    long timeout,
                                                                    TimeUnit timeUnit)
        Gets the t.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.get(String, long, TimeUnit)
      • gett

        public <T> T gett(Class<T> targetClass,
                          String id)
        Gets the t.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the t
        See Also:
        Bucket.get(String, Class)
      • gett

        public <T> T gett(Class<T> targetClass,
                          String id,
                          long timeout,
                          TimeUnit timeUnit)
        Gets the t.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.get(String, Class, long, TimeUnit)
      • findFirst

        @SafeVarargs
        public final <T> com.landawn.abacus.util.u.Optional<T> findFirst(Class<T> targetClass,
                                                                                       String query,
                                                                                       Object... parameters)
        Find first.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the optional
      • list

        @SafeVarargs
        public final <T> List<T> list(Class<T> targetClass,
                                                    String query,
                                                    Object... parameters)
        List.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - an entity class with getter/setter method, Map.class or basic single value type(Primitive/String/Date...)
        query - the query
        parameters - the parameters
        Returns:
        the list
      • exists

        @SafeVarargs
        public final boolean exists(String query,
                                                  Object... parameters)
        Always remember to set "LIMIT 1" in the sql statement for better performance.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        true, if successful
      • count

        @Deprecated
         @SafeVarargs
        public final long count(String query,
                                                            Object... parameters)
        Deprecated. may be misused and it's inefficient.
        Count.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the long
      • queryForBoolean

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalBoolean queryForBoolean(String query,
                                                                                                     Object... parameters)
        Query for boolean.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional boolean
      • queryForChar

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalChar queryForChar(String query,
                                                                                               Object... parameters)
        Query for char.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional char
      • queryForByte

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalByte queryForByte(String query,
                                                                                               Object... parameters)
        Query for byte.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional byte
      • queryForShort

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalShort queryForShort(String query,
                                                                                                 Object... parameters)
        Query for short.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional short
      • queryForInt

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalInt queryForInt(String query,
                                                                                             Object... parameters)
        Query for int.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional int
      • queryForLong

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalLong queryForLong(String query,
                                                                                               Object... parameters)
        Query for long.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional long
      • queryForFloat

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalFloat queryForFloat(String query,
                                                                                                 Object... parameters)
        Query for float.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional float
      • queryForDouble

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.OptionalDouble queryForDouble(String query,
                                                                                                   Object... parameters)
        Query for double.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the optional double
      • queryForString

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.Nullable<String> queryForString(String query,
                                                                                                     Object... parameters)
        Query for string.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the nullable
      • queryForDate

        @Beta
         @SafeVarargs
        public final com.landawn.abacus.util.u.Nullable<Date> queryForDate(String query,
                                                                                                 Object... parameters)
        Query for date.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the nullable
      • queryForDate

        @Beta
         @SafeVarargs
        public final <T extends Date> com.landawn.abacus.util.u.Nullable<T> queryForDate(Class<T> targetClass,
                                                                                                               String query,
                                                                                                               Object... parameters)
        Query for date.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the nullable
      • queryForSingleResult

        @SafeVarargs
        public final <V> com.landawn.abacus.util.u.Nullable<V> queryForSingleResult(Class<V> targetClass,
                                                                                                  String query,
                                                                                                  Object... parameters)
        Query for single result.
        Type Parameters:
        V - the value type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the nullable
      • query

        @SafeVarargs
        public final com.landawn.abacus.DataSet query(String query,
                                                                    Object... parameters)
        Query.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the data set
      • query

        @SafeVarargs
        public final com.landawn.abacus.DataSet query(Class<?> targetClass,
                                                                    String query,
                                                                    Object... parameters)
        Query.
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the data set
      • query

        public com.landawn.abacus.DataSet query(com.couchbase.client.java.query.N1qlQuery query)
        Query.
        Parameters:
        query - the query
        Returns:
        the data set
      • query

        public com.landawn.abacus.DataSet query(Class<?> targetClass,
                                                com.couchbase.client.java.query.N1qlQuery query)
        Query.
        Parameters:
        targetClass - the target class
        query - the query
        Returns:
        the data set
      • query

        public com.landawn.abacus.DataSet query(com.couchbase.client.java.query.N1qlQuery query,
                                                long timeout,
                                                TimeUnit timeUnit)
        Query.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the data set
      • query

        public com.landawn.abacus.DataSet query(Class<?> targetClass,
                                                com.couchbase.client.java.query.N1qlQuery query,
                                                long timeout,
                                                TimeUnit timeUnit)
        Query.
        Parameters:
        targetClass - the target class
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the data set
      • stream

        @SafeVarargs
        public final com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(String query,
                                                                                                                                    Object... parameters)
        Stream.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the stream
      • stream

        @SafeVarargs
        public final <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass,
                                                                                       String query,
                                                                                       Object... parameters)
        Stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the stream
      • stream

        public com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(com.couchbase.client.java.query.N1qlQuery query)
        Stream.
        Parameters:
        query - the query
        Returns:
        the stream
      • stream

        public <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass,
                                                                   com.couchbase.client.java.query.N1qlQuery query)
        Stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        Returns:
        the stream
      • stream

        public com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject> stream(com.couchbase.client.java.query.N1qlQuery query,
                                                                                                                long timeout,
                                                                                                                TimeUnit timeUnit)
        Stream.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the stream
      • stream

        public <T> com.landawn.abacus.util.stream.Stream<T> stream(Class<T> targetClass,
                                                                   com.couchbase.client.java.query.N1qlQuery query,
                                                                   long timeout,
                                                                   TimeUnit timeUnit)
        Stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the stream
      • insert

        public <T> T insert(T document)
        Insert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the t
        See Also:
        Bucket.insert(Document)
      • insert

        public <T> T insert(T document,
                            long timeout,
                            TimeUnit timeUnit)
        Insert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.insert(Document, long, TimeUnit)
      • upsert

        public <T> T upsert(T document)
        All the signed properties will be updated/inserted into data store.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the t
        See Also:
        Bucket.upsert(Document)
      • upsert

        public <T> T upsert(T document,
                            long timeout,
                            TimeUnit timeUnit)
        All the signed properties will be updated/inserted into data store.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.upsert(Document, long, TimeUnit)
      • replace

        public <T> T replace(T document)
        Replace.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the t
        See Also:
        Bucket.replace(Document)
      • replace

        public <T> T replace(T document,
                             long timeout,
                             TimeUnit timeUnit)
        Replace.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.replace(Document, long, TimeUnit)
      • remove

        public com.couchbase.client.java.document.JsonDocument remove(String id)
        Removes the.
        Parameters:
        id - the id
        Returns:
        the json document
        See Also:
        Bucket.remove(String)
      • remove

        public com.couchbase.client.java.document.JsonDocument remove(String id,
                                                                      long timeout,
                                                                      TimeUnit timeUnit)
        Removes the.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the json document
        See Also:
        Bucket.remove(String, long, TimeUnit)
      • remove

        public <T> T remove(Class<T> targetClass,
                            String id)
        Removes the.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the t
        See Also:
        Bucket.remove(String, Class)
      • remove

        public <T> T remove(Class<T> targetClass,
                            String id,
                            long timeout,
                            TimeUnit timeUnit)
        Removes the.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.remove(String, Class, long, TimeUnit)
      • remove

        public <T> T remove(T document)
        Removes the.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the t
        See Also:
        Bucket.remove(Document)
      • remove

        public <T> T remove(T document,
                            long timeout,
                            TimeUnit timeUnit)
        Removes the.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the t
        See Also:
        Bucket.remove(Document, long, TimeUnit)
      • execute

        public com.couchbase.client.java.query.N1qlQueryResult execute(String query)
        Execute.
        Parameters:
        query - the query
        Returns:
        the n 1 ql query result
      • execute

        @SafeVarargs
        public final com.couchbase.client.java.query.N1qlQueryResult execute(String query,
                                                                                           Object... parameters)
        Execute.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the n 1 ql query result
      • execute

        public com.couchbase.client.java.query.N1qlQueryResult execute(com.couchbase.client.java.query.N1qlQuery query)
        Execute.
        Parameters:
        query - the query
        Returns:
        the n 1 ql query result
      • execute

        public com.couchbase.client.java.query.N1qlQueryResult execute(com.couchbase.client.java.query.N1qlQuery query,
                                                                       long timeout,
                                                                       TimeUnit timeUnit)
        Execute.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the n 1 ql query result
      • asyncGet

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument>> asyncGet(String id)
        Async get.
        Parameters:
        id - the id
        Returns:
        the continuable future
      • asyncGet

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<com.couchbase.client.java.document.JsonDocument>> asyncGet(String id,
                                                                                                                                                       long timeout,
                                                                                                                                                       TimeUnit timeUnit)
        Async get.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncGet

        public <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncGet(Class<T> targetClass,
                                                                                                             String id)
        Async get.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the continuable future
      • asyncGet

        public <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncGet(Class<T> targetClass,
                                                                                                             String id,
                                                                                                             long timeout,
                                                                                                             TimeUnit timeUnit)
        Async get.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncGett

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncGett(String id)
        Async gett.
        Parameters:
        id - the id
        Returns:
        the continuable future
      • asyncGett

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncGett(String id,
                                                                                                                    long timeout,
                                                                                                                    TimeUnit timeUnit)
        Async gett.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncGett

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncGett(Class<T> targetClass,
                                                                          String id)
        Async gett.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the continuable future
      • asyncGett

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncGett(Class<T> targetClass,
                                                                          String id,
                                                                          long timeout,
                                                                          TimeUnit timeUnit)
        Async gett.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncExists

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<Boolean> asyncExists(String query,
                                                                                                  Object... parameters)
        Always remember to set "LIMIT 1" in the sql statement for better performance.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncCount

        @Deprecated
         @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<Long> asyncCount(String query,
                                                                                                            Object... parameters)
        Deprecated. may be misused and it's inefficient.
        Async count.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForBoolean

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalBoolean> asyncQueryForBoolean(String query,
                                                                                                                                             Object... parameters)
        Async query for boolean.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForChar

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalChar> asyncQueryForChar(String query,
                                                                                                                                       Object... parameters)
        Async query for char.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForByte

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalByte> asyncQueryForByte(String query,
                                                                                                                                       Object... parameters)
        Async query for byte.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForShort

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalShort> asyncQueryForShort(String query,
                                                                                                                                         Object... parameters)
        Async query for short.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForInt

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalInt> asyncQueryForInt(String query,
                                                                                                                                     Object... parameters)
        Async query for int.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForLong

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalLong> asyncQueryForLong(String query,
                                                                                                                                       Object... parameters)
        Async query for long.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForFloat

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalFloat> asyncQueryForFloat(String query,
                                                                                                                                         Object... parameters)
        Async query for float.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForDouble

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.OptionalDouble> asyncQueryForDouble(String query,
                                                                                                                                           Object... parameters)
        Async query for double.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForString

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<String>> asyncQueryForString(String query,
                                                                                                                                             Object... parameters)
        Async query for string.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForDate

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<Date>> asyncQueryForDate(String query,
                                                                                                                                         Object... parameters)
        Async query for date.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForDate

        @SafeVarargs
        public final <T extends Date> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<T>> asyncQueryForDate(Class<T> targetClass,
                                                                                                                                                       String query,
                                                                                                                                                       Object... parameters)
        Async query for date.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQueryForSingleResult

        @SafeVarargs
        public final <V> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Nullable<V>> asyncQueryForSingleResult(Class<V> targetClass,
                                                                                                                                                  String query,
                                                                                                                                                  Object... parameters)
        Async query for single result.
        Type Parameters:
        V - the value type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncFindFirst

        @SafeVarargs
        public final <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<T>> asyncFindFirst(Class<T> targetClass,
                                                                                                                                       String query,
                                                                                                                                       Object... parameters)
        Async find first.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncList

        @SafeVarargs
        public final <T> com.landawn.abacus.util.ContinuableFuture<List<T>> asyncList(Class<T> targetClass,
                                                                                                    String query,
                                                                                                    Object... parameters)
        Async list.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQuery

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(String query,
                                                                                                                    Object... parameters)
        Async query.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQuery

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass,
                                                                                                                    String query,
                                                                                                                    Object... parameters)
        Async query.
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncQuery

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(com.couchbase.client.java.query.N1qlQuery query)
        Async query.
        Parameters:
        query - the query
        Returns:
        the continuable future
      • asyncQuery

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass,
                                                                                                com.couchbase.client.java.query.N1qlQuery query)
        Async query.
        Parameters:
        targetClass - the target class
        query - the query
        Returns:
        the continuable future
      • asyncQuery

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(com.couchbase.client.java.query.N1qlQuery query,
                                                                                                long timeout,
                                                                                                TimeUnit timeUnit)
        Async query.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncQuery

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.DataSet> asyncQuery(Class<?> targetClass,
                                                                                                com.couchbase.client.java.query.N1qlQuery query,
                                                                                                long timeout,
                                                                                                TimeUnit timeUnit)
        Async query.
        Parameters:
        targetClass - the target class
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncStream

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(String query,
                                                                                                                                                                                    Object... parameters)
        Async stream.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncStream

        @SafeVarargs
        public final <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass,
                                                                                                                                       String query,
                                                                                                                                       Object... parameters)
        Async stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncStream

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(com.couchbase.client.java.query.N1qlQuery query)
        Async stream.
        Parameters:
        query - the query
        Returns:
        the continuable future
      • asyncStream

        public <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass,
                                                                                                                   com.couchbase.client.java.query.N1qlQuery query)
        Async stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        Returns:
        the continuable future
      • asyncStream

        public com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<com.couchbase.client.java.document.json.JsonObject>> asyncStream(com.couchbase.client.java.query.N1qlQuery query,
                                                                                                                                                                long timeout,
                                                                                                                                                                TimeUnit timeUnit)
        Async stream.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncStream

        public <T> com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.stream.Stream<T>> asyncStream(Class<T> targetClass,
                                                                                                                   com.couchbase.client.java.query.N1qlQuery query,
                                                                                                                   long timeout,
                                                                                                                   TimeUnit timeUnit)
        Async stream.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncInsert

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncInsert(T document)
        Async insert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the continuable future
      • asyncInsert

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncInsert(T document,
                                                                            long timeout,
                                                                            TimeUnit timeUnit)
        Async insert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncUpsert

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncUpsert(T document)
        Async upsert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the continuable future
      • asyncUpsert

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncUpsert(T document,
                                                                            long timeout,
                                                                            TimeUnit timeUnit)
        Async upsert.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncReplace

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncReplace(T document)
        Async replace.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the continuable future
      • asyncReplace

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncReplace(T document,
                                                                             long timeout,
                                                                             TimeUnit timeUnit)
        Async replace.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncRemove

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncRemove(String id)
        Async remove.
        Parameters:
        id - the id
        Returns:
        the continuable future
      • asyncRemove

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.document.JsonDocument> asyncRemove(String id,
                                                                                                                      long timeout,
                                                                                                                      TimeUnit timeUnit)
        Async remove.
        Parameters:
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncRemove

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(Class<T> targetClass,
                                                                            String id)
        Async remove.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        Returns:
        the continuable future
      • asyncRemove

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(Class<T> targetClass,
                                                                            String id,
                                                                            long timeout,
                                                                            TimeUnit timeUnit)
        Async remove.
        Type Parameters:
        T - the generic type
        Parameters:
        targetClass - the target class
        id - the id
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncRemove

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(T document)
        Async remove.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        Returns:
        the continuable future
      • asyncRemove

        public <T> com.landawn.abacus.util.ContinuableFuture<T> asyncRemove(T document,
                                                                            long timeout,
                                                                            TimeUnit timeUnit)
        Async remove.
        Type Parameters:
        T - the generic type
        Parameters:
        document - the document
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future
      • asyncExecute

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(String query)
        Async execute.
        Parameters:
        query - the query
        Returns:
        the continuable future
      • asyncExecute

        @SafeVarargs
        public final com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(String query,
                                                                                                                                           Object... parameters)
        Async execute.
        Parameters:
        query - the query
        parameters - the parameters
        Returns:
        the continuable future
      • asyncExecute

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(com.couchbase.client.java.query.N1qlQuery query)
        Async execute.
        Parameters:
        query - the query
        Returns:
        the continuable future
      • asyncExecute

        public com.landawn.abacus.util.ContinuableFuture<com.couchbase.client.java.query.N1qlQueryResult> asyncExecute(com.couchbase.client.java.query.N1qlQuery query,
                                                                                                                       long timeout,
                                                                                                                       TimeUnit timeUnit)
        Async execute.
        Parameters:
        query - the query
        timeout - the timeout
        timeUnit - the time unit
        Returns:
        the continuable future

Copyright © 2019. All rights reserved.