[fpc-pascal] [PATCH] Add Oid_JSON in pqconnection unit

silvioprog silvioprog at gmail.com
Thu Mar 5 13:23:15 CET 2015


On Thu, Mar 5, 2015 at 6:25 AM, Michael Van Canneyt <michael at freepascal.org>
wrote:
>
> On Wed, 4 Mar 2015, silvioprog wrote:
>
>> Hello,
>> The patch allows to use this ... :
>>
>>     select row_to_json(row(1,'foo'))
>>
>> ... instead of this (in this case, the ::text cast avoids the "Missing
>> (compatible) underlying dataset, can not open" error):
>>
>
> I think you better cast it to ftMemo instead of ftString.
>
> The contents of string fields are limited to 8k in fcl-db.
> A lot of JSON will be bigger than that.
>

Thanks for this information! =)


> Since MyDataset.FieldByName('Mymemofield').AsString works as you would
> expect, there no reason to use string instead of memo fields.
>

New patch sent to:

http://bugs.freepascal.org/view.php?id=27606


> The use of stringlist in jsonscanner is about to be removed, because it
> adversely affects performance.


Very good. You could use a similar approach used in jsscanner: using
stream. =)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150305/39636dc1/attachment.html>


More information about the fpc-pascal mailing list