FirebirdSQL backend integrated into WebToolkit C++ Library :-)

Added by Łukasz Matuszewski almost 8 years ago

Hope you will include my name as an author of this backend. The necessary files are included in attachment (that is changed main CMakeLists.txt and src/Wt/Dbo/backend/CMakeLists.txt and added Firebird.C and Firebird also WtFindIBPP.txt files)

Best regards
Łukasz Matuszewski

wt.tar.gz (10.5 KB)


Replies (5)

RE: FirebirdSQL backend integrated into WebToolkit C++ Library :-) - Added by Łukasz Matuszewski almost 8 years ago

IBPP library can be obtained from http://www.ibpp.org/.
FirebirdSQL database can be obtained from http://www.firebirdsql.org/.

Both are for Linux,Windows,MacOSX.

RE: FirebirdSQL backend integrated into WebToolkit C++ Library :-) - Added by Łukasz Matuszewski almost 8 years ago

Here you have as attachment and corresponding simple CMakeLists.txt for IBPP library. All you need is Firebird installation.

Hope it helps.

ibpp.zip (153 KB)

RE: FirebirdSQL backend integrated into WebToolkit C++ Library :-) - Added by Wim Dumon almost 8 years ago

Hello Łukasz,

Thank you for the pointers!

I went quickly through the source code and I have a question about the use of the IBPP classes in your backend. Do you think it is possible to replace this:

virtual void bind(int column, const std::string& value)
{
  DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
  setValue(column, value);
}

by

virtual void bind(int column, const std::string& value)
{
  DEBUG(std::cerr << this << " bind " << column << " " << value << std::endl);
  m_stmt->Set(column + 1, value);
}

and then also eliminate the large switch statement in the execute method? It seems to me that the functionality supported by IBPP can simplify the implementation of FireBirdStatement. But I could be missing something, I'm only glancing quickly over the source code and documentation. (it would also eliminate possible leaks caused by the new/deletes in the code)

Best regards,
Wim.

RE: FirebirdSQL backend integrated into WebToolkit C++ Library :-) - Added by Łukasz Matuszewski almost 8 years ago

Hello Wim,

Thank you for asking me... it means that i am somehow needed. Going back to your question... it seems that your proposal works... I have attached source of modified Firebird backend (with you solution)

It should work also with writing capabilities (INSERT INTO, UPDATE).

Thanks again for such improvement...

Firebird (3.52 KB)

Firebird.C Magnifier (16.5 KB)

RE: FirebirdSQL backend integrated into WebToolkit C++ Library :-) - Added by Łukasz Matuszewski almost 8 years ago

Reuploading Firebird.C (missing headers to compile). Please take the latest version.

Firebird.C Magnifier (16.5 KB)

(1-5/5)