@UNQKVS[[u,]filename,"key","value"] : Add a key value pair to a UnQlite database.
u | Optional flag that the key and value are Unicode (UTF16) |
filename | Database opened with @UNQOPEN |
key | Key to add or replace |
value | Value 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]