Aerospike C client manual --- key-value storage-delete record, aerospike Client

Source: Internet
Author: User
Tags aerospike

Aerospike C client manual --- key-value storage-delete record, aerospike Client
Delete record

The API of the Aerospike C client provides a simple operation to delete data in the database.

Sample Code of data deletion is used by all samples. The following code references the sample directory examples/basic_examples/put, which is provided by the Aerospike C Client installation package.

Read the [create a connection] section to learn how to establish a connection with a cluster.

KEY)

When deleting a record, the database uses a key to identify the record. Next we will create a key for the sample code. The key is the string "test-key". The data namespace is named "test" and the set name is "test-set ".

As_key key; as_key_init_str (& key, "test", "test-set", "test-key ");
Delete record

You can use the previously initialized key to delete records in the database:

If (aerospike_key_remove (& as, & err, NULL, & key )! = AEROSPIKE_ OK) {fprintf (stderr, "err (% d) % s at [% s: % d] \ n", err. code, err. message, err. file, err. line );}

<Http://www.aerospike.com/docs/client/c/usage/kvs/delete.html>  

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.