Discussion:
[soci-users] SOCI - Firebird
K Patts
2015-10-27 15:08:18 UTC
Permalink
Dear Reader,

Success has been achieved with an already created database having a table
and its relevant contents, for a Firebird database.

Would it be possible to use the data definition language of CREATE DATABASE
to establish a clean new database using the SOCI-Firebird? (If possible
then please detail how this would be achieved via a concrete example.)

This is to say that the database is a file somewhere on the local file
system after the functionality in SOCI has been applied, without resorting
to an external utility like "Firebird ISQL Tool" or the likes of, to create
this database file on the local file system.

I trust the above is clear.

Kind regards,
Kev.
Mateusz Loskot
2015-10-27 16:17:32 UTC
Permalink
Post by K Patts
Dear Reader,
Success has been achieved with an already created database having a table
and its relevant contents, for a Firebird database.
Would it be possible to use the data definition language of CREATE DATABASE
to establish a clean new database using the SOCI-Firebird?
I am not Firebird user myself, so but as far as I read the engine's FAQ,
it is not really feasible: http://www.firebirdfaq.org/faq67/

If you (or anyone) find a neat solution, don't hesitate to submit pull request
https://github.com/SOCI/soci/

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

------------------------------------------------------------------------------
K Patts
2015-10-27 16:50:35 UTC
Permalink
Thank you, Mateusz.

Pleased that it was not simply an oversight, but indeed supported only
externally.

Kind regards, Kev.
Post by K Patts
Post by K Patts
Dear Reader,
Success has been achieved with an already created database having a table
and its relevant contents, for a Firebird database.
Would it be possible to use the data definition language of CREATE
DATABASE
Post by K Patts
to establish a clean new database using the SOCI-Firebird?
I am not Firebird user myself, so but as far as I read the engine's FAQ,
it is not really feasible: http://www.firebirdfaq.org/faq67/
If you (or anyone) find a neat solution, don't hesitate to submit pull request
https://github.com/SOCI/soci/
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
K Patts
2015-10-27 23:12:50 UTC
Permalink
Further thoughts on this has brought attention to the
isc_dsql_execute_immediate as being not implemented in SOCI, and this gets
used for 'CREATE DATABASE' DDL in API for Firebird. Yet the
isc_dsql_execute is implemented (statement.cpp) so... Would it not be
reasonable for the library to have this included.

Kind regards, Kev.
Post by K Patts
Thank you, Mateusz.
Pleased that it was not simply an oversight, but indeed supported only
externally.
Kind regards, Kev.
Post by K Patts
Post by K Patts
Dear Reader,
Success has been achieved with an already created database having a
table
Post by K Patts
and its relevant contents, for a Firebird database.
Would it be possible to use the data definition language of CREATE
DATABASE
Post by K Patts
to establish a clean new database using the SOCI-Firebird?
I am not Firebird user myself, so but as far as I read the engine's FAQ,
it is not really feasible: http://www.firebirdfaq.org/faq67/
If you (or anyone) find a neat solution, don't hesitate to submit pull request
https://github.com/SOCI/soci/
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
Mateusz Loskot
2015-10-28 00:08:40 UTC
Permalink
Sure, why not.
Then the firebird would support new connection string, I think.

Currently it is only possible to connect to existing database:

soci::session sql(firebird, "service=/tmp/test.fdb user=SYSDBA
password=masterkey");

With your suggestion implemented, this should also be possible:

soci::session sql(firebird, "CREATE DATABASE \'/tmp/test.fdb\' user=SYSDBA
password=masterkey");

Feel free to submit patch via pull request, if you aim to implement it.

Mateusz Łoskot
(Sent from mobile)
Post by K Patts
Further thoughts on this has brought attention to the
isc_dsql_execute_immediate as being not implemented in SOCI, and this gets
used for 'CREATE DATABASE' DDL in API for Firebird. Yet the
isc_dsql_execute is implemented (statement.cpp) so... Would it not be
reasonable for the library to have this included.
Kind regards, Kev.
Post by K Patts
Thank you, Mateusz.
Pleased that it was not simply an oversight, but indeed supported only
externally.
Kind regards, Kev.
Post by K Patts
Post by K Patts
Dear Reader,
Success has been achieved with an already created database having a
table
Post by K Patts
and its relevant contents, for a Firebird database.
Would it be possible to use the data definition language of CREATE
DATABASE
Post by K Patts
to establish a clean new database using the SOCI-Firebird?
I am not Firebird user myself, so but as far as I read the engine's FAQ,
it is not really feasible: http://www.firebirdfaq.org/faq67/
If you (or anyone) find a neat solution, don't hesitate to submit pull request
https://github.com/SOCI/soci/
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
K Patts
2015-10-28 11:58:13 UTC
Permalink
Yes, thank you. I would rather this be implemented by either Rafał Bobrowski
- Firebird backend (author) or Viacheslav Naydenov - Firebird backend
(maintainer) Core development. Surely their interests have remained with
the SOCI library in the mix of other pursuits.
Kind regards, Kev.
Post by Mateusz Loskot
Sure, why not.
Then the firebird would support new connection string, I think.
soci::session sql(firebird, "service=/tmp/test.fdb user=SYSDBA
password=masterkey");
soci::session sql(firebird, "CREATE DATABASE \'/tmp/test.fdb\' user=SYSDBA
password=masterkey");
Feel free to submit patch via pull request, if you aim to implement it.
Mateusz Łoskot
(Sent from mobile)
Post by K Patts
Further thoughts on this has brought attention to the
isc_dsql_execute_immediate as being not implemented in SOCI, and this gets
used for 'CREATE DATABASE' DDL in API for Firebird. Yet the
isc_dsql_execute is implemented (statement.cpp) so... Would it not be
reasonable for the library to have this included.
Kind regards, Kev.
Post by K Patts
Thank you, Mateusz.
Pleased that it was not simply an oversight, but indeed supported only
externally.
Kind regards, Kev.
Post by K Patts
Post by K Patts
Dear Reader,
Success has been achieved with an already created database having a
table
Post by K Patts
and its relevant contents, for a Firebird database.
Would it be possible to use the data definition language of CREATE
DATABASE
Post by K Patts
to establish a clean new database using the SOCI-Firebird?
I am not Firebird user myself, so but as far as I read the engine's FAQ,
it is not really feasible: http://www.firebirdfaq.org/faq67/
If you (or anyone) find a neat solution, don't hesitate to submit pull request
https://github.com/SOCI/soci/
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
Loading...