Recent

Author Topic: SQLite serialize/deserialize support  (Read 1967 times)

tt

  • Jr. Member
  • **
  • Posts: 65
SQLite serialize/deserialize support
« 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

tt

  • Jr. Member
  • **
  • Posts: 65
Re: SQLite serialize/deserialize support
« Reply #1 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

Zvoni

  • Hero Member
  • *****
  • Posts: 1182
Re: SQLite serialize/deserialize support
« Reply #2 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
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

tt

  • Jr. Member
  • **
  • Posts: 65
Re: SQLite serialize/deserialize support
« Reply #3 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?

Zvoni

  • Hero Member
  • *****
  • Posts: 1182
Re: SQLite serialize/deserialize support
« Reply #4 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
« Last Edit: January 20, 2022, 09:27:24 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

tt

  • Jr. Member
  • **
  • Posts: 65
Re: SQLite serialize/deserialize support
« Reply #5 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