You are not logged in.
Pages: 1
Hello,
Is it possible to transfer BLOB fields in a Batch Update operation?
Offline
Yes, use ALL_FIELDS or your custom field bits for the `Add` and `Update` methods
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
You can specify the fields.
But note that the Blob content will be serialized as JSON during transmission so it is only good for small Blob size .
This is interesting.
I need to do this operation once a day, and we are talking between 1,000 and 10,000 records with a blob size that may vary between 2kb up to 100kb (I don't have the number yet). Assuming worst case scenario, we are talking about 1GB in raw binary before any JSON transformation. Is it better to transfer one-by-one in this case?
Offline
ab wrote:You can specify the fields.
But note that the Blob content will be serialized as JSON during transmission so it is only good for small Blob size .
This is interesting.
I need to do this operation once a day, and we are talking between 1,000 and 10,000 records with a blob size that may vary between 2kb up to 100kb (I don't have the number yet). Assuming worst case scenario, we are talking about 1GB in raw binary before any JSON transformation. Is it better to transfer one-by-one in this case?
Sending 1GB at a time is obviously not a good idea. You can check `TSQLRestBatch.SizeBytes` and when it reaches a certain number, for example, 5MB, then you send it, and start another batch for the remaining data.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Sending 1GB at a time is obviously not a good idea. You can check `TSQLRestBatch.SizeBytes` and when it reaches a certain number, for example, 5MB, then you send it, and start another batch for the remaining data.
Thank you, I'll take a look.
Last edited by leus (2020-12-27 14:18:48)
Offline
Pages: 1