Jump to the Code block for a combined complete example.
The following examples will use the setup and record structure below to illustrate single record creation in an Aerospike database.
The record structure:
Write policies define additional semantics for the write operation. Instead of using the default write policies, we can set them on a per transaction basis.
The following example creates a new write policy container object that sets the send key policy to
true. This stores the user defined key with the record, and returns it with read operations.
The following example creates a key using the
ufodata set, and user defined key
Create a record
Expand the block below to see the language specific creation of the variables used in the write example below.
View the language specific data creation
The following example shows the creation of the bins and the writing of the record to the database.