Class CollectionClient

java.lang.Object
io.stargate.sdk.data.CollectionClient

public class CollectionClient extends Object
Client for a collection (crud for documents).
  • Field Details

  • Constructor Details

    • CollectionClient

      protected CollectionClient(@NonNull @NonNull NamespaceClient namespaceClient, @NonNull @NonNull String collection)
      Full constructor.
      Parameters:
      namespaceClient - client namespace http
      collection - collection identifier
  • Method Details

    • insertOne

      public final JsonDocumentMutationResult insertOne(String json)
      Insert with a Json Document.
      Parameters:
      json - json String
      Returns:
      document identifier and status
    • insertOneAsync

      public final CompletableFuture<JsonDocumentMutationResult> insertOneAsync(String json)
      Insert with a Json Document asynchronously
      Parameters:
      json - json String
      Returns:
      document identifier and status
    • insertOne

      public final JsonDocumentMutationResult insertOne(@NonNull @NonNull JsonDocument document)
      Insert with a Json Document (schemaless)
      Parameters:
      document - current bean
      Returns:
      mutation result with status and id
    • insertOneAsync

      public final CompletableFuture<JsonDocumentMutationResult> insertOneAsync(@NonNull @NonNull JsonDocument document)
      Insert with a Json Document (schemaless)
      Parameters:
      document - current bean
      Returns:
      mutation result with status and id
    • insertOne

      public final <T> DocumentMutationResult<T> insertOne(@NonNull @NonNull Document<T> document)
      Insert with a Json Document.
      Type Parameters:
      T - represent the pojo, payload of document
      Parameters:
      document - current document
      Returns:
      document identifier and status
    • insertOneASync

      public final <T> CompletableFuture<DocumentMutationResult<T>> insertOneASync(@NonNull @NonNull Document<T> document)
      Insert with a Json Document.
      Type Parameters:
      T - represent the pojo, payload of document
      Parameters:
      document - current document
      Returns:
      document identifier and status
    • upsertOne

      public final JsonDocumentMutationResult upsertOne(String json)
      Upsert a document in the collection.
      Parameters:
      json - json to insert
      Returns:
      document status and identifier
    • upsertOneAsync

      public final CompletableFuture<JsonDocumentMutationResult> upsertOneAsync(String json)
      Upsert a document in the collection.
      Parameters:
      json - json to insert
      Returns:
      document status and identifier
    • upsertOne

      public final JsonDocumentMutationResult upsertOne(@NonNull @NonNull JsonDocument document)
      Upsert a document in the collection.
      Parameters:
      document - document to insert
      Returns:
      document status and identifier
    • upsertOneAsync

      public final CompletableFuture<JsonDocumentMutationResult> upsertOneAsync(@NonNull @NonNull JsonDocument document)
      Upsert a document in the collection.
      Parameters:
      document - json Document to insert
      Returns:
      document status and identifier
    • upsertOne

      public <DOC> DocumentMutationResult<DOC> upsertOne(@NonNull @NonNull Document<DOC> document)
      Upsert a document in the collection.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      document - document to insert
      Returns:
      document status and identifier
    • upsertOneASync

      public <DOC> CompletableFuture<DocumentMutationResult<DOC>> upsertOneASync(@NonNull @NonNull Document<DOC> document)
      Upsert with Asynchronous method.
      Type Parameters:
      DOC - current document nature
      Parameters:
      document - document to insert
      Returns:
      completion future
    • insertMany

      public final List<JsonDocumentMutationResult> insertMany(String json)
      Try Insert Many with a String
      Parameters:
      json - current Json
      Returns:
      list of status
    • insertManyASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> insertManyASync(String json)
      Try Insert Many with a String Asynchronously.
      Parameters:
      json - current Json
      Returns:
      list of status
    • insertManyJsonDocuments

      public final List<JsonDocumentMutationResult> insertManyJsonDocuments(List<JsonDocument> documents)
      Low level insertion of multiple records
      Parameters:
      documents - list of documents
      Returns:
      list of ids
    • insertManyJsonDocumentsASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> insertManyJsonDocumentsASync(List<JsonDocument> documents)
      Insert Asynchronously a list of documents.
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • insertMany

      public final List<JsonDocumentMutationResult> insertMany(JsonDocument... documents)
      Insert a list of JsonDocument.
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • insertManyAsync

      public final CompletableFuture<List<JsonDocumentMutationResult>> insertManyAsync(JsonDocument... documents)
      Insert Asynchronously a list of documents.
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • insertMany

      public final <DOC> List<DocumentMutationResult<DOC>> insertMany(List<Document<DOC>> documents)
      Insert Documents: Default is non ordered and no replace.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      Returns:
      list of ids
    • insertManyASync

      public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> insertManyASync(List<Document<DOC>> documents)
      Try Insert Many with a String Asynchronously.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      Returns:
      list of status
    • insertMany

      @SafeVarargs public final <DOC> List<DocumentMutationResult<DOC>> insertMany(Document<DOC>... documents)
      Insert a list of documents.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • insertManyAsync

      @SafeVarargs public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> insertManyAsync(Document<DOC>... documents)
      Insert Asynchronously a list of documents.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • upsertMany

      public final List<JsonDocumentMutationResult> upsertMany(String json)
      Upsert of up to 20 documents, expressed as an array within json String.
      Parameters:
      json - an array of documents within json String.
      Returns:
      insertion status for each document (in order of input).
    • upsertManyASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> upsertManyASync(String json)
      Upsert of up to 20 documents Asynchronously, expressed as an array within json String.
      Parameters:
      json - an array of documents within json String.
      Returns:
      insertion status for each document (in order of input).
    • upsertManyJsonDocuments

      public final List<JsonDocumentMutationResult> upsertManyJsonDocuments(List<JsonDocument> documents)
      Upsert of up to 20 documents, expressed as key/value documents.
      Parameters:
      documents - list of documents
      Returns:
      list of ids
    • upsertManyJsonDocumentsASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> upsertManyJsonDocumentsASync(List<JsonDocument> documents)
      Upsert of up to 20 documents, expressed as key/value documents.
      Parameters:
      documents - list of documents
      Returns:
      list of ids
    • upsertMany

      public final List<JsonDocumentMutationResult> upsertMany(JsonDocument... documents)
      Insert a list of JsonDocument.
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • upsertManyAsync

      public final CompletableFuture<List<JsonDocumentMutationResult>> upsertManyAsync(JsonDocument... documents)
      Insert Asynchronously a list of documents.
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • upsertMany

      public final <DOC> List<DocumentMutationResult<DOC>> upsertMany(List<Document<DOC>> documents)
      Upsert any items in the collection.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - current collection list
      Returns:
      list of statuses
    • upsertManyASync

      public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> upsertManyASync(List<Document<DOC>> documents)
      Upsert of up to 20 documents, expressed as key/value documents.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      Returns:
      list of ids
    • upsertMany

      @SafeVarargs public final <DOC> List<DocumentMutationResult<DOC>> upsertMany(Document<DOC>... documents)
      Insert a list of documents.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • upsertManyManyAsync

      @SafeVarargs public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> upsertManyManyAsync(Document<DOC>... documents)
      Insert Asynchronously a list of documents.
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - document list
      Returns:
      list of statuses when complete.
    • insertManyChunked

      public final List<JsonDocumentMutationResult> insertManyChunked(String json, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      json - Json String
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • insertManyChunkedASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> insertManyChunkedASync(String json, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      json - Json String
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • insertManyJsonDocumentsChunked

      public final List<JsonDocumentMutationResult> insertManyJsonDocumentsChunked(List<JsonDocument> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • insertManyJsonDocumentsChunkedASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> insertManyJsonDocumentsChunkedASync(List<JsonDocument> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • insertManyChunked

      public final <DOC> List<DocumentMutationResult<DOC>> insertManyChunked(List<Document<DOC>> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • insertManyChunkedASync

      public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> insertManyChunkedASync(List<Document<DOC>> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records asynchronously
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • upsertManyChunked

      public final List<JsonDocumentMutationResult> upsertManyChunked(String json, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      json - Json String
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • upsertManyChunkedASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> upsertManyChunkedASync(String json, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      json - Json String
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • upsertManyJsonDocumentsChunked

      public final List<JsonDocumentMutationResult> upsertManyJsonDocumentsChunked(List<JsonDocument> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • upsertManyJsonDocumentsChunkedASync

      public final CompletableFuture<List<JsonDocumentMutationResult>> upsertManyJsonDocumentsChunkedASync(List<JsonDocument> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - number of blocks in parallel
      Returns:
      list of ids
    • upsertManyChunked

      public final <DOC> List<DocumentMutationResult<DOC>> upsertManyChunked(List<Document<DOC>> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - concurrency
      Returns:
      list of ids
    • upsertManyChunkedASync

      public final <DOC> CompletableFuture<List<DocumentMutationResult<DOC>>> upsertManyChunkedASync(List<Document<DOC>> documents, int chunkSize, int concurrency)
      Low level insertion of multiple records
      Type Parameters:
      DOC - represent the pojo, payload of document
      Parameters:
      documents - list of documents
      chunkSize - size of the block
      concurrency - concurrency
      Returns:
      list of ids
    • countDocuments

      public Integer countDocuments()
      Count Document request.
      Returns:
      number of document.
    • countDocuments

      public Integer countDocuments(Filter jsonFilter)
      Count Document request.
      Parameters:
      jsonFilter - request to filter for count
      Returns:
      number of document.
    • isDocumentExists

      public boolean isDocumentExists(String id)
      Check existence of a document from its id. Projection to make it as light as possible.
      Parameters:
      id - document identifier
      Returns:
      existence status
    • findOne

      public Optional<JsonDocumentResult> findOne(SelectQuery query)
      Find one document matching the query.
      Parameters:
      query - query documents and vector
      Returns:
      result if exists
    • findOne

      public Optional<JsonDocumentResult> findOne(String rawJsonQuery)
      Find one document matching the query.
      Parameters:
      rawJsonQuery - execute a direct json Query
      Returns:
      result if exists
    • findOne

      public <DOC> Optional<DocumentResult<DOC>> findOne(String query, Class<DOC> clazz)
      Find one document matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - query documents and vector
      clazz - class of the document
      Returns:
      result if exists
    • findOne

      public <DOC> Optional<DocumentResult<DOC>> findOne(String query, DocumentResultMapper<DOC> mapper)
      Find one document matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - query documents and vector
      mapper - convert a json into expected pojo
      Returns:
      result if exists
    • findOne

      public <DOC> Optional<DocumentResult<DOC>> findOne(SelectQuery query, Class<DOC> clazz)
      Find one document matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - query documents and vector
      clazz - class of the document
      Returns:
      result if exists
    • findOne

      public <DOC> Optional<DocumentResult<DOC>> findOne(SelectQuery query, DocumentResultMapper<DOC> mapper)
      Find one document matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - query documents and vector
      mapper - convert a json into expected pojo
      Returns:
      result if exists
    • findById

      public Optional<JsonDocumentResult> findById(String id)
      Find document from its id.
      Parameters:
      id - document identifier
      Returns:
      document
    • findById

      public <DOC> Optional<DocumentResult<DOC>> findById(@NonNull @NonNull String id, Class<DOC> clazz)
      Find document from its id.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      id - document identifier
      clazz - class for target pojo
      Returns:
      document
    • findById

      public <DOC> Optional<DocumentResult<DOC>> findById(@NonNull @NonNull String id, DocumentResultMapper<DOC> mapper)
      Find document from its id.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      id - document identifier
      mapper - convert a json into expected pojo
      Returns:
      document
    • findOneByVector

      public Optional<JsonDocumentResult> findOneByVector(float[] vector)
      Find document from its vector.
      Parameters:
      vector - document vector
      Returns:
      document
    • findOneByVector

      public <DOC> Optional<DocumentResult<DOC>> findOneByVector(float[] vector, Class<DOC> clazz)
      Find document from its vector.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      vector - document vector
      clazz - class for target pojo
      Returns:
      document
    • findOneByVector

      public <DOC> Optional<DocumentResult<DOC>> findOneByVector(float[] vector, DocumentResultMapper<DOC> mapper)
      Find document from its vector.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      vector - document vector
      mapper - convert a json into expected pojo
      Returns:
      document
    • find

      public Stream<JsonDocumentResult> find(SelectQuery query)
      Search records with a filter
      Parameters:
      query - filter
      Returns:
      all items
    • findPage

      public Page<JsonDocumentResult> findPage(SelectQuery query)
      Find documents matching the query.
      Parameters:
      query - current query
      Returns:
      page of results
    • findPage

      public Page<JsonDocumentResult> findPage(String query)
      Find one document matching the query.
      Parameters:
      query - execute a direct json Query
      Returns:
      result if exists
    • findVector

      public Stream<JsonDocumentResult> findVector(float[] vector, Integer limit)
      Query builder.
      Parameters:
      vector - vector embeddings
      limit - limit for output
      Returns:
      result page
    • findVector

      public Stream<JsonDocumentResult> findVector(float[] vector, Filter filter, Integer limit)
      Query builder.
      Parameters:
      vector - vector embeddings
      filter - metadata filter
      limit - limit for output
      Returns:
      result page
    • findVectorPage

      public Page<JsonDocumentResult> findVectorPage(SelectQuery query)
      find Page.
      Parameters:
      query - return query Page
      Returns:
      page of results
    • findVectorPage

      public Page<JsonDocumentResult> findVectorPage(float[] vector, Filter filter, Integer limit, String pagingState)
      Query builder.
      Parameters:
      vector - vector embeddings
      filter - metadata filter
      limit - limit
      pagingState - paging state
      Returns:
      result page
    • findVectorPage

      public <DOC> Page<DocumentResult<DOC>> findVectorPage(float[] vector, Filter filter, Integer limit, String pagingState, Class<DOC> clazz)
      Search similarity from the vector (page by 20)
      Type Parameters:
      DOC - type of document
      Parameters:
      vector - vector embeddings
      filter - metadata filter
      limit - limit
      pagingState - paging state
      clazz - current class.
      Returns:
      page of results
    • findVectorPage

      public <DOC> Page<DocumentResult<DOC>> findVectorPage(float[] vector, Filter filter, Integer limit, String pagingState, DocumentResultMapper<DOC> mapper)
      Search similarity from the vector (page by 20)
      Type Parameters:
      DOC - type of document
      Parameters:
      vector - vector embeddings
      filter - metadata filter
      limit - limit
      pagingState - paging state
      mapper - result mapper
      Returns:
      page of results
    • find

      public <DOC> Stream<DocumentResult<DOC>> find(SelectQuery query, Class<DOC> clazz)
      Search records with a filter
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - filter
      clazz - class for target pojo
      Returns:
      all items
    • find

      public <DOC> Stream<DocumentResult<DOC>> find(SelectQuery pageQuery, DocumentResultMapper<DOC> mapper)
      Search records with a filter
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      pageQuery - filter
      mapper - convert a json into expected pojo
      Returns:
      all items
    • findAll

      public Stream<JsonDocumentResult> findAll()
      Get all items in a collection.
      Returns:
      all items
    • findAll

      public <DOC> Stream<DocumentResult<DOC>> findAll(Class<DOC> clazz)
      Find All with Object Mapping.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      clazz - class to be used
      Returns:
      stream of results
    • findAll

      public <DOC> Stream<DocumentResult<DOC>> findAll(DocumentResultMapper<DOC> mapper)
      Find All with Object Mapping.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      mapper - convert a json into expected pojo
      Returns:
      stream of results
    • findPage

      public <DOC> Page<DocumentResult<DOC>> findPage(SelectQuery query, Class<DOC> clazz)
      Find documents matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - current query
      clazz - class for target pojo
      Returns:
      page of results
    • findPage

      public <DOC> Page<DocumentResult<DOC>> findPage(String query, Class<DOC> clazz)
      Find documents matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - current query
      clazz - class for target pojo
      Returns:
      page of results
    • findPage

      public <DOC> Page<DocumentResult<DOC>> findPage(SelectQuery query, DocumentResultMapper<DOC> mapper)
      Find documents matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - current query
      mapper - mapper to convert into target pojo
      Returns:
      page of results
    • findPage

      public <DOC> Page<DocumentResult<DOC>> findPage(String query, DocumentResultMapper<DOC> mapper)
      Find documents matching the query.
      Type Parameters:
      DOC - class to be marshalled
      Parameters:
      query - current query
      mapper - mapper to convert into target pojo
      Returns:
      page of results
    • mapPageJsonResultAsPageResult

      public <DOC> Page<DocumentResult<DOC>> mapPageJsonResultAsPageResult(Page<JsonDocumentResult> pageJson, Class<DOC> clazz)
      Map a page of JsonResult to Page of Result
      Type Parameters:
      DOC - type of object im page
      Parameters:
      pageJson - current page
      clazz - target beam
      Returns:
      new page
    • mapPageJsonResultAsPageResult

      public <DOC> Page<DocumentResult<DOC>> mapPageJsonResultAsPageResult(Page<JsonDocumentResult> pageJson, DocumentResultMapper<DOC> mapper)
      Map a page of JsonResult to page result.
      Type Parameters:
      DOC - type pf object im page
      Parameters:
      pageJson - current page
      mapper - mapper for the class
      Returns:
      new page
    • deleteOne

      public DeleteResult deleteOne(DeleteQuery deleteQuery)
      Delete single record from a request.
      Parameters:
      deleteQuery - delete query
      Returns:
      number of deleted records and status
    • deleteById

      public DeleteResult deleteById(String id)
      Delete single record from its id.
      Parameters:
      id - id
      Returns:
      number of deleted records
    • deleteByVector

      public DeleteResult deleteByVector(float[] vector)
      Delete single record from its vector.
      Parameters:
      vector - vector
      Returns:
      number of deleted records
    • deleteMany

      public DeleteResult deleteMany(DeleteQuery deleteQuery)
      Delete multiple records from a request.
      Parameters:
      deleteQuery - delete query
      Returns:
      number of deleted records
    • deleteManyChunked

      public DeleteResult deleteManyChunked(DeleteQuery deleteQuery, int concurrency)
      Perform a distributed deleted.
      Parameters:
      deleteQuery - deleting query
      concurrency - concrrency number
      Returns:
      the delete result
    • deleteManyPaged

      public DeleteResult deleteManyPaged(DeleteQuery deleteQuery)
      Delete multiple records from a request.
      Parameters:
      deleteQuery - delete query
      Returns:
      number of deleted records
    • deleteAll

      public DeleteResult deleteAll()
      Clear the collection.
      Returns:
      number of items deleted
    • findOneAndUpdate

      public JsonResultUpdate findOneAndUpdate(UpdateQuery query)
      Find ana update a record based on a query,
      Parameters:
      query - query to find the record
      Returns:
      result of the update
    • findOneAndReplace

      public JsonResultUpdate findOneAndReplace(UpdateQuery query)
      Find ana replace a record based on a query,
      Parameters:
      query - query to find the record
      Returns:
      result of the update
    • findOneAndDelete

      public JsonResultUpdate findOneAndDelete(UpdateQuery query)
      Find ana delete a record based on a query.
      Parameters:
      query - query to find the record
      Returns:
      result of the update
    • updateOne

      public UpdateStatus updateOne(UpdateQuery query)
      Update a single record.
      Parameters:
      query - query to find the record
      Returns:
      update status
    • updateMany

      public UpdateStatus updateMany(UpdateQuery query)
      Update many records.
      Parameters:
      query - query to find the record
      Returns:
      update status