Update rows

Rows can be updated by the HTTP PUT command. The RaimaDB REST interface supports JSON formatted content as data for an insert operation. The row data needs to be in the format of "columnName": "columnValue". If a column has default value or allows NULL values it does not need to be specified.

The URI syntax to update a column is:

http://hostname:port/rdm/dbname/tablename/?key=keyname&start=keyvalue[;keyvalue]

If a specified key is a compound key the keyvalues should be separated by a semicolon ';' and specified in the order they are defined in the schema.

If a key is not unique all rows that match the specified key values will be updated.

If a table does not have a key the special keyname "rowid" can be used with the internal rowid value for the row that should be updated. All tables can use the "rowid" special key even if they have other keys defined.

curl -i -H "Content-Type: application/json" -X PUT -d '{ "NAME": "Trek Bicycle Corp."}' "http://localhost:21553/rdm/BICYCLE_DB/MANUFACTURER?key=ID&value=1"
curl -i -H "Content-Type: application/json" -X PUT -d '{ "TYPE": "Mountain"}' "http://localhost:21553/rdm/BICYCLE_DB/BICYCLE?key=MANUFACTURER_ID_MODEL&value=1;FX"