Recent

Author Topic: Is there Connection Pool in fcl-db  (Read 565 times)

daniel_sap

  • Jr. Member
  • **
  • Posts: 93
Is there Connection Pool in fcl-db
« on: April 11, 2025, 01:15:37 pm »
Hi,
I'm using fcl-db classes for database access.
Currently, I'm writing rest api back-end and have concurrent endpoint calls and would like
to use connection pool.
Is there class implemented for it in fcl-db.
How do you think, is it good idea to keep up with fcl-db or to go for ZeosLib, mORMot or other.

For now I'm thinking to do custom implementation, which will be a class with few methods,
but if you see some issues or can advice ...

zeljko

  • Hero Member
  • *****
  • Posts: 1751
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Is there Connection Pool in fcl-db
« Reply #1 on: April 11, 2025, 02:37:27 pm »
AFAIR there's sqldbpool or similar in fpc trunk.

daniel_sap

  • Jr. Member
  • **
  • Posts: 93
Re: Is there Connection Pool in fcl-db
« Reply #2 on: April 11, 2025, 09:38:08 pm »
AFAIR there's sqldbpool or similar in fpc trunk.

I took if from the trunk and build it in my project without any issues.

However, didn't find any usage example - in source\packages\fcl-db\examples or in the wiki.
If someone has some simple example to provide ...

zeljko

  • Hero Member
  • *****
  • Posts: 1751
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Is there Connection Pool in fcl-db
« Reply #3 on: April 11, 2025, 10:52:41 pm »
I think it is used in sqldbrest, so check there.

daniel_sap

  • Jr. Member
  • **
  • Posts: 93
Re: Is there Connection Pool in fcl-db
« Reply #4 on: April 11, 2025, 11:56:59 pm »
I think it is used in sqldbrest, so check there.

Thank you, zeljko,

I found also this example application
fpc\source\packages\fcl-web\examples\restbridge\demorestbridge.lpi

 

TinyPortal © 2005-2018