@UNQKVS

<< Click to Display Table of Contents >>

Navigation:  TCC > Variables & Functions > Functions >

@UNQKVS

@UNQKVS[[u,]filename,"key","value"] : Add a key value pair to a UnQlite database.

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened with @UNQOPEN
keyKey to add or replace
valueValue to add

 

Returns 0 if successful, or the error text if not.

 

Example:

 

This example opens a database named "test.db", writes a key and value to the database, and then reads it back.

 

echo Testing file write and read

echo %@unqopen[rwc,test.db]

echo %@unqkvs[test.db,"key1","This is the value for our first key"]

echo %@unqreads[test.db,"key1"]

echo %@unqclose[test.db]

 

See also: @UNQOPEN, @UNQCLOSE, @UNQKVSA.