Lazarus

Programming => Databases => Topic started by: Чебурашка on January 19, 2022, 04:42:05 pm

Title: SQLite serialize/deserialize support
Post by: Чебурашка on January 19, 2022, 04:42:05 pm
Hello,
I see that the SQLite C/C++ API has a couple of methods called sqlite3_serialize/sqlite3_deserialize

https://www.sqlite.org/c3ref/serialize.html
https://www.sqlite.org/c3ref/deserialize.html

I am not able to find these functions in the Free Pascal glorious wrapper, and I was wondering if it is a explicit choice or simply nobody has needed this.

It seems that I am using the wrapper made from sqlite version 3.14.2.

Thanks
Title: Re: SQLite serialize/deserialize support
Post by: Чебурашка on January 19, 2022, 04:53:26 pm
Hello,
I see that the SQLite C/C++ API has a couple of methods called sqlite3_serialize/sqlite3_deserialize

https://www.sqlite.org/c3ref/serialize.html
https://www.sqlite.org/c3ref/deserialize.html

I am not able to find these functions in the Free Pascal glorious wrapper, and I was wondering if it is a explicit choice or simply nobody has needed this.

It seems that I am using the wrapper made from sqlite version 3.14.2.

Thanks

Please help me understanding: is this wrapper autogenerated from some .h file? This would explain, as the serialize/deserialize methods have been added to the C/C++ API starting from the version 3.23.0
Title: Re: SQLite serialize/deserialize support
Post by: Zvoni on January 20, 2022, 08:48:23 am
It has more to do with, if your SQLite-Lib has been compiled with the SQLITE_OMIT_DESERIALIZE option.
Because if yes, that C-Interface would be missing from the Lib independent if the Wrapper offers it
Title: Re: SQLite serialize/deserialize support
Post by: Чебурашка on January 20, 2022, 09:08:43 am
Ok, then maybe free pascal library supplier's SQLite-lib supplier had this option set, because I did not recompile the components on my own.

Any suggestions?
Title: Re: SQLite serialize/deserialize support
Post by: Zvoni on January 20, 2022, 09:23:25 am
Just saw the Lib-version you mentioned.
You might be right with that.

Basically: Write your own.
As for HowTo: Take a look at sqlite3.inc in "....fpc\3.2.0\source\packages\sqlite\src\sqlite3.inc" --> 3.2.0 being the Version on my PC

EDIT: It might be beneficial if enough people ask, that the SQLite-packages/sources of FPC be upgraded to some more current version.
I have no idea who the maintainer is though
Title: Re: SQLite serialize/deserialize support
Post by: Чебурашка on January 20, 2022, 09:36:14 am
Basically: Write your own.
As for HowTo: Take a look at sqlite3.inc in "....fpc\3.2.0\source\packages\sqlite\src\sqlite3.inc" --> 3.2.0 being the Version on my PC

Thank you for the hint, I will try to.
TinyPortal © 2005-2018