Hello, I'm KiWong.

recently I'm looking for a sqlite update method using something.

so I found the rbu extension. (https://www.sqlite.org/rbu.html)

and tested that diff two sqlite3 dbs with rbu option.

but I have a problem of big diff size. this db has the BLOB Data in one
column and bit level data. found the rbu diff function in 'sqldiff.c' file
and i knew that this function will do byte level diff method.

therefore, I want to use a RBU custom delta format and found the below.

To use a custom delta format, the RBU application must register a
user-defined SQL function named "rbu_delta" before beginning to process the
update. *rbu_delta()* will be invoked with *two arguments* - the original
value stored in the target table column and the delta value provided as
part of the RBU update. It should return the result of applying the delta
to the original value. To use the custom delta function, the character of
the rbu_control value corresponding to the target column to update must be
set to 'd' instead of 'x'. Then, instead of updating the target table with
the value stored in the corresponding data_% column, RBU invokes the
user-defined SQL function "rbu_delta()" and the store in the target table
column.

but I don't understand about this exactly.

Please let me know how can I make a custom delta format and function,
update with rbu application in Lib. some example or something.

Reply via email to